diff options
Diffstat (limited to 'qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb index 4478ea41662..ad70f6813fb 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb @@ -3,33 +3,40 @@ module QA context 'Plan' do describe 'collapse comments in issue discussions' do - let(:issue_title) { 'issue title' } + let(:my_first_reply) { 'My first reply' } - it 'user collapses reply for comments in an issue' do + before do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - Resource::Issue.fabricate_via_browser_ui! do |issue| - issue.title = issue_title + issue = Resource::Issue.fabricate_via_api! do |issue| + issue.title = 'issue title' end - expect(page).to have_content(issue_title) + issue.visit! - Page::Project::Issue::Show.perform do |show_page| - show_page.select_all_activities_filter - show_page.start_discussion("My first discussion") - expect(show_page).to have_content("My first discussion") + Page::Project::Issue::Show.perform do |show| + my_first_discussion = 'My first discussion' - show_page.reply_to_discussion("My First Reply") - expect(show_page).to have_content("My First Reply") + show.select_all_activities_filter + show.start_discussion(my_first_discussion) + page.assert_text(my_first_discussion) + show.reply_to_discussion(my_first_reply) + page.assert_text(my_first_reply) + end + end + + it 'user collapses and expands reply for comments in an issue' do + Page::Project::Issue::Show.perform do |show| + one_reply = "1 reply" - show_page.collapse_replies - expect(show_page).to have_content("1 reply") - expect(show_page).not_to have_content("My First Reply") + show.collapse_replies + expect(show).to have_content(one_reply) + expect(show).not_to have_content(my_first_reply) - show_page.expand_replies - expect(show_page).to have_content("My First Reply") - expect(show_page).not_to have_content("1 reply") + show.expand_replies + expect(show).to have_content(my_first_reply) + expect(show).not_to have_content(one_reply) end end end |