Zfilipin has submitted this change and it was merged. Change subject: Use page text for check, @browser.text makes test flaky ......................................................................
Use page text for check, @browser.text makes test flaky Change-Id: I90a644ccb8875907f74f56cd1669fa20cbe111ab --- M features/step_definitions/page_steps.rb M features/support/pages/move_page.rb 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/features/step_definitions/page_steps.rb b/features/step_definitions/page_steps.rb index 4ba76b2..54e5f06 100644 --- a/features/step_definitions/page_steps.rb +++ b/features/step_definitions/page_steps.rb @@ -120,10 +120,12 @@ end end -Then(/^the old page should display a redirect to the new page$/) do - on(MovePage).moved_page_link_element(@does_not_exist_page_name).when_present.click - @browser.text.should match(/Moved/) - @browser.text.should_not match(/Redirect page/) +Then(/^the old page should display a redirect to the new page$/) do + on(MovePage) do |page| + page.moved_page_link_element(@does_not_exist_page_name).when_present.click + page.body_content.should match(/Moved/) + page.body_content.should_not match(/Redirect page/) + end end diff --git a/features/support/pages/move_page.rb b/features/support/pages/move_page.rb index a7b1b4c..19fb814 100644 --- a/features/support/pages/move_page.rb +++ b/features/support/pages/move_page.rb @@ -1,6 +1,7 @@ class MovePage include PageObject + div(:body_content, id: 'content') checkbox(:leave_redirect, id: 'wpLeaveRedirect') button(:move_page, name: 'wpMove') select(:namespace, id: 'wpNewTitleNs') -- To view, visit https://gerrit.wikimedia.org/r/70744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90a644ccb8875907f74f56cd1669fa20cbe111ab Gerrit-PatchSet: 2 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon <[email protected]> Gerrit-Reviewer: Zfilipin <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
