Jdlrobson has uploaded a new change for review.

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

Change subject: QA: Make notifications test compatible with user_factory
......................................................................

QA: Make notifications test compatible with user_factory

Bug: T106879
Change-Id: If985a8668b5c9960d01d73d17a204f6de4fc4b16
---
M tests/browser/features/notification.feature
M tests/browser/features/step_definitions/notification_steps.rb
2 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/tests/browser/features/notification.feature 
b/tests/browser/features/notification.feature
index bc251f3..7d277fb 100644
--- a/tests/browser/features/notification.feature
+++ b/tests/browser/features/notification.feature
@@ -3,6 +3,7 @@
 
   Background:
     Given I am logged into the mobile website
+      And I have no notifications
     When I click on the notification icon
       And the notifications overlay appears
 
diff --git a/tests/browser/features/step_definitions/notification_steps.rb 
b/tests/browser/features/step_definitions/notification_steps.rb
index c89e964..db08234 100644
--- a/tests/browser/features/step_definitions/notification_steps.rb
+++ b/tests/browser/features/step_definitions/notification_steps.rb
@@ -12,6 +12,13 @@
   end
 end
 
+Given(/^I have no notifications$/) do
+  expect(on(ArticlePage).notifications_button_element.when_present).to 
be_visible
+  # This is somewhat hacky, but I don't want this test making use of Echo's 
APIs which may change
+  browser.execute_script("$( function () { $( '.notification-count' ).hide(); 
} );")
+end
+
+
 When(/^I click the notifications overlay close button$/) do
   sleep 1
   on(ArticlePage).notifications_overlay_close_button_element.when_present.click

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

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

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

Reply via email to