jenkins-bot has submitted this change and it was merged.

Change subject: QA: Add missing browser test steps
......................................................................


QA: Add missing browser test steps

Change-Id: I3a54902ae1cf2d2b7263243722bb0b7f57bcba95
---
M tests/browser/features/messages.feature
M tests/browser/features/step_definitions/notifications_steps.rb
2 files changed, 16 insertions(+), 2 deletions(-)

Approvals:
  Spage: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/browser/features/messages.feature 
b/tests/browser/features/messages.feature
index f95af12..bb43b52 100644
--- a/tests/browser/features/messages.feature
+++ b/tests/browser/features/messages.feature
@@ -4,12 +4,15 @@
   # Scenarios which trigger notifications
   Scenario: Mark all as unread
     Given I am logged in with no notifications
+      # Trigger a message notification...
       And I have a Flow message
+      # ... and an alert notification.
       And another user mentions me on the wiki
       And I am on the "Selenium Echo flyout test page" page
+      And I have new notifications
       And I click the notification flyout button
       And I see the notification flyout
-      And I have unread alert notifications
     When I click the mark all as read button
       And I am on the "Selenium Echo flyout test page" page
+    # I still have an alert notification.
     Then I have new notifications
diff --git a/tests/browser/features/step_definitions/notifications_steps.rb 
b/tests/browser/features/step_definitions/notifications_steps.rb
index 02ce5a3..71d04fe 100644
--- a/tests/browser/features/step_definitions/notifications_steps.rb
+++ b/tests/browser/features/step_definitions/notifications_steps.rb
@@ -14,6 +14,13 @@
   make_page_with_user( title, text, get_session_username() )
 end
 
+Given(/^another user has linked to a page I created from another page$/) do
+  title = 'Selenium Echo link test ' + @random_string
+  make_page_with_user_a(title, "Selenium test page. Feel free to delete me.")
+  title2 = title + ' ' + @random_string
+  make_page_with_user_b(title2, "I am linking to [[" + title + "]].")
+end
+
 Given(/^another user writes on my talk page$/) do
   make_page_with_user_b("User talk:" + get_session_username(),
     "== Barnstar ==\nHello Selenium, here is a barnstar for all your testing! 
" + @random_string + "~~~~\n")
@@ -46,7 +53,11 @@
   client.action( 'echomarkread', token_type: 'edit', all: '1' )
 
   step 'I am logged in my non-shared account'
-  on(ArticlePage).flyout_link_element.class_name.should_not match 
'mw-echo-unread-notifications'
+  step 'I have no new notifications'
+end
+
+Then(/^I have no new notifications$/) do
+  on(ArticlePage).flyout_link_element.when_present.class_name.should_not match 
'mw-echo-unread-notifications'
 end
 
 Then(/^I have new notifications$/) do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a54902ae1cf2d2b7263243722bb0b7f57bcba95
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to