diff options
author | Dan Davison <ddavison@gitlab.com> | 2019-07-04 01:44:47 +0300 |
---|---|---|
committer | Dan Davison <ddavison@gitlab.com> | 2019-07-04 01:44:47 +0300 |
commit | 62e52ac6a8130c080f498ee2f76ef50b8c209f0f (patch) | |
tree | 7705dd8e512d92e4a8da9b08e93f0bd15476ef72 | |
parent | a1d113c9ff74d973575db3ff9738939aaf1c59c1 (diff) | |
parent | ee685e228a4e1eac4567287aaa84ad27db2face1 (diff) |
Merge branch 'qa/improve-performance-of-plan-issue-e2e-test' into 'master'
Backport EE MR that improves end-to-end tests
See merge request gitlab-org/gitlab-ce!30320
3 files changed, 29 insertions, 18 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..2101311f065 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 @@ -9,27 +9,33 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - Resource::Issue.fabricate_via_browser_ui! do |issue| + issue = Resource::Issue.fabricate_via_api! do |issue| issue.title = issue_title end + issue.visit! + expect(page).to have_content(issue_title) Page::Project::Issue::Show.perform do |show_page| + my_first_discussion = "My first discussion" + my_first_reply = "My First Reply" + one_reply = "1 reply" + show_page.select_all_activities_filter - show_page.start_discussion("My first discussion") - expect(show_page).to have_content("My first discussion") + show_page.start_discussion(my_first_discussion) + expect(show_page).to have_content(my_first_discussion) - show_page.reply_to_discussion("My First Reply") - expect(show_page).to have_content("My First Reply") + show_page.reply_to_discussion(my_first_reply) + expect(show_page).to have_content(my_first_reply) show_page.collapse_replies - expect(show_page).to have_content("1 reply") - expect(show_page).not_to have_content("My First Reply") + expect(show_page).to have_content(one_reply) + expect(show_page).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") + expect(show_page).to have_content(my_first_reply) + expect(show_page).not_to have_content(one_reply) end end end diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb index ad2773b41ac..301836f5ce8 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb @@ -9,28 +9,33 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } - Resource::Issue.fabricate_via_browser_ui! do |issue| + issue = Resource::Issue.fabricate_via_api! do |issue| issue.title = issue_title end + issue.visit! + expect(page).to have_content(issue_title) Page::Project::Issue::Show.perform do |show_page| + my_own_comment = "My own comment" + made_the_issue_confidential = "made the issue confidential" + show_page.comment('/confidential', filter: :comments_only) - show_page.comment('My own comment', filter: :comments_only) + show_page.comment(my_own_comment, filter: :comments_only) - expect(show_page).not_to have_content("made the issue confidential") - expect(show_page).to have_content("My own comment") + expect(show_page).not_to have_content(made_the_issue_confidential) + expect(show_page).to have_content(my_own_comment) show_page.select_all_activities_filter - expect(show_page).to have_content("made the issue confidential") - expect(show_page).to have_content("My own comment") + expect(show_page).to have_content(made_the_issue_confidential) + expect(show_page).to have_content(my_own_comment) show_page.select_history_only_filter - expect(show_page).to have_content("made the issue confidential") - expect(show_page).not_to have_content("My own comment") + expect(show_page).to have_content(made_the_issue_confidential) + expect(show_page).not_to have_content(my_own_comment) end end end diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb index 530fc684437..24dcb32f63f 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb @@ -14,7 +14,7 @@ module QA resource.description = 'project for issue suggestions' end - Resource::Issue.fabricate_via_browser_ui! do |issue| + Resource::Issue.fabricate_via_api! do |issue| issue.title = issue_title issue.project = project end |