Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/151806
Change subject: WIP: Write browser test for talk page notificaitons
......................................................................
WIP: Write browser test for talk page notificaitons
Change-Id: I12d1c6867d996c19fbd836658e87acd418e03527
---
M tests/browser/features/notifications.feature
M tests/browser/features/step_definitions/notifications_steps.rb
2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/06/151806/1
diff --git a/tests/browser/features/notifications.feature
b/tests/browser/features/notifications.feature
index 09a6784..7ca99dc 100644
--- a/tests/browser/features/notifications.feature
+++ b/tests/browser/features/notifications.feature
@@ -1,6 +1,11 @@
@chrome @firefox @en.m.wikipedia.beta.wmflabs.org
Feature: Notification types
+ Scenario: Talk page message triggers sign up notification
+ Given I write a message anonymously on the selenium users talk page
+ And I am logged in
+ Then I have new notifications
+
Scenario: New user gets a sign up notification
Given I am logged in as a new user
And I am on the "Selenium Echo flyout test page" page
diff --git a/tests/browser/features/step_definitions/notifications_steps.rb
b/tests/browser/features/step_definitions/notifications_steps.rb
index a65b0f5..5d25fed 100644
--- a/tests/browser/features/step_definitions/notifications_steps.rb
+++ b/tests/browser/features/step_definitions/notifications_steps.rb
@@ -1,3 +1,8 @@
+Given(/^I write a message anonymously on the selenium users talk page$/) do
+ # arggg can't create a page anonymously or append text
+ on(APIPage).client.create_page('User talk:' + ENV["MEDIAWIKI_USER"], 'Hello
Selenium! ~~~~')
+end
+
Then(/^I have new notifications$/) do
on(ArticlePage).flyout_link_element.when_present.class_name.should match
'mw-echo-unread-notifications'
end
--
To view, visit https://gerrit.wikimedia.org/r/151806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I12d1c6867d996c19fbd836658e87acd418e03527
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits