Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358083 )

Change subject: CI should pass
......................................................................

CI should pass

Change-Id: I84ae3ea14191f672cabcd52020e80b0a40a72ce1
---
A .rubocop.yml
A Gemfile
A Gemfile.lock
M skin.json
A tests/browser/LocalSettings.php
A tests/browser/README.mediawiki
A tests/browser/ci.yml
A tests/browser/environments.yml
A tests/browser/features/helloworld.feature
9 files changed, 247 insertions(+), 1 deletion(-)


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

diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 0000000..cc32da4
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1 @@
+inherit_from: .rubocop_todo.yml
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..144b926
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+gem 'chunky_png', '~> 1.3.4'
+gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.3'
+gem 'page-object', '1.1.0'
+gem 'rake', '~> 10.4', '>= 10.4.2'
+gem 'rubocop', '~> 0.29.1', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..0b46fb7
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,109 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    ast (2.2.0)
+    astrolabe (1.3.1)
+      parser (~> 2.2)
+    builder (3.2.2)
+    childprocess (0.5.9)
+      ffi (~> 1.0, >= 1.0.11)
+    chunky_png (1.3.5)
+    cucumber (1.3.20)
+      builder (>= 2.1.2)
+      diff-lcs (>= 1.1.3)
+      gherkin (~> 2.12)
+      multi_json (>= 1.7.5, < 2.0)
+      multi_test (>= 0.1.2)
+    data_magic (0.22)
+      faker (>= 1.1.2)
+      yml_reader (>= 0.6)
+    diff-lcs (1.2.5)
+    domain_name (0.5.20161129)
+      unf (>= 0.0.5, < 1.0.0)
+    faker (1.6.3)
+      i18n (~> 0.5)
+    faraday (0.10.0)
+      multipart-post (>= 1.2, < 3)
+    faraday-cookie_jar (0.0.6)
+      faraday (>= 0.7.4)
+      http-cookie (~> 1.0.0)
+    faraday_middleware (0.10.1)
+      faraday (>= 0.7.4, < 1.0)
+    ffi (1.9.10)
+    gherkin (2.12.2)
+      multi_json (~> 1.3)
+    headless (2.3.1)
+    http-cookie (1.0.3)
+      domain_name (~> 0.5)
+    i18n (0.7.0)
+    json (1.8.3)
+    mediawiki_api (0.7.0)
+      faraday (~> 0.9, >= 0.9.0)
+      faraday-cookie_jar (~> 0.0, >= 0.0.6)
+      faraday_middleware (~> 0.10, >= 0.10.0)
+    mediawiki_selenium (1.7.3)
+      cucumber (~> 1.3, >= 1.3.20)
+      headless (~> 2.0, >= 2.1.0)
+      json (~> 1.8, >= 1.8.1)
+      mediawiki_api (~> 0.7, >= 0.7.0)
+      page-object (~> 1.0)
+      rest-client (~> 1.6, >= 1.6.7)
+      rspec-core (~> 2.14, >= 2.14.4)
+      rspec-expectations (~> 2.14, >= 2.14.4)
+      selenium-webdriver (< 3)
+      syntax (~> 1.2, >= 1.2.0)
+      thor (~> 0.19, >= 0.19.1)
+    mime-types (2.99.3)
+    multi_json (1.12.1)
+    multi_test (0.1.2)
+    multipart-post (2.0.0)
+    netrc (0.11.0)
+    page-object (1.1.0)
+      page_navigation (>= 0.9)
+      selenium-webdriver (>= 2.44.0)
+      watir-webdriver (>= 0.6.11)
+    page_navigation (0.9)
+      data_magic (>= 0.14)
+    parser (2.3.0.7)
+      ast (~> 2.2)
+    powerpack (0.1.1)
+    rainbow (2.1.0)
+    rake (10.5.0)
+    rest-client (1.8.0)
+      http-cookie (>= 1.0.2, < 2.0)
+      mime-types (>= 1.16, < 3.0)
+      netrc (~> 0.7)
+    rspec-core (2.99.2)
+    rspec-expectations (2.99.2)
+      diff-lcs (>= 1.1.3, < 2.0)
+    rubocop (0.29.1)
+      astrolabe (~> 1.3)
+      parser (>= 2.2.0.1, < 3.0)
+      powerpack (~> 0.1)
+      rainbow (>= 1.99.1, < 3.0)
+      ruby-progressbar (~> 1.4)
+    ruby-progressbar (1.8.0)
+    rubyzip (1.2.0)
+    selenium-webdriver (2.53.0)
+      childprocess (~> 0.5)
+      rubyzip (~> 1.0)
+      websocket (~> 1.0)
+    syntax (1.2.1)
+    thor (0.19.4)
+    unf (0.1.4)
+      unf_ext
+    unf_ext (0.0.7.2)
+    watir-webdriver (0.9.1)
+      selenium-webdriver (>= 2.46.2)
+    websocket (1.2.3)
+    yml_reader (0.7)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  chunky_png (~> 1.3.4)
+  mediawiki_selenium (~> 1.7, >= 1.7.3)
+  page-object (= 1.1.0)
+  rake (~> 10.4, >= 10.4.2)
+  rubocop (~> 0.29.1)
diff --git a/skin.json b/skin.json
index 9cec34b..2e8a4fd 100644
--- a/skin.json
+++ b/skin.json
@@ -21,7 +21,6 @@
     "minerva": "Minerva"
   },
   "author": [],
-  "callback": "MinervaHooks::onRegistration",
   "config": {},
   "descriptionmsg": "minerva-neue-skin-desc",
   "license-name": "GPL-2.0+",
diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/tests/browser/LocalSettings.php
@@ -0,0 +1 @@
+<?php
diff --git a/tests/browser/README.mediawiki b/tests/browser/README.mediawiki
new file mode 100644
index 0000000..cef0a39
--- /dev/null
+++ b/tests/browser/README.mediawiki
@@ -0,0 +1,73 @@
+= Setup =
+Include the LocalSettings.php in this folder into your MediaWiki 
LocalSettings.php.
+Note including this in a production instance is not advised given it fiddles 
with permissions.
+
+<pre>
+include_once "$IP/extensions/MobileFrontend/tests/browser/LocalSettings.php";
+</pre>
+
+Further tweaks may be necessary to run tests that are not tagged @integration:
+* Ensure you have [//www.mediawiki.org/wiki/Extension:ConfirmEdit 
Extension:ConfirmEdit] installed
+** and setup with FancyCaptcha
+* The VisualEditor, Cite, and Echo extensions should be installed to run the 
full suite of tests
+* Create an account Selenium_newuser which has an edit count of 0
+* 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 ====
+
+To run the Selenium tests you will have to install Ruby (for the exact
+version see Gemfile), the latest versions of RubyGems and Firefox.
+
+The easiest way to install Ruby on *nix is RVM (https://rvm.io/) and on
+Windows RubyInstaller (http://rubyinstaller.org/).
+
+Open terminal in tests/browser. Update RubyGems and install required
+gems with:
+
+  gem update --system
+  gem install bundler
+  bundle install
+
+Environment variables MEDIAWIKI_USER and MEDIAWIKI_PASSWORD are required for
+tests that require a logged in user. For local testing, create a test user on 
your local wiki
+and export the user and password as the values for those variables.
+For example:
+
+  export MEDIAWIKI_USER=<username here> # Linux/Unix/Mac
+  set MEDIAWIKI_USER=<username here> # Windows
+
+  export MEDIAWIKI_PASSWORD=<password here> # Linux/Unix/Mac
+  set MEDIAWIKI_PASSWORD=<password here> # Windows
+
+In addition to this create another user which will be reserved for new uploads
+"Selenium_newuser". The password for this user should be the same as
+MEDIAWIKI_PASSWORD
+
+Tests that use the "Given I create a random page using the API" step need to 
set
+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:
+
+  make cucumber
+
+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
+only the watchlist tests:
+
+  bundle exec cucumber features/watchstar.feature
+
+XML report (for Jenkins) is created at tests/browser/reports/junit.
+
+Jenkins is hosted at https://wmf.ci.cloudbees.com/ and it drives
+browsers at http://saucelabs.com/
+
+For more information about running Selenium tests please see
+https://github.com/wikimedia/mediawiki-selenium
diff --git a/tests/browser/ci.yml b/tests/browser/ci.yml
new file mode 100644
index 0000000..c2eca93
--- /dev/null
+++ b/tests/browser/ci.yml
@@ -0,0 +1,9 @@
+BROWSER:
+  - chrome
+  - firefox
+
+MEDIAWIKI_ENVIRONMENT:
+  - beta
+
+PLATFORM:
+  - Linux
diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
new file mode 100644
index 0000000..a22dbc9
--- /dev/null
+++ b/tests/browser/environments.yml
@@ -0,0 +1,45 @@
+# Customize this configuration as necessary to provide defaults for various
+# test environments.
+#
+# The set of defaults to use is determined by the MEDIAWIKI_ENVIRONMENT
+# environment variable.
+#
+#   export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
+#   bundle exec cucumber
+#
+# Additional variables set by the environment will override the corresponding
+# defaults defined here.
+#
+#   export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
+#   export MEDIAWIKI_USER=Selenium_user2
+#   bundle exec cucumber
+#
+mw-vagrant-host: &default
+  mediawiki_url: http://127.0.0.1:8080/wiki/
+  user_factory: true
+
+barry:
+  browser: phantomjs
+  user_factory: false
+  # mediawiki_url: Will be set manually
+
+mw-vagrant-guest:
+  mediawiki_url: http://127.0.0.1/wiki/
+  user_factory: true
+
+beta:
+  mediawiki_url: https://en.m.wikipedia.beta.wmflabs.org/wiki/
+  mediawiki_user: Selenium_user
+  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
+
+test2:
+  mediawiki_url: https://test2.m.wikipedia.org/wiki/
+  mediawiki_user: Selenium_user
+  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
+
+integration:
+  browser: chrome
+  user_factory: true
+  # mediawiki_url: THIS WILL BE SET BY JENKINS
+
+default: *default
diff --git a/tests/browser/features/helloworld.feature 
b/tests/browser/features/helloworld.feature
new file mode 100644
index 0000000..da8adaa
--- /dev/null
+++ b/tests/browser/features/helloworld.feature
@@ -0,0 +1,2 @@
+@chrome @firefox @test2.m.wikipedia.org @vagrant @integration
+Feature: All good.

-- 
To view, visit https://gerrit.wikimedia.org/r/358083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84ae3ea14191f672cabcd52020e80b0a40a72ce1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to