Zfilipin has uploaded a new change for review.

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


Change subject: Feature: Manage Watchlist, Scenario: Login link leads to login 
page
......................................................................

Feature: Manage Watchlist, Scenario: Login link leads to login page

Change-Id: I0b7de39a4605713902ef5ce097e6ad99458d77d7
---
M tests/acceptance/features/step_definitions/watchlist_steps.rb
M tests/acceptance/features/support/pages/home_page.rb
M tests/acceptance/features/watchlist.feature
3 files changed, 16 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/84/51084/1

diff --git a/tests/acceptance/features/step_definitions/watchlist_steps.rb 
b/tests/acceptance/features/step_definitions/watchlist_steps.rb
index 6966aa9..17590a2 100644
--- a/tests/acceptance/features/step_definitions/watchlist_steps.rb
+++ b/tests/acceptance/features/step_definitions/watchlist_steps.rb
@@ -9,10 +9,6 @@
   on(HomePage).login_button_element.should exist
 end
 
-Given /^I am at San Francisco Chronicle article$/ do
-  visit SanFranciscoChroniclePage
-end
-
 When /^Select the watchlist icon$/ do
   on(HomePage).watch_link_element.when_present.click
 end
@@ -77,3 +73,11 @@
     page.watch_link_element.should be_true
   end
 end
+
+When /^I click Login$/ do
+  on(HomePage).login
+end
+
+Then /^Login page opens$/ do
+  @browser.url.should match /Special:UserLogin/
+end
diff --git a/tests/acceptance/features/support/pages/home_page.rb 
b/tests/acceptance/features/support/pages/home_page.rb
index f2304ff..fd55433 100644
--- a/tests/acceptance/features/support/pages/home_page.rb
+++ b/tests/acceptance/features/support/pages/home_page.rb
@@ -14,6 +14,7 @@
 
   a(:mainmenu_button, id: 'mw-mf-main-menu-button')
   a(:login_button, class: 'external login')
+  a(:login, text: 'Login')
   a(:search_result, class: 'search-result-item')
   text_field(:search_box, id: 'mw-mf-search')
   div(:menupage, id: 'mw-mf-menu-page')
diff --git a/tests/acceptance/features/watchlist.feature 
b/tests/acceptance/features/watchlist.feature
index 0130dd5..d953655 100644
--- a/tests/acceptance/features/watchlist.feature
+++ b/tests/acceptance/features/watchlist.feature
@@ -3,12 +3,17 @@
   Background:
     Given I am in beta mode
 
-  Scenario: Watchlist behavior when not logged in
+  Scenario: I receive notification that I need to log in to use the watchlist 
functionality
       And I am not logged in
-      And I am at San Francisco Chronicle article
     When Select the watchlist icon
     Then I receive notification that I need to log in to use the watchlist 
functionality
 
+  Scenario: Login link leads to login page
+      And I am not logged in
+    When Select the watchlist icon
+      And I click Login
+    Then Login page opens
+
   Scenario: Add an article to the watchlist
     And I am logged into the mobile website
     When I search for an article and select the watchlist icon

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b7de39a4605713902ef5ce097e6ad99458d77d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to