Commit a744fd79 authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa/standardize-page-objects-use-on-ce-plan-tests' into 'master'

Standardize page objects use on CE Plan tests

See merge request gitlab-org/gitlab-ce!30962
parents ce8abda9 e1644da6
...@@ -30,12 +30,12 @@ module QA ...@@ -30,12 +30,12 @@ module QA
end end
it 'user mentions a user in comment' do it 'user mentions a user in comment' do
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show|
show_page.select_all_activities_filter show.select_all_activities_filter
show_page.comment('cc-ing you here @eve') show.comment('cc-ing you here @eve')
expect do expect do
expect(show_page).to have_content("cc-ing you here") expect(show).to have_content("cc-ing you here")
end.not_to raise_error # Selenium::WebDriver::Error::UnhandledAlertError end.not_to raise_error # Selenium::WebDriver::Error::UnhandledAlertError
end end
end end
......
...@@ -15,28 +15,28 @@ module QA ...@@ -15,28 +15,28 @@ module QA
issue.visit! issue.visit!
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show|
my_first_discussion = 'My first discussion' my_first_discussion = 'My first discussion'
show_page.select_all_activities_filter show.select_all_activities_filter
show_page.start_discussion(my_first_discussion) show.start_discussion(my_first_discussion)
page.assert_text(my_first_discussion) page.assert_text(my_first_discussion)
show_page.reply_to_discussion(my_first_reply) show.reply_to_discussion(my_first_reply)
page.assert_text(my_first_reply) page.assert_text(my_first_reply)
end end
end end
it 'user collapses and expands reply for comments in an issue' do it 'user collapses and expands reply for comments in an issue' do
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show|
one_reply = "1 reply" one_reply = "1 reply"
show_page.collapse_replies show.collapse_replies
expect(show_page).to have_content(one_reply) expect(show).to have_content(one_reply)
expect(show_page).not_to have_content(my_first_reply) expect(show).not_to have_content(my_first_reply)
show_page.expand_replies show.expand_replies
expect(show_page).to have_content(my_first_reply) expect(show).to have_content(my_first_reply)
expect(show_page).not_to have_content(one_reply) expect(show).not_to have_content(one_reply)
end end
end end
end end
......
...@@ -14,18 +14,18 @@ module QA ...@@ -14,18 +14,18 @@ module QA
end end
it 'user comments on an issue and edits the comment' do it 'user comments on an issue and edits the comment' do
Page::Project::Issue::Show.perform do |issue_show_page| Page::Project::Issue::Show.perform do |show|
first_version_of_comment = 'First version of the comment' first_version_of_comment = 'First version of the comment'
second_version_of_comment = 'Second version of the comment' second_version_of_comment = 'Second version of the comment'
issue_show_page.comment(first_version_of_comment) show.comment(first_version_of_comment)
expect(issue_show_page).to have_content(first_version_of_comment) expect(show).to have_content(first_version_of_comment)
issue_show_page.edit_comment(second_version_of_comment) show.edit_comment(second_version_of_comment)
expect(issue_show_page).to have_content(second_version_of_comment) expect(show).to have_content(second_version_of_comment)
expect(issue_show_page).not_to have_content(first_version_of_comment) expect(show).not_to have_content(first_version_of_comment)
end end
end end
end end
......
...@@ -17,25 +17,25 @@ module QA ...@@ -17,25 +17,25 @@ module QA
end end
it 'user filters comments and activities in an issue' do it 'user filters comments and activities in an issue' do
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show|
my_own_comment = "My own comment" my_own_comment = "My own comment"
made_the_issue_confidential = "made the issue confidential" made_the_issue_confidential = "made the issue confidential"
show_page.comment('/confidential', filter: :comments_only) show.comment('/confidential', filter: :comments_only)
show_page.comment(my_own_comment, filter: :comments_only) show.comment(my_own_comment, filter: :comments_only)
expect(show_page).not_to have_content(made_the_issue_confidential) expect(show).not_to have_content(made_the_issue_confidential)
expect(show_page).to have_content(my_own_comment) expect(show).to have_content(my_own_comment)
show_page.select_all_activities_filter show.select_all_activities_filter
expect(show_page).to have_content(made_the_issue_confidential) expect(show).to have_content(made_the_issue_confidential)
expect(show_page).to have_content(my_own_comment) expect(show).to have_content(my_own_comment)
show_page.select_history_only_filter show.select_history_only_filter
expect(show_page).to have_content(made_the_issue_confidential) expect(show).to have_content(made_the_issue_confidential)
expect(show_page).not_to have_content(my_own_comment) expect(show).not_to have_content(my_own_comment)
end end
end end
end end
......
...@@ -24,12 +24,12 @@ module QA ...@@ -24,12 +24,12 @@ module QA
it 'user sees issue suggestions when creating a new issue' do it 'user sees issue suggestions when creating a new issue' do
Page::Project::Show.perform(&:go_to_new_issue) Page::Project::Show.perform(&:go_to_new_issue)
Page::Project::Issue::New.perform do |new_issue_page| Page::Project::Issue::New.perform do |new|
new_issue_page.add_title("issue") new.add_title("issue")
expect(new_issue_page).to have_content(issue_title) expect(new).to have_content(issue_title)
new_issue_page.add_title("Issue Board") new.add_title("Issue Board")
expect(new_issue_page).not_to have_content(issue_title) expect(new).not_to have_content(issue_title)
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment