From 6a0192bf372c3c27622abba9d6a8b8b1eec6fbe6 Mon Sep 17 00:00:00 2001 From: Ammar Date: Tue, 1 Oct 2019 02:19:38 +0100 Subject: [PATCH] Remove "uploads" link from userpages *This commit also removes it from tests and references Bug: T233985 Change-Id: I0d7eb72a2663f1d1138afe09124a154ad0502498 --- i18n/en.json | 2 -- i18n/qqq.json | 2 -- includes/skins/SkinMinerva.php | 4 ---- includes/skins/user_page_links.mustache | 3 --- tests/browser/features/step_definitions/user_page_steps.rb | 4 ---- tests/browser/features/support/pages/user_page.rb | 3 --- tests/selenium/features/step_definitions/index.js | 5 ++--- tests/selenium/features/step_definitions/user_page_steps.js | 6 +----- tests/selenium/features/user_page.feature | 1 - tests/selenium/specs/user_page.js | 3 +-- 10 files changed, 4 insertions(+), 29 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index 9ee19bc96..26141afa9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -46,14 +46,12 @@ "mobile-frontend-user-page-contributions": "Contributions", "mobile-frontend-user-page-member-since": "{{GENDER:$2|Joined}} $1", "mobile-frontend-user-page-talk": "Talk", - "mobile-frontend-user-page-uploads": "Uploads", "minerva-user-menu-button": "User menu", "minerva-page-actions-overflow": "Secondary page actions submenu", "minerva-page-actions-info": "Page information", "minerva-page-actions-permalink": "Permanent link", "minerva-page-actions-backlinks": "What links here", "minerva-page-actions-cite": "Cite page", - "minerva-page-actions-uploads": "Uploads", "minerva-page-actions-user-groups": "User groups", "minerva-page-actions-logs": "Logs", "minerva-page-actions-wikibase": "{{WBREPONAME}} item", diff --git a/i18n/qqq.json b/i18n/qqq.json index bc7ad618f..e5c892a4e 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -56,14 +56,12 @@ "mobile-frontend-user-page-contributions": "Text of the link to the user's contributions page\n{{Identical|Contribution}}", "mobile-frontend-user-page-member-since": "Message below the heading. $1 is the user registration date. $2 is the gender associated with the user account.", "mobile-frontend-user-page-talk": "Text of the link to the user's talk page\n{{Identical|Talk}}", - "mobile-frontend-user-page-uploads": "Text of the link to the user's uploads page\n{{Identical|Upload}}", "minerva-user-menu-button": "Text describing the user menu", "minerva-page-actions-overflow": "Text describing the secondary page menu button's action", "minerva-page-actions-info": "In the secondary page menu, the page information button label", "minerva-page-actions-permalink": "In the secondary page menu, the permanent link button label\n\nSee also:\n* {{msg-mw|permalink}}", "minerva-page-actions-backlinks": "In the secondary page menu, the 'what links here' incoming links button label\n\nSee also:\n* {{msg-mw|whatlinkshere}}", "minerva-page-actions-cite": "In the secondary page menu, the cite this page button label\n\nSee also:\n* {{msg-mw|citethispage-link}}", - "minerva-page-actions-uploads": "In the secondary page menu for user pages, the user uploads button label", "minerva-page-actions-user-groups": "In the secondary page menu for user pages, the user groups button label", "minerva-page-actions-logs": "In the secondary page menu for user pages, the user logs button label", "minerva-page-actions-wikibase": "In the secondary page menu, the wikibase item button label", diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 497ae122a..2b4ecebbb 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -604,10 +604,6 @@ class SkinMinerva extends SkinTemplate { 'Contributions', $pageUser )->getLocalURL(), 'contributionsPageTitle' => $this->msg( 'mobile-frontend-user-page-contributions' )->escaped(), - 'uploadsPageLink' => SpecialPage::getTitleFor( - 'Uploads', $pageUser )->getLocalURL(), - 'uploadsPageTitle' => $this->msg( - 'mobile-frontend-user-page-uploads' )->escaped(), ]; $templateParser = new TemplateParser( __DIR__ ); $tpl->set( 'postheadinghtml', diff --git a/includes/skins/user_page_links.mustache b/includes/skins/user_page_links.mustache index 8440bc1e7..c42d06611 100644 --- a/includes/skins/user_page_links.mustache +++ b/includes/skins/user_page_links.mustache @@ -8,7 +8,4 @@
  • {{contributionsPageTitle}}
  • -
  • - {{uploadsPageTitle}} -
  • diff --git a/tests/browser/features/step_definitions/user_page_steps.rb b/tests/browser/features/step_definitions/user_page_steps.rb index a10c0cd37..04fab4c24 100644 --- a/tests/browser/features/step_definitions/user_page_steps.rb +++ b/tests/browser/features/step_definitions/user_page_steps.rb @@ -18,7 +18,3 @@ end Then(/^there should be a link to my talk page$/) do expect(on(UserPage).talk_link_element).to be_visible end - -Then(/^there should be a link to my uploads$/) do - expect(on(UserPage).uploads_link_element).to be_visible -end diff --git a/tests/browser/features/support/pages/user_page.rb b/tests/browser/features/support/pages/user_page.rb index 1c82d8efa..06718da74 100644 --- a/tests/browser/features/support/pages/user_page.rb +++ b/tests/browser/features/support/pages/user_page.rb @@ -11,7 +11,4 @@ class UserPage < ArticlePage a(:contributions_link) do |page| page.user_links_element.element.a(href: /Special:Contributions\//) end - a(:uploads_link) do |page| - page.user_links_element.element.a(href: /Special:Uploads\//) - end end diff --git a/tests/selenium/features/step_definitions/index.js b/tests/selenium/features/step_definitions/index.js index aff3b9e62..e4df72b61 100644 --- a/tests/selenium/features/step_definitions/index.js +++ b/tests/selenium/features/step_definitions/index.js @@ -28,8 +28,8 @@ const { defineSupportCode } = require( 'cucumber' ), { theWatchstarShouldNotBeSelected, theWatchstarShouldBeSelected, iClickTheWatchstar, iClickTheUnwatchStar } = require( './watch_steps' ), - { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyUploads, - thereShouldBeALinkToMyContributions, thereShouldBeALinkToMyTalkPage + { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyContributions, + thereShouldBeALinkToMyTalkPage } = require( './user_page_steps' ), { iClickTheSearchIcon, @@ -130,7 +130,6 @@ defineSupportCode( function ( { Then, When, Given } ) { // user page Given( /^I visit my user page$/, iVisitMyUserPage ); When( /^I should be on my user page$/, iShouldBeOnMyUserPage ); - Then( /^there should be a link to my uploads$/, thereShouldBeALinkToMyUploads ); Then( /^there should be a link to my contributions$/, thereShouldBeALinkToMyContributions ); Then( /^there should be a link to my talk page$/, thereShouldBeALinkToMyTalkPage ); diff --git a/tests/selenium/features/step_definitions/user_page_steps.js b/tests/selenium/features/step_definitions/user_page_steps.js index c02eb6ae3..40fc56e83 100644 --- a/tests/selenium/features/step_definitions/user_page_steps.js +++ b/tests/selenium/features/step_definitions/user_page_steps.js @@ -13,10 +13,6 @@ const iShouldBeOnMyUserPage = () => { theTextOfTheFirstHeadingShouldBe( username ); }; -const thereShouldBeALinkToMyUploads = () => { - assert.strictEqual( ArticlePage.user_links_element.element( '=Uploads' ).isVisible(), true ); -}; - const thereShouldBeALinkToMyContributions = () => { assert.strictEqual( ArticlePage.user_links_element.element( '=Contributions' ).isVisible(), true ); }; @@ -24,5 +20,5 @@ const thereShouldBeALinkToMyTalkPage = () => { assert.strictEqual( ArticlePage.user_links_element.element( '=Talk' ).isVisible(), true ); }; -module.exports = { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyUploads, +module.exports = { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyContributions, thereShouldBeALinkToMyTalkPage }; diff --git a/tests/selenium/features/user_page.feature b/tests/selenium/features/user_page.feature index d9a0c1be3..0ae509410 100644 --- a/tests/selenium/features/user_page.feature +++ b/tests/selenium/features/user_page.feature @@ -10,4 +10,3 @@ Feature: User: Then I should be on my user page And there should be a link to my talk page And there should be a link to my contributions - And there should be a link to my uploads diff --git a/tests/selenium/specs/user_page.js b/tests/selenium/specs/user_page.js index 6f04fe691..5c98a2c60 100644 --- a/tests/selenium/specs/user_page.js +++ b/tests/selenium/specs/user_page.js @@ -1,5 +1,5 @@ const { iAmLoggedIntoTheMobileWebsite } = require( '../features/step_definitions/common_steps' ), - { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyUploads, + { iVisitMyUserPage, iShouldBeOnMyUserPage, thereShouldBeALinkToMyContributions, thereShouldBeALinkToMyTalkPage } = require( '../features/step_definitions/user_page_steps' ); @@ -16,6 +16,5 @@ describe( 'User:', () => { iShouldBeOnMyUserPage(); thereShouldBeALinkToMyTalkPage(); thereShouldBeALinkToMyContributions(); - thereShouldBeALinkToMyUploads(); } ); } );