mediawiki-extensions-Popups/tests/browser
Volker E 0282b9648f Hovercards: Improve layout of settings dialog to design spec
Improving Hovercards' settings dialog to fulfill design specification.
Also fixing HTML structure by removing invalid `radiogroup` element and
adding missing `</div>` element, fixing related QUnit test.

Changes:
 * Add close icon instead of using text
 * Style header as a table for alignment
 * Remove redundant "OK" button and have it replace "Save" instead
 * Update text of "OK" button to "Done"
 * Fix description for translation of "Done" button
 * Fix qunit and selenium tests
 * Remove unnecessary markup and less
 * Add mediawiki-ui-button and mediawiki-ui-icon dependencies
 * Shrink dialog width some per design spec
 * Fix dialog horizontal position calculation to remove hard-coded value

Bug: T138612
Change-Id: I7395e3438836149becdd576942bdaf6f21b4163f
2016-08-10 14:01:36 -04:00
..
features Hovercards: Improve layout of settings dialog to design spec 2016-08-10 14:01:36 -04:00
samples Add browser test for hovering link 2016-04-19 13:12:24 +00:00
environments.yml Add browser test for hovering link 2016-04-19 13:12:24 +00:00
LocalSettings.php QA: Enable Hovercards beta feature in browser tests 2016-04-20 18:20:27 +00:00
README.mediawiki Add browser test for hovering link 2016-04-19 13:12:24 +00:00

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  # on Mac OS X Yosemite append ` --user-install -n~/bin`,
					   # where ~/bin is the install folder
  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 Popups 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