Cmcmahon has uploaded a new change for review.

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

Change subject: QA: update watchstar test
......................................................................

QA: update watchstar test

incremental updating of common_article_steps.rb, with minor
changes to wording for watchstar steps

Change-Id: Id78023b814f97185646711d919969178c15c5f6d
---
M tests/browser/features/step_definitions/common_article_steps.rb
M tests/browser/features/step_definitions/watchstar_steps.rb
M tests/browser/features/watchstar.feature
3 files changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
b/tests/browser/features/step_definitions/common_article_steps.rb
index ede4782..8e8440b 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -49,8 +49,8 @@
   expect(on(ArticlePage).toast_element.when_present.class_name).to match 
"error"
 end
 
-Then /^the watch star is selected$/ do
-  on(ArticlePage).watch_link_element.parent.class_name.should match "watched"
+Then /^the watch star should be selected$/ do
+  expect(on(ArticlePage).watch_link_element.parent.class_name).to match 
"watched"
 end
 
 Then(/^the text of the first heading should be "(.*)"$/) do |title|
@@ -62,8 +62,8 @@
   end
 end
 
-Then /^the watch star is not selected$/ do
-  on(ArticlePage).watch_link_element.should exist
+Then /^the watch star should not be selected$/ do
+  expect(on(ArticlePage).watch_link_element).to be_visible
 end
 
 Then /^I see drawer with message "(.+)"$/ do |text|
diff --git a/tests/browser/features/step_definitions/watchstar_steps.rb 
b/tests/browser/features/step_definitions/watchstar_steps.rb
index 1c2912c..dfbda34 100644
--- a/tests/browser/features/step_definitions/watchstar_steps.rb
+++ b/tests/browser/features/step_definitions/watchstar_steps.rb
@@ -10,11 +10,11 @@
   step 'I am on the "Selenium mobile watch test" page'
 end
 
-Then(/^I see a toast with message about watching the page$/) do
+Then(/^I should see a toast with message about watching the page$/) do
   expect(on(ArticlePage).toast_element.when_present.text).to match "Added 
Selenium mobile watch test to your watchlist"
 end
 
-Then(/^I see a toast with message about unwatching the page$/) do
+Then(/^I should see a toast with message about unwatching the page$/) do
   on(ArticlePage) do |page|
     page.wait_until do
       page.text.include? "Removed" #Chrome needs this, FF does not
diff --git a/tests/browser/features/watchstar.feature 
b/tests/browser/features/watchstar.feature
index 98780c3..6bf3019 100644
--- a/tests/browser/features/watchstar.feature
+++ b/tests/browser/features/watchstar.feature
@@ -7,11 +7,11 @@
   Scenario: Add an article to the watchlist
     Given I am viewing an unwatched page
     When I click the watch star
-    Then I see a toast with message about watching the page
-      And the watch star is selected
+    Then I should see a toast with message about watching the page
+      And the watch star should be selected
 
   Scenario: Remove an article from the watchlist
     Given I am viewing a watched page
     When I click the unwatch star
-    Then I see a toast with message about unwatching the page
-      And the watch star is not selected
+    Then I should see a toast with message about unwatching the page
+      And the watch star should not be selected

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id78023b814f97185646711d919969178c15c5f6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <cmcma...@wikimedia.org>

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

Reply via email to