jenkins-bot has submitted this change and it was merged.
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, 7 insertions(+), 0 deletions(-)
Approvals:
Bmansurov: Looks good to me, approved
jenkins-bot: Verified
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..e2e5e35 100644
--- a/tests/browser/features/step_definitions/notification_steps.rb
+++ b/tests/browser/features/step_definitions/notification_steps.rb
@@ -12,6 +12,12 @@
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: merged
Gerrit-Change-Id: If985a8668b5c9960d01d73d17a204f6de4fc4b16
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: BarryTheBrowserTestBot <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits