diff --git a/Gemfile b/Gemfile index b338dbf3..a565b957 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -gem 'mediawiki_selenium', '~> 1.6.3' +gem 'mediawiki_selenium', '~> 1.7' gem 'rake', '~> 10.4', '>= 10.4.2' gem 'rubocop', '~> 0.29.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index fcd9fea7..3ae8c870 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) @@ -17,9 +17,9 @@ GEM faker (>= 1.1.2) yml_reader (>= 0.6) diff-lcs (1.2.5) - domain_name (0.5.25) + domain_name (0.5.20160310) unf (>= 0.0.5, < 1.0.0) - faker (1.6.1) + faker (1.6.3) i18n (~> 0.5) faraday (0.9.2) multipart-post (>= 1.2, < 3) @@ -29,7 +29,7 @@ GEM ffi (1.9.10) gherkin (2.12.2) multi_json (~> 1.3) - headless (2.2.0) + headless (2.2.3) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) @@ -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.7.0) cucumber (~> 1.3, >= 1.3.20) headless (~> 2.0, >= 2.1.0) json (~> 1.8, >= 1.8.1) @@ -48,12 +48,12 @@ GEM rspec-expectations (~> 2.14, >= 2.14.4) syntax (~> 1.2, >= 1.2.0) thor (~> 0.19, >= 0.19.1) - mime-types (2.99) - multi_json (1.11.2) + mime-types (2.99.1) + multi_json (1.11.3) 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) @@ -78,26 +78,28 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) ruby-progressbar (1.7.5) - rubyzip (1.1.7) - selenium-webdriver (2.48.1) + rubyzip (1.2.0) + selenium-webdriver (2.53.0) childprocess (~> 0.5) - multi_json (~> 1.0) rubyzip (~> 1.0) websocket (~> 1.0) syntax (1.2.0) thor (0.19.1) unf (0.1.4) unf_ext - unf_ext (0.0.7.1) + unf_ext (0.0.7.2) watir-webdriver (0.9.1) selenium-webdriver (>= 2.46.2) - websocket (1.2.2) - yml_reader (0.6) + websocket (1.2.3) + yml_reader (0.7) PLATFORMS ruby DEPENDENCIES - mediawiki_selenium (~> 1.6.3) + mediawiki_selenium (~> 1.7) rake (~> 10.4, >= 10.4.2) rubocop (~> 0.29.1) + +BUNDLED WITH + 1.10.6 diff --git a/Rakefile b/Rakefile index d6feb167..8ac239f1 100644 --- a/Rakefile +++ b/Rakefile @@ -8,6 +8,9 @@ RuboCop::RakeTask.new(:rubocop) do |task| task.options = ['-c', '.rubocop.yml'] end +require 'mediawiki_selenium/rake_task' +MediawikiSelenium::RakeTask.new + task default: [:test] desc 'Run all build/tests commands (CI entry point)' diff --git a/tests/browser/ci.yml b/tests/browser/ci.yml new file mode 100644 index 00000000..59db8be5 --- /dev/null +++ b/tests/browser/ci.yml @@ -0,0 +1,9 @@ +BROWSER: + - chrome + +MEDIAWIKI_ENVIRONMENT: + - beta-desktop + - beta-mobile + +PLATFORM: + - Linux diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml index 7afa9735..a67c0c69 100644 --- a/tests/browser/environments.yml +++ b/tests/browser/environments.yml @@ -27,12 +27,12 @@ mw-vagrant-guest: mediawiki_url: http://127.0.0.1/wiki/ user_factory: true -beta_desktop: +beta-desktop: mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/ mediawiki_user: Selenium_user # mediawiki_password: SET THIS IN THE ENVIRONMENT! -beta: +beta-mobile: mediawiki_url: http://en.m.wikipedia.beta.wmflabs.org/wiki/ mediawiki_user: Selenium_user # mediawiki_password: SET THIS IN THE ENVIRONMENT! diff --git a/tests/browser/features/support/step_definitions/common_steps.rb b/tests/browser/features/support/step_definitions/common_steps.rb index c05be934..0af61a14 100644 --- a/tests/browser/features/support/step_definitions/common_steps.rb +++ b/tests/browser/features/support/step_definitions/common_steps.rb @@ -1,15 +1,15 @@ Given(/^RelatedArticles test pages are installed$/) do api.create_page 'Related Articles 1', - File.read('samples/related_articles_1.wikitext') + File.read(File.join(__dir__, '../../../samples/related_articles_1.wikitext')) api.create_page 'Related Articles 2', - File.read('samples/related_articles_2.wikitext') + File.read(File.join(__dir__, '../../../samples/related_articles_2.wikitext')) api.create_page 'Related Articles 3', - File.read('samples/related_articles_3.wikitext') + File.read(File.join(__dir__, '../../../samples/related_articles_3.wikitext')) api.create_page 'Related Articles 4', - File.read('samples/related_articles_4.wikitext') + File.read(File.join(__dir__, '../../../samples/related_articles_4.wikitext')) end Given(/^I am using the mobile site$/) do