Cmcmahon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/57644
Change subject: last scenario check that moved pages are actually OK
......................................................................
last scenario check that moved pages are actually OK
Change-Id: I68d5b423fde2d6c9ec3e294989e5a62dc4954da0
---
M features/page.feature
M features/step_definitions/page_steps.rb
2 files changed, 19 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests
refs/changes/44/57644/1
diff --git a/features/page.feature b/features/page.feature
index d91a63a..450ddad 100644
--- a/features/page.feature
+++ b/features/page.feature
@@ -50,9 +50,5 @@
Then I should be on a page that says Move succeeded
And I should see the text A redirect has been created
And I should have a link to the old page title and a link to the new
page title
-
- Scenario: Moved page checks
- Given I moved a page successfully
- When I open the new page URL
- Then the page displays the new title
- And the old page displays a redirect to the new page
+ And the the new page should have the correct text
+ And the old page should display a redirect to the new page
diff --git a/features/step_definitions/page_steps.rb
b/features/step_definitions/page_steps.rb
index 8530f47..24dafa7 100644
--- a/features/step_definitions/page_steps.rb
+++ b/features/step_definitions/page_steps.rb
@@ -103,10 +103,27 @@
Then(/^I should have a link to the old page title and a link to the new page
title$/) do
on(MovePage).old_page_link_element(@does_not_exist_page_name).when_present.should
exist
on(MovePage).moved_page_link_element(@does_not_exist_page_name).when_present.should
exist
+
#on(MovePage).old_page_link_element(@does_not_exist_page_name).when_present.click
+ #@browser.text.should match /Redirect page/
+
#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/
end
Then(/^I should see the text A redirect has been created$/) do
@browser.text.should match /A redirect has been created/
end
+Then(/^the the new page should have the correct text$/) do
+
on(MovePage).old_page_link_element(@does_not_exist_page_name).when_present.click
+ @browser.text.should match /Redirect page/
+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/
+end
+
+
--
To view, visit https://gerrit.wikimedia.org/r/57644
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I68d5b423fde2d6c9ec3e294989e5a62dc4954da0
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