Mgrover has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92488
Change subject: Add conditional for notification overlay to display or not
based on whether echo is available
......................................................................
Add conditional for notification overlay to display or not based on whether
echo is available
Change-Id: Ie869d81beebac19fe0eb9142e7e6b2993cd8df40
---
M tests/browser/features/step_definitions/notification_steps.rb
M tests/browser/features/support/pages/home_page.rb
2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/88/92488/1
diff --git a/tests/browser/features/step_definitions/notification_steps.rb
b/tests/browser/features/step_definitions/notification_steps.rb
index ec24c52..94c0669 100644
--- a/tests/browser/features/step_definitions/notification_steps.rb
+++ b/tests/browser/features/step_definitions/notification_steps.rb
@@ -3,9 +3,13 @@
end
Then /^I go to the notifications page$/ do
- @browser.url.should match Regexp.escape('Special:Notifications')
+ on(HomePage).notification_title_element.when_present.should exist
end
Then /^the notifications overlay appears$/ do
- on(HomePage).notifications_archive_link_element.when_present.should exist
+ if @browser.url.match Regexp.escape('Special:Notifications')
+ on(HomePage).notifications_archive_link_element.should_not exist
+ else
+ on(HomePage).notifications_archive_link_element.should exist
+ end
end
diff --git a/tests/browser/features/support/pages/home_page.rb
b/tests/browser/features/support/pages/home_page.rb
index 8a37e9b..cee16d3 100644
--- a/tests/browser/features/support/pages/home_page.rb
+++ b/tests/browser/features/support/pages/home_page.rb
@@ -47,6 +47,7 @@
a(:edit_history_link, id:'mw-mf-last-modified')
a(:notification_button, id:'secondary-button')
a(:notifications_archive_link, id:'notifications-archive-link')
+ h1(:notification_title, text: 'Notifications')
a(:edit_icon_enabled, text:'Edit')
li(:mobile_view, id:'footer-places-mobileview')
end
--
To view, visit https://gerrit.wikimedia.org/r/92488
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie869d81beebac19fe0eb9142e7e6b2993cd8df40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Mgrover <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits