[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Hygiene: Remove and update references to MobileFrontend

2017-07-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365422 )

Change subject: Hygiene: Remove and update references to MobileFrontend
..


Hygiene: Remove and update references to MobileFrontend

Changes:
* Update docs
* Update browser test artifacts
* Update comments
* Update phpunit test groups
* Update phpunit test namespace
* Update `die` when MobileFrontend not installed
* Remove the migrate script which is no longer needed

Change-Id: I83432b3f7f0bcd07ed08259972b8ff89147104b6
---
M includes/Minerva.hooks.php
D scripts/README.txt
D scripts/migrate.py
M tests/browser/README.mediawiki
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/create_page_api_steps.rb
M tests/phpunit/MenuBuilderTest.php
M tests/phpunit/skins/SkinMinervaPageActionsTest.php
M tests/phpunit/skins/SkinMinervaTest.php
M tests/phpunit/skins/SkinUserPageHelperTest.php
10 files changed, 26 insertions(+), 264 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jdlrobson: Looks good to me, approved



diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php
index 2f953de..9f8c73e 100644
--- a/includes/Minerva.hooks.php
+++ b/includes/Minerva.hooks.php
@@ -5,8 +5,6 @@
 
 /**
  * Hook handlers for Minerva skin.
- * Hooks specific to all skins running in mobile mode should belong in
- * MobileFrontend.hooks.php
  *
  * Hook handler method names should be in the form of:
  * on()
@@ -38,7 +36,7 @@
$wgResourceLoaderLESSImportPaths[] = dirname( __DIR__ ) . 
"/minerva.less/";
 
if ( !ExtensionRegistry::getInstance()->isLoaded( 
'MobileFrontend' ) ) {
-   die( 'This version of the MobileFrontend extension 
requires MediaWiki 1.25+' );
+   die( 'This version of the Minerva skin requires 
MobileFrontend' );
}
// Setup alias for compatibility with SkinMinervaNeue.
if ( !class_exists( 'SkinMinervaNeue' ) ) {
@@ -62,7 +60,7 @@
'skins.minerva.notifications.badge'
],
'localBasePath' => dirname( __DIR__ ),
-   'remoteExtPath' => 'MobileFrontend',
+   'remoteExtPath' => 'MinervaNeue',
'targets' => [ 'mobile', 'desktop' ],
'scripts' => [

'tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js'
diff --git a/scripts/README.txt b/scripts/README.txt
deleted file mode 100644
index 04a844b..000
--- a/scripts/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Porting Minerva code from MobileFrontend to Minerva:
-* Make sure this repository is in your MediaWiki skins directory
-* Make sure MobileFrontend is installed in extensions/MobileFrontend in your 
MediaWiki install
-* Create commits for both MobileFrontend and Minerva to handle the move.
-* Run:
-   > python3 scripts/migrate.python
diff --git a/scripts/migrate.py b/scripts/migrate.py
deleted file mode 100644
index d5b9fc2..000
--- a/scripts/migrate.py
+++ /dev/null
@@ -1,239 +0,0 @@
-mfdir = '../../extensions/MobileFrontend'
-
-import json, shutil, os, subprocess, time
-from collections import OrderedDict
-import sys
-
-DRY_RUN = False
-f = open(mfdir +'/extension.json', 'r')
-mfExtensionData = json.load(f, object_pairs_hook=OrderedDict)
-f.close()
-f = open('skin.json', 'r')
-minervaSkinData = json.load(f, object_pairs_hook=OrderedDict)
-f.close()
-
-messages = [ 'mobile-frontend-placeholder', 'skinname-minerva',
-  'mobile-frontend-talk-back-to-userpage',
-  'mobile-frontend-talk-back-to-projectpage',
-  'mobile-frontend-talk-back-to-filepage',
-  'mobile-frontend-talk-back-to-page',
-  'mobile-frontend-editor-edit',
-  'mobile-frontend-user-newmessages',
-  'mobile-frontend-main-menu-contributions',
-  'mobile-frontend-main-menu-watchlist',
-  'mobile-frontend-main-menu-settings',
-  'mobile-frontend-home-button',
-  'mobile-frontend-random-button',
-  'mobile-frontend-main-menu-nearby',
-  'mobile-frontend-main-menu-logout',
-  'mobile-frontend-main-menu-login',
-  'mobile-frontend-history',
-  'mobile-frontend-user-page-member-since',
-  'mobile-frontend-main-menu-button-tooltip',
-  'mobile-frontend-language-article-heading',
-  'mobile-frontend-pageaction-edit-tooltip',
-  'mobile-frontend-language-article-heading',
-  'mobile-frontend-user-page-talk',
-  'mobile-frontend-user-page-contributions',
-  'mobile-frontend-user-page-uploads'
-]
-
-def reset():
-# Do cleanup in preparation for patchsets it will make.
-subprocess.call(["git clean -fd"], shell=True)
-subprocess.call(["git stash && git clean -fd"], shell=True, cwd=mfdir)
-if not DRY_RUN:
-subprocess.call(["rm -rf includes && rm -rf resources && rm -rf 
minerva.less && rm -rf i18n && rm -rf skinStyles && rm -rf 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Hygiene: Remove and update references to MobileFrontend

2017-07-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365422 )

Change subject: Hygiene: Remove and update references to MobileFrontend
..

Hygiene: Remove and update references to MobileFrontend

Changes:
* namespace tests to MinervaNeue
* Update docs
* Update browser test artifacts
* Update comments

Change-Id: I83432b3f7f0bcd07ed08259972b8ff89147104b6
---
M includes/Minerva.hooks.php
M tests/browser/README.mediawiki
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/create_page_api_steps.rb
M tests/phpunit/MenuBuilderTest.php
M tests/phpunit/skins/SkinMinervaPageActionsTest.php
M tests/phpunit/skins/SkinMinervaTest.php
M tests/phpunit/skins/SkinUserPageHelperTest.php
8 files changed, 16 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/22/365422/1

diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php
index dcb2894..804ee13 100644
--- a/includes/Minerva.hooks.php
+++ b/includes/Minerva.hooks.php
@@ -5,8 +5,6 @@
 
 /**
  * Hook handlers for Minerva skin.
- * Hooks specific to all skins running in mobile mode should belong in
- * MobileFrontend.hooks.php
  *
  * Hook handler method names should be in the form of:
  * on()
@@ -66,7 +64,7 @@
'skins.minerva.notifications.badge'
],
'localBasePath' => dirname( __DIR__ ),
-   'remoteExtPath' => 'MobileFrontend',
+   'remoteExtPath' => 'MinervaNeue',
'targets' => [ 'mobile', 'desktop' ],
'scripts' => [

'tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js'
diff --git a/tests/browser/README.mediawiki b/tests/browser/README.mediawiki
index 4c8af26..8874a78 100644
--- a/tests/browser/README.mediawiki
+++ b/tests/browser/README.mediawiki
@@ -7,7 +7,7 @@
 Note including this in a production instance is not advised given it fiddles 
with permissions.
 
 
-include_once "$IP/extensions/MobileFrontend/tests/browser/LocalSettings.php";
+include_once "$IP/skins/MinervaNeue/tests/browser/LocalSettings.php";
 
 
 Further tweaks may be necessary to run tests that are not tagged @integration:
@@ -18,11 +18,6 @@
 * Create an account and store the username in MEDIAWIKI_USER which has
 ** an edit count of greater than 0
 ** Ensure user has bureaucrat and admin rights (set via Special:UserRights)
-
-= MobileFrontend Extension =
-
-For general information about MobileFrontend Extension please see
-README.mediawiki file in the root of the repository.
 
  Selenium tests 
 
@@ -58,9 +53,9 @@
 the MEDIAWIKI_API_URL environment variable, e.g.
 export MEDIAWIKI_API_URL=http://en.wikipedia.beta.wmflabs.org/w/api.php
 
-Run the tests from the MobileFrontend directory with:
+Run the tests from the Minerva directory with:
 
-  make cucumber
+  bundle exec cucumber tests/browser/features
 
 If you want to run a single set of tests, go to the tests/browser directory and
 call 'bundle exec cucumber' with the path to the test file. For example, to run
diff --git a/tests/browser/features/step_definitions/common_steps.rb 
b/tests/browser/features/step_definitions/common_steps.rb
index a27d3fc..5139e54 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -62,7 +62,7 @@
 end
 
 Given(/^the "(.*?)" page is protected\.$/) do |page|
-  api.protect_page(page, 'MobileFrontend Selenium test protected this page')
+  api.protect_page(page, 'MinervaNeue Selenium test protected this page')
 end
 
 When(/^I click the browser back button$/) do
diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb 
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index 2cbb858..7faf837 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -1,6 +1,6 @@
 # export MEDIAWIKI_API_URL = http://en.wikipedia.beta.wmflabs.org/w/api.php
 Given(/^I go to a page that has references$/) do
-  wikitext = "MobileFrontend is a MediaWiki extension.
+  wikitext = "MinervaNeue is a MediaWiki skin.
 {{#tag:ref|This is a note.This is a nested ref.|group=note}}
 ==Notes==
 
diff --git a/tests/phpunit/MenuBuilderTest.php 
b/tests/phpunit/MenuBuilderTest.php
index da6430c..dc9b07c 100644
--- a/tests/phpunit/MenuBuilderTest.php
+++ b/tests/phpunit/MenuBuilderTest.php
@@ -6,7 +6,7 @@
 use MediaWiki\Minerva\MenuEntry;
 
 /**
- * @group MobileFrontend
+ * @group MinervaNeue
  */
 class MenuTest extends \PHPUnit_Framework_TestCase {
private $homeComponent = [
diff --git a/tests/phpunit/skins/SkinMinervaPageActionsTest.php 
b/tests/phpunit/skins/SkinMinervaPageActionsTest.php
index