Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/220816
Change subject: Don't show collections link in stable
......................................................................
Don't show collections link in stable
Bug: T103048
Change-Id: I22785d144669ec5320c8f1f21bb6f599362eaeba
---
M resources/ext.gather.init/init.js
M tests/browser/features/menu.feature
M tests/browser/features/step_definitions/menu_steps.rb
3 files changed, 15 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather
refs/changes/16/220816/1
diff --git a/resources/ext.gather.init/init.js
b/resources/ext.gather.init/init.js
index 38cbb9e..4efa621 100644
--- a/resources/ext.gather.init/init.js
+++ b/resources/ext.gather.init/init.js
@@ -163,7 +163,9 @@
skin.emit( 'changed' );
}
} else {
- revealCollectionsInMainMenu();
+ if ( useGatherStar ) {
+ revealCollectionsInMainMenu();
+ }
}
}( mw.mobileFrontend, jQuery ) );
diff --git a/tests/browser/features/menu.feature
b/tests/browser/features/menu.feature
index 5811a8c..282f44d 100644
--- a/tests/browser/features/menu.feature
+++ b/tests/browser/features/menu.feature
@@ -3,14 +3,20 @@
Background:
Given I am using the mobile site
- And I have Gather
Scenario: Check links in menu
+ And I have Gather
And I am on the "Main Page" page
When I click on the main navigation button
Then I should see a link to "Collections" in the main navigation menu
Scenario: Check links in menu
+ And I have Gather
And I am on the "Special:MobileOptions" page
When I click on the main navigation button
- Then I should see a link to "Collections" in the main navigation menu
\ No newline at end of file
+ Then I should see a link to "Collections" in the main navigation menu
+
+Scenario: Check links in menu for stable users
+ And I am on the "Special:MobileOptions" page
+ When I click on the main navigation button
+ Then I should not see a link to "Collections" in the main navigation menu
\ No newline at end of file
diff --git a/tests/browser/features/step_definitions/menu_steps.rb
b/tests/browser/features/step_definitions/menu_steps.rb
index 7ca864c..d33e904 100644
--- a/tests/browser/features/step_definitions/menu_steps.rb
+++ b/tests/browser/features/step_definitions/menu_steps.rb
@@ -5,3 +5,7 @@
Then(/^I should see a link to "(.*?)" in the main navigation menu$/) do |text|
expect(on(ArticlePage).navigation_element.link_element(text: text)).to
be_visible
end
+
+Then(/^I should not see a link to "(.*?)" in the main navigation menu$/) do
|text|
+ expect(on(ArticlePage).navigation_element.link_element(text: text)).not_to
be_visible
+end
--
To view, visit https://gerrit.wikimedia.org/r/220816
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I22785d144669ec5320c8f1f21bb6f599362eaeba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits