Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/70744
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(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/44/70744/1 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 dc8cfd6..2f2e119 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') select(:namespace, id: 'wpNewTitleNs') text_field(:new_title, id: 'wpNewTitleMain') text_field(:reason, id: 'wpReason') -- To view, visit https://gerrit.wikimedia.org/r/70744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90a644ccb8875907f74f56cd1669fa20cbe111ab Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
