From 5736f8e0a98f33e08e350fc8b2d9c98b45b4ae20 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 23 Dec 2015 15:56:05 -0800 Subject: [PATCH] Add integration tests to each commit Additional changes: * Add a step to check JS has loaded * Update selector to work on non-vagrant instances Bug: T113620 Change-Id: Ib7579a43adc37b6e4add8b0ab75f99b6ab994bb6 --- Gemfile | 2 +- Gemfile.lock | 15 +++++++++------ tests/browser/LocalSettings.php | 2 ++ tests/browser/features/mmv.download.feature | 2 +- tests/browser/features/mmv.navigation.feature | 2 +- tests/browser/features/mmv.options.feature | 2 +- .../step_definitions/mmv_options_steps.rb | 2 +- .../features/step_definitions/mmv_steps.rb | 18 ++++++++++++++++-- .../samples/MediaViewerE2ETest.wikitext | 14 ++++++++++++++ 9 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 tests/browser/LocalSettings.php create mode 100644 tests/browser/samples/MediaViewerE2ETest.wikitext diff --git a/Gemfile b/Gemfile index c78fc6753..a3e2a9448 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'mediawiki_selenium', '~> 1.6.3' +gem 'mediawiki_selenium', '~> 1.6.4' gem 'rubocop', '~> 0.35.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index cb1111237..c26b10bbd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,7 +5,7 @@ GEM astrolabe (1.3.1) parser (~> 2.2) builder (3.2.2) - childprocess (0.5.8) + childprocess (0.5.9) ffi (~> 1.0, >= 1.0.11) cucumber (1.3.20) builder (>= 2.1.2) @@ -37,7 +37,7 @@ GEM mediawiki_api (0.5.0) faraday (~> 0.9, >= 0.9.0) faraday-cookie_jar (~> 0.0, >= 0.0.6) - mediawiki_selenium (1.6.3) + mediawiki_selenium (1.6.5) cucumber (~> 1.3, >= 1.3.20) headless (~> 2.0, >= 2.1.0) json (~> 1.8, >= 1.8.1) @@ -53,7 +53,7 @@ GEM multi_test (0.1.2) multipart-post (2.0.0) netrc (0.11.0) - page-object (1.1.0) + page-object (1.1.1) page_navigation (>= 0.9) selenium-webdriver (>= 2.44.0) watir-webdriver (>= 0.6.11) @@ -79,7 +79,7 @@ GEM tins (<= 1.6.0) ruby-progressbar (1.7.5) rubyzip (1.1.7) - selenium-webdriver (2.48.1) + selenium-webdriver (2.49.0) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -93,11 +93,14 @@ GEM watir-webdriver (0.9.1) selenium-webdriver (>= 2.46.2) websocket (1.2.2) - yml_reader (0.6) + yml_reader (0.7) PLATFORMS ruby DEPENDENCIES - mediawiki_selenium (~> 1.6.3) + mediawiki_selenium (~> 1.6.4) rubocop (~> 0.35.1) + +BUNDLED WITH + 1.10.6 diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php new file mode 100644 index 000000000..acd153c68 --- /dev/null +++ b/tests/browser/LocalSettings.php @@ -0,0 +1,2 @@ +PLEASE DO NOT EDIT THIS PAGE! IT NEEDS TO STAY THE SAME FOR THE PURPOSE OF AUTOMATED TESTING + +==Test Images== +Here are some sample images for testing different features of Media Viewer. + +[[File:Sunrise over fishing boats in Kerala.jpg|thumb|left|Sunrise over fishing boats]] [[File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24.jpg|thumb|Tropical Fish Aquarium]] [[File:Wikimania 2013 - Hong Kong - Photo 090.jpg|thumb|center|Hong Kong Harbor at night]] +
+ +[[File:Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_16.jpg|thumb|left|Nautilus Shell at California Academy of Sciences]] [[File:Multimedia_Team_-_Wikimedia_Foundation.jpg|thumb|center|Multimedia Team]] [[File:Zonotrichia atricapilla -British Columbia, Canada-8.jpg|thumb|Golden-crowned Sparrow]] +
+ +[[File:Multimedia Roundtable 5 Photo 2.jpg|thumb|left|Multimedia Roundtable]] [[File:Wikimedia Foundation - Team 1 - California Academy of Sciences.jpg|thumb|Wikimedia Team]] + +