Spage has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/51307


Change subject: Generalize test to visit URL variants
......................................................................

Generalize test to visit URL variants

Change-Id: Ib8783f963a6dfdae06895212927a6b704f91993c
---
M features/create_account.feature
M features/step_definitions/create_account_steps.rb
M features/support/pages/create_account_page.rb
3 files changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/07/51307/1

diff --git a/features/create_account.feature b/features/create_account.feature
index 639393a..c3b0161 100644
--- a/features/create_account.feature
+++ b/features/create_account.feature
@@ -1,5 +1,11 @@
 Feature: Create account
 
-  Scenario: Go to Create account page
-    Given I go to a Create account page
+  Scenario Outline: Go to Create account page
+    Given I go to Create account page at <path>
     Then form has Create account button
+
+  Examples:
+    | path |
+    | Special:CreateAccount |
+    | Special:UserLogin/signup |
+    | Special:UserLogin?type=signup |
diff --git a/features/step_definitions/create_account_steps.rb 
b/features/step_definitions/create_account_steps.rb
index d292d82..a9808b8 100644
--- a/features/step_definitions/create_account_steps.rb
+++ b/features/step_definitions/create_account_steps.rb
@@ -1,5 +1,5 @@
-Given /^I go to a Create account page$/ do
-  visit CreateAccountPage
+Given /^I go to Create account page at (.+)$/ do |path|
+  visit(CreateAccountPage, :using_params => {:page_title => path})
 end
 
 Then /^form has Create account button$/ do
diff --git a/features/support/pages/create_account_page.rb 
b/features/support/pages/create_account_page.rb
index 39f6731..23225b4 100644
--- a/features/support/pages/create_account_page.rb
+++ b/features/support/pages/create_account_page.rb
@@ -3,9 +3,9 @@
   include URLModule
 
   def self.url
-    URLModule.url('Special:CreateAccount')
+    URLModule.url('')
   end
-  page_url url
+  page_url "#{url}<%=params[:page_title]%>"
 
   button(:create_account, id: 'wpCreateaccount')
 

-- 
To view, visit https://gerrit.wikimedia.org/r/51307
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8783f963a6dfdae06895212927a6b704f91993c
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Spage <sp...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to