mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 00:03:56 +00:00
Migration of browsertests* Jenkins jobs to selenium* jobs
selenium* jobs are a new way of running Ruby based Selenium tests. The jobs are triggered daily. Bug: T128190 Change-Id: If0e6b61c9e3d52005d1851ca49ef65babd002919
This commit is contained in:
parent
5ecc69c3b9
commit
afe0397991
3
Gemfile
3
Gemfile
|
@ -1,4 +1,5 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'mediawiki_selenium', '~> 1.6.4'
|
gem 'mediawiki_selenium', '~> 1.7'
|
||||||
|
gem 'rake', '~> 11.1', '>= 11.1.1'
|
||||||
gem 'rubocop', '~> 0.35.1', require: false
|
gem 'rubocop', '~> 0.35.1', require: false
|
||||||
|
|
19
Gemfile.lock
19
Gemfile.lock
|
@ -1,7 +1,7 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
ast (2.2.0)
|
ast (2.1.0)
|
||||||
astrolabe (1.3.1)
|
astrolabe (1.3.1)
|
||||||
parser (~> 2.2)
|
parser (~> 2.2)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
|
@ -37,7 +37,7 @@ GEM
|
||||||
mediawiki_api (0.5.0)
|
mediawiki_api (0.5.0)
|
||||||
faraday (~> 0.9, >= 0.9.0)
|
faraday (~> 0.9, >= 0.9.0)
|
||||||
faraday-cookie_jar (~> 0.0, >= 0.0.6)
|
faraday-cookie_jar (~> 0.0, >= 0.0.6)
|
||||||
mediawiki_selenium (1.6.5)
|
mediawiki_selenium (1.7.0)
|
||||||
cucumber (~> 1.3, >= 1.3.20)
|
cucumber (~> 1.3, >= 1.3.20)
|
||||||
headless (~> 2.0, >= 2.1.0)
|
headless (~> 2.0, >= 2.1.0)
|
||||||
json (~> 1.8, >= 1.8.1)
|
json (~> 1.8, >= 1.8.1)
|
||||||
|
@ -49,7 +49,7 @@ GEM
|
||||||
syntax (~> 1.2, >= 1.2.0)
|
syntax (~> 1.2, >= 1.2.0)
|
||||||
thor (~> 0.19, >= 0.19.1)
|
thor (~> 0.19, >= 0.19.1)
|
||||||
mime-types (2.99.1)
|
mime-types (2.99.1)
|
||||||
multi_json (1.11.2)
|
multi_json (1.11.3)
|
||||||
multi_test (0.1.2)
|
multi_test (0.1.2)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
|
@ -59,10 +59,11 @@ GEM
|
||||||
watir-webdriver (>= 0.6.11)
|
watir-webdriver (>= 0.6.11)
|
||||||
page_navigation (0.9)
|
page_navigation (0.9)
|
||||||
data_magic (>= 0.14)
|
data_magic (>= 0.14)
|
||||||
parser (2.3.0.7)
|
parser (2.2.3.0)
|
||||||
ast (~> 2.2)
|
ast (>= 1.1, < 3.0)
|
||||||
powerpack (0.1.1)
|
powerpack (0.1.1)
|
||||||
rainbow (2.1.0)
|
rainbow (2.0.0)
|
||||||
|
rake (11.1.1)
|
||||||
rest-client (1.8.0)
|
rest-client (1.8.0)
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 3.0)
|
||||||
|
@ -98,5 +99,9 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
mediawiki_selenium (~> 1.6.4)
|
mediawiki_selenium (~> 1.7)
|
||||||
|
rake (~> 11.1, >= 11.1.1)
|
||||||
rubocop (~> 0.35.1)
|
rubocop (~> 0.35.1)
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
1.10.6
|
||||||
|
|
3
Rakefile
3
Rakefile
|
@ -8,6 +8,9 @@ RuboCop::RakeTask.new(:rubocop) do |task|
|
||||||
task.options = ['-c', '.rubocop.yml']
|
task.options = ['-c', '.rubocop.yml']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require 'mediawiki_selenium/rake_task'
|
||||||
|
MediawikiSelenium::RakeTask.new
|
||||||
|
|
||||||
task default: [:test]
|
task default: [:test]
|
||||||
|
|
||||||
desc 'Run all build/tests commands (CI entry point)'
|
desc 'Run all build/tests commands (CI entry point)'
|
||||||
|
|
86
tests/browser/ci.yml
Normal file
86
tests/browser/ci.yml
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
BROWSER:
|
||||||
|
- chrome
|
||||||
|
- firefox
|
||||||
|
- internet_explorer 9.0
|
||||||
|
- internet_explorer 10.0
|
||||||
|
- internet_explorer 11.0
|
||||||
|
- safari
|
||||||
|
|
||||||
|
MEDIAWIKI_ENVIRONMENT:
|
||||||
|
- beta
|
||||||
|
- mediawiki
|
||||||
|
|
||||||
|
PLATFORM:
|
||||||
|
- Linux
|
||||||
|
- OS X 10.9
|
||||||
|
- Windows 7
|
||||||
|
- Windows 8
|
||||||
|
- Windows 8.1
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- BROWSER: chrome
|
||||||
|
MEDIAWIKI_ENVIRONMENT: mediawiki
|
||||||
|
|
||||||
|
- BROWSER: chrome
|
||||||
|
PLATFORM: Linux
|
||||||
|
- BROWSER: chrome
|
||||||
|
PLATFORM: Windows 7
|
||||||
|
- BROWSER: chrome
|
||||||
|
PLATFORM: Windows 8
|
||||||
|
- BROWSER: chrome
|
||||||
|
PLATFORM: Windows 8.1
|
||||||
|
|
||||||
|
- BROWSER: firefox
|
||||||
|
PLATFORM: OS X 10.9
|
||||||
|
- BROWSER: firefox
|
||||||
|
PLATFORM: Windows 7
|
||||||
|
- BROWSER: firefox
|
||||||
|
PLATFORM: Windows 8
|
||||||
|
- BROWSER: firefox
|
||||||
|
PLATFORM: Windows 8.1
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 9.0
|
||||||
|
MEDIAWIKI_ENVIRONMENT: mediawiki
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 9.0
|
||||||
|
PLATFORM: Linux
|
||||||
|
- BROWSER: internet_explorer 9.0
|
||||||
|
PLATFORM: OS X 10.9
|
||||||
|
- BROWSER: internet_explorer 9.0
|
||||||
|
PLATFORM: Windows 8
|
||||||
|
- BROWSER: internet_explorer 9.0
|
||||||
|
PLATFORM: Windows 8.1
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 10.0
|
||||||
|
MEDIAWIKI_ENVIRONMENT: mediawiki
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 10.0
|
||||||
|
PLATFORM: Linux
|
||||||
|
- BROWSER: internet_explorer 10.0
|
||||||
|
PLATFORM: OS X 10.9
|
||||||
|
- BROWSER: internet_explorer 10.0
|
||||||
|
PLATFORM: Windows 7
|
||||||
|
- BROWSER: internet_explorer 10.0
|
||||||
|
PLATFORM: Windows 8.1
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 11.0
|
||||||
|
MEDIAWIKI_ENVIRONMENT: mediawiki
|
||||||
|
|
||||||
|
- BROWSER: internet_explorer 11.0
|
||||||
|
PLATFORM: Linux
|
||||||
|
- BROWSER: internet_explorer 11.0
|
||||||
|
PLATFORM: OS X 10.9
|
||||||
|
- BROWSER: internet_explorer 11.0
|
||||||
|
PLATFORM: Windows 8
|
||||||
|
|
||||||
|
- BROWSER: safari
|
||||||
|
MEDIAWIKI_ENVIRONMENT: mediawiki
|
||||||
|
|
||||||
|
- BROWSER: safari
|
||||||
|
PLATFORM: Linux
|
||||||
|
- BROWSER: safari
|
||||||
|
PLATFORM: Windows 7
|
||||||
|
- BROWSER: safari
|
||||||
|
PLATFORM: Windows 8
|
||||||
|
- BROWSER: safari
|
||||||
|
PLATFORM: Windows 8.1
|
|
@ -29,7 +29,7 @@ beta:
|
||||||
mediawiki_user: Selenium_user
|
mediawiki_user: Selenium_user
|
||||||
# mediawiki_password: SET THIS IN THE ENVIRONMENT!
|
# mediawiki_password: SET THIS IN THE ENVIRONMENT!
|
||||||
|
|
||||||
mediawiki-org:
|
mediawiki:
|
||||||
browser_useragent: test-user-agent
|
browser_useragent: test-user-agent
|
||||||
mediawiki_url: https://www.mediawiki.org/wiki/
|
mediawiki_url: https://www.mediawiki.org/wiki/
|
||||||
mediawiki_user: Selenium_user
|
mediawiki_user: Selenium_user
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@integration @en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @safari @test2.wikipedia.org
|
@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration @internet_explorer @safari @test2.wikipedia.org
|
||||||
Feature: Download menu
|
Feature: Download menu
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
|
@ -56,4 +56,4 @@ Feature: Download menu
|
||||||
And I click the large download size
|
And I click the large download size
|
||||||
And the download size options disappears
|
And the download size options disappears
|
||||||
Then the download image size label should be "1200 × 900 px jpg"
|
Then the download image size label should be "1200 × 900 px jpg"
|
||||||
And the download links should be the 1200 thumbnail
|
And the download links should be the 1200 thumbnail
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@integration @en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @safari @test2.wikipedia.org
|
@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration @internet_explorer @safari @test2.wikipedia.org
|
||||||
Feature: Navigation
|
Feature: Navigation
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
|
@ -20,4 +20,4 @@ Feature: Navigation
|
||||||
Scenario: Browsing back to close MMV restores the scroll position
|
Scenario: Browsing back to close MMV restores the scroll position
|
||||||
When I press the browser back button
|
When I press the browser back button
|
||||||
Then I should be navigated back to the original wiki article
|
Then I should be navigated back to the original wiki article
|
||||||
And the wiki article should be scrolled to the same position as before opening MMV
|
And the wiki article should be scrolled to the same position as before opening MMV
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@integration @en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @safari @test2.wikipedia.org
|
@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration @internet_explorer @safari @test2.wikipedia.org
|
||||||
Feature: Options
|
Feature: Options
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
|
@ -41,4 +41,4 @@ Feature: Options
|
||||||
Scenario: Disabling media viewer makes the next thumbnail click go to the file page
|
Scenario: Disabling media viewer makes the next thumbnail click go to the file page
|
||||||
Given I disable and close MMV
|
Given I disable and close MMV
|
||||||
When I click on the first image in the article
|
When I click on the first image in the article
|
||||||
Then I am taken to the file page
|
Then I am taken to the file page
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@en.wikipedia.beta.wmflabs.org @custom-browser @www.mediawiki.org @firefox @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @test2.wikipedia.org
|
@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer @www.mediawiki.org @safari @test2.wikipedia.org
|
||||||
Feature: Multimedia Viewer performance
|
Feature: Multimedia Viewer performance
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
Given /^I am at a wiki article with at least two embedded pictures$/ do
|
Given /^I am at a wiki article with at least two embedded pictures$/ do
|
||||||
api.create_page 'MediaViewerE2ETest', File.read('samples/MediaViewerE2ETest.wikitext')
|
api.create_page 'MediaViewerE2ETest', File.read(File.join(__dir__, '../../samples/MediaViewerE2ETest.wikitext'))
|
||||||
visit(E2ETestPage)
|
visit(E2ETestPage)
|
||||||
on(E2ETestPage).image1_in_article_element.when_present.should be_visible
|
on(E2ETestPage).image1_in_article_element.when_present.should be_visible
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue