Merge "Delete Selenium tests in Ruby"
This commit is contained in:
commit
8879b5b7a1
|
@ -1,7 +1,5 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/nbproject/private/
|
/nbproject/private/
|
||||||
tests/browser/.bundle
|
|
||||||
tests/browser/.gem
|
|
||||||
node_modules/
|
node_modules/
|
||||||
vendor
|
vendor
|
||||||
composer.lock
|
composer.lock
|
||||||
|
|
20
.rubocop.yml
20
.rubocop.yml
|
@ -1,20 +0,0 @@
|
||||||
AllCops:
|
|
||||||
StyleGuideCopsOnly: true
|
|
||||||
|
|
||||||
Metrics/LineLength:
|
|
||||||
Max: 100
|
|
||||||
|
|
||||||
Metrics/MethodLength:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/Alias:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SignalException:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/StringLiterals:
|
|
||||||
EnforcedStyle: single_quotes
|
|
||||||
|
|
||||||
Style/TrivialAccessors:
|
|
||||||
ExactNameMatch: true
|
|
5
Gemfile
5
Gemfile
|
@ -1,5 +0,0 @@
|
||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
gem 'mediawiki_selenium', '~> 1.8'
|
|
||||||
gem 'rake', '~> 10.5'
|
|
||||||
gem 'rubocop', '~> 0.51.0', require: false
|
|
113
Gemfile.lock
113
Gemfile.lock
|
@ -1,113 +0,0 @@
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
ast (2.3.0)
|
|
||||||
builder (3.2.3)
|
|
||||||
childprocess (0.6.2)
|
|
||||||
ffi (~> 1.0, >= 1.0.11)
|
|
||||||
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 (1.0)
|
|
||||||
faker (>= 1.1.2)
|
|
||||||
yml_reader (>= 0.6)
|
|
||||||
diff-lcs (1.3)
|
|
||||||
domain_name (0.5.20170223)
|
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
|
||||||
faker (1.7.3)
|
|
||||||
i18n (~> 0.5)
|
|
||||||
faraday (0.11.0)
|
|
||||||
multipart-post (>= 1.2, < 3)
|
|
||||||
faraday-cookie_jar (0.0.6)
|
|
||||||
faraday (>= 0.7.4)
|
|
||||||
http-cookie (~> 1.0.0)
|
|
||||||
faraday_middleware (0.11.0.1)
|
|
||||||
faraday (>= 0.7.4, < 1.0)
|
|
||||||
ffi (1.9.17)
|
|
||||||
gherkin (2.12.2)
|
|
||||||
multi_json (~> 1.3)
|
|
||||||
headless (2.3.1)
|
|
||||||
http-cookie (1.0.3)
|
|
||||||
domain_name (~> 0.5)
|
|
||||||
i18n (0.8.1)
|
|
||||||
json (2.0.3)
|
|
||||||
mediawiki_api (0.7.1)
|
|
||||||
faraday (~> 0.9, >= 0.9.0)
|
|
||||||
faraday-cookie_jar (~> 0.0, >= 0.0.6)
|
|
||||||
faraday_middleware (~> 0.10, >= 0.10.0)
|
|
||||||
mediawiki_selenium (1.8.0)
|
|
||||||
cucumber (~> 1.3, >= 1.3.20)
|
|
||||||
headless (~> 2.0, >= 2.1.0)
|
|
||||||
json (~> 2.0, >= 2.0.2)
|
|
||||||
mediawiki_api (~> 0.7, >= 0.7.0)
|
|
||||||
page-object (~> 2.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.1.0)
|
|
||||||
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)
|
|
||||||
net-http-persistent (2.9.4)
|
|
||||||
netrc (0.11.0)
|
|
||||||
page-object (2.0.0)
|
|
||||||
net-http-persistent (~> 2.9.4)
|
|
||||||
page_navigation (>= 0.9)
|
|
||||||
selenium-webdriver (~> 3.0)
|
|
||||||
watir (~> 6.0)
|
|
||||||
page_navigation (0.10)
|
|
||||||
data_magic (>= 0.22)
|
|
||||||
parallel (1.12.0)
|
|
||||||
parser (2.4.0.2)
|
|
||||||
ast (~> 2.3)
|
|
||||||
powerpack (0.1.1)
|
|
||||||
rainbow (2.2.2)
|
|
||||||
rake
|
|
||||||
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.51.0)
|
|
||||||
parallel (~> 1.10)
|
|
||||||
parser (>= 2.3.3.1, < 3.0)
|
|
||||||
powerpack (~> 0.1)
|
|
||||||
rainbow (>= 2.2.2, < 3.0)
|
|
||||||
ruby-progressbar (~> 1.7)
|
|
||||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
||||||
ruby-progressbar (1.9.0)
|
|
||||||
rubyzip (1.2.1)
|
|
||||||
selenium-webdriver (3.1.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)
|
|
||||||
unicode-display_width (1.3.0)
|
|
||||||
watir (6.2.0)
|
|
||||||
selenium-webdriver (~> 3.0)
|
|
||||||
websocket (1.2.4)
|
|
||||||
yml_reader (0.7)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
mediawiki_selenium (~> 1.8)
|
|
||||||
rake (~> 10.5)
|
|
||||||
rubocop (~> 0.51.0)
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.16.0
|
|
17
Rakefile
17
Rakefile
|
@ -1,17 +0,0 @@
|
||||||
require 'bundler/setup'
|
|
||||||
|
|
||||||
require 'rubocop/rake_task'
|
|
||||||
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
||||||
# if you use mediawiki-vagrant, rubocop will by default use it's .rubocop.yml
|
|
||||||
# the next line makes it explicit that you want .rubocop.yml from the directory
|
|
||||||
# where `bundle exec rake` is executed
|
|
||||||
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)'
|
|
||||||
task test: [:rubocop]
|
|
|
@ -1 +0,0 @@
|
||||||
Please see https://github.com/wikimedia/mediawiki-selenium for instructions on how to run tests.
|
|
|
@ -1,9 +0,0 @@
|
||||||
BROWSER:
|
|
||||||
- chrome
|
|
||||||
- firefox
|
|
||||||
|
|
||||||
MEDIAWIKI_ENVIRONMENT:
|
|
||||||
- beta
|
|
||||||
|
|
||||||
PLATFORM:
|
|
||||||
- Linux
|
|
|
@ -1,40 +0,0 @@
|
||||||
# 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
|
|
||||||
user_factory: true
|
|
||||||
mediawiki_url: http://127.0.0.1:8080/wiki/
|
|
||||||
|
|
||||||
mw-vagrant-guest:
|
|
||||||
user_factory: true
|
|
||||||
mediawiki_url: http://127.0.0.1/wiki/
|
|
||||||
|
|
||||||
beta:
|
|
||||||
mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/
|
|
||||||
mediawiki_user: Selenium_user
|
|
||||||
# mediawiki_password: SET THIS IN THE ENVIRONMENT!
|
|
||||||
|
|
||||||
test2:
|
|
||||||
mediawiki_url: http://test2.wikipedia.org/wiki/
|
|
||||||
mediawiki_user: Selenium_user
|
|
||||||
# mediawiki_password: SET THIS IN THE ENVIRONMENT!
|
|
||||||
|
|
||||||
integration:
|
|
||||||
user_factory: true
|
|
||||||
# mediawiki_url: THIS WILL BE SET BY JENKINS
|
|
||||||
|
|
||||||
default: *default
|
|
|
@ -1,9 +0,0 @@
|
||||||
@chrome @en.wikipedia.beta.wmflabs.org @firefox
|
|
||||||
Feature: Math
|
|
||||||
|
|
||||||
Scenario: Display simple math
|
|
||||||
Given I am editing a random page with source editor
|
|
||||||
When I type <math>3 + 2</math>
|
|
||||||
And I dismiss Welcome to Wikipedia popup
|
|
||||||
And I click Preview
|
|
||||||
Then the page should contain 3 + 2 image
|
|
|
@ -1,21 +0,0 @@
|
||||||
Given(/^I am editing a random page with source editor$/) do
|
|
||||||
visit EditPage
|
|
||||||
end
|
|
||||||
|
|
||||||
When(/^I click Preview$/) do
|
|
||||||
on(EditPage).preview_element.when_present.click
|
|
||||||
end
|
|
||||||
|
|
||||||
When(/^I dismiss Welcome to Wikipedia popup$/) do
|
|
||||||
if env.lookup(:mediawiki_environment, default: nil) == 'beta'
|
|
||||||
on(EditPage).start_editing_element.click
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
When(/^I type (.+)$/) do |write_text|
|
|
||||||
on(EditPage).article_text = write_text
|
|
||||||
end
|
|
||||||
|
|
||||||
Then(/^the page should contain 3 \+ 2 image$/) do
|
|
||||||
expect(on(EditPage).math_image_element.when_present).to be_visible
|
|
||||||
end
|
|
|
@ -1,3 +0,0 @@
|
||||||
require 'mediawiki_selenium/cucumber'
|
|
||||||
require 'mediawiki_selenium/pages'
|
|
||||||
require 'mediawiki_selenium/step_definitions'
|
|
|
@ -1,13 +0,0 @@
|
||||||
class EditPage
|
|
||||||
include PageObject
|
|
||||||
|
|
||||||
page_url 'Special:Random?action=edit'
|
|
||||||
|
|
||||||
text_area(:article_text, id: 'wpTextbox1')
|
|
||||||
button(:preview, id: 'wpPreview')
|
|
||||||
span(:start_editing, text: 'Start editing')
|
|
||||||
|
|
||||||
def math_image_element
|
|
||||||
browser.img(class: 'mwe-math-fallback-image-inline')
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue