From fe09c22e33f4b24f05cca71dba13de86e4896092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20Filipin?= Date: Fri, 29 Sep 2017 16:36:01 +0200 Subject: [PATCH] Delete Ruby Selenium tests Tests are broken most of the time. Ruby framework will be deprecated next month. Selenium tests that are needed should be implemented in Node.js. Bug: T164479 Change-Id: I8ec1d9b19b9538936c508daf2b50249a705b3170 --- Gemfile | 1 - Gemfile.lock | 66 +--- Rakefile | 3 - modules/ve-mw/tests/browser/.gitignore | 4 - modules/ve-mw/tests/browser/README.md | 1 - modules/ve-mw/tests/browser/ci.yml | 8 - modules/ve-mw/tests/browser/environments.yml | 39 --- .../ve-mw/tests/browser/features/anon.feature | 14 - .../tests/browser/features/bullets.feature | 43 --- .../ve-mw/tests/browser/features/cite.feature | 101 ------ .../features/edit_utf8_logged_in.feature | 25 -- .../browser/features/general_markup.feature | 34 -- .../tests/browser/features/headings.feature | 23 -- .../browser/features/indent_outdent.feature | 22 -- .../tests/browser/features/links.feature | 29 -- .../features/media_general_settings.feature | 18 - .../browser/features/media_interface.feature | 19 -- .../features/multiedit_workflow.feature | 18 - .../tests/browser/features/options.feature | 55 --- .../tests/browser/features/references.feature | 12 - .../step_definitions/bullets_steps.rb | 98 ------ .../features/step_definitions/cite_steps.rb | 159 --------- .../step_definitions/general_markup_steps.rb | 35 -- .../step_definitions/headings_steps.rb | 35 -- .../features/step_definitions/links_steps.rb | 61 ---- .../media_general_settings_steps.rb | 16 - .../step_definitions/media_interface_steps.rb | 34 -- .../multiedit_workflow_steps.rb | 27 -- .../step_definitions/options_steps.rb | 101 ------ .../step_definitions/references_steps.rb | 55 --- .../features/step_definitions/shared_steps.rb | 109 ------ .../switch_editing_mode_steps.rb | 67 ---- .../features/step_definitions/table_steps.rb | 14 - .../step_definitions/transclusion_steps.rb | 49 --- .../verify_production_wikis_steps.rb | 12 - .../tests/browser/features/support/env.rb | 3 - .../features/support/pages/dummy_page.rb | 9 - .../support/pages/visual_editor_page.rb | 229 ------------- .../features/support/pages/zarticlepage.rb | 4 - .../features/switch_editing_mode.feature | 23 -- .../tests/browser/features/table.feature | 7 - .../browser/features/transclusion.feature | 31 -- .../features/verify_production_wikis.feature | 314 ------------------ 43 files changed, 1 insertion(+), 2026 deletions(-) delete mode 100644 modules/ve-mw/tests/browser/.gitignore delete mode 100644 modules/ve-mw/tests/browser/README.md delete mode 100644 modules/ve-mw/tests/browser/ci.yml delete mode 100644 modules/ve-mw/tests/browser/environments.yml delete mode 100644 modules/ve-mw/tests/browser/features/anon.feature delete mode 100644 modules/ve-mw/tests/browser/features/bullets.feature delete mode 100644 modules/ve-mw/tests/browser/features/cite.feature delete mode 100644 modules/ve-mw/tests/browser/features/edit_utf8_logged_in.feature delete mode 100644 modules/ve-mw/tests/browser/features/general_markup.feature delete mode 100644 modules/ve-mw/tests/browser/features/headings.feature delete mode 100644 modules/ve-mw/tests/browser/features/indent_outdent.feature delete mode 100644 modules/ve-mw/tests/browser/features/links.feature delete mode 100644 modules/ve-mw/tests/browser/features/media_general_settings.feature delete mode 100644 modules/ve-mw/tests/browser/features/media_interface.feature delete mode 100644 modules/ve-mw/tests/browser/features/multiedit_workflow.feature delete mode 100644 modules/ve-mw/tests/browser/features/options.feature delete mode 100644 modules/ve-mw/tests/browser/features/references.feature delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/bullets_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/links_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/media_general_settings_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/media_interface_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/multiedit_workflow_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/options_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/switch_editing_mode_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/table_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/transclusion_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/step_definitions/verify_production_wikis_steps.rb delete mode 100644 modules/ve-mw/tests/browser/features/support/env.rb delete mode 100644 modules/ve-mw/tests/browser/features/support/pages/dummy_page.rb delete mode 100644 modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb delete mode 100644 modules/ve-mw/tests/browser/features/support/pages/zarticlepage.rb delete mode 100644 modules/ve-mw/tests/browser/features/switch_editing_mode.feature delete mode 100644 modules/ve-mw/tests/browser/features/table.feature delete mode 100644 modules/ve-mw/tests/browser/features/transclusion.feature delete mode 100644 modules/ve-mw/tests/browser/features/verify_production_wikis.feature diff --git a/Gemfile b/Gemfile index 3f10f1dbcf..2c79842304 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,5 @@ source 'https://rubygems.org' gem 'commons_upload', '~> 1.0', '>= 1.0.1' -gem 'mediawiki_selenium', '~> 1.8' gem 'rake', '~> 10.4', '>= 10.4.2' gem 'rubocop', '~> 0.32.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index e67ecc982f..0fa095435d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,25 +4,10 @@ GEM ast (2.3.0) astrolabe (1.3.1) parser (~> 2.2) - builder (3.2.3) - childprocess (0.6.2) - ffi (~> 1.0, >= 1.0.11) commons_upload (1.0.1) mediawiki_api (~> 0.7.0) - 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.20160615) unf (>= 0.0.5, < 1.0.0) - faker (1.7.3) - i18n (~> 0.5) faraday (0.9.2) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) @@ -30,55 +15,18 @@ GEM http-cookie (~> 1.0.0) faraday_middleware (0.10.0) faraday (>= 0.7.4, < 0.10) - ffi (1.9.17) - gherkin (2.12.2) - multi_json (~> 1.3) - headless (2.3.1) http-cookie (1.0.2) domain_name (~> 0.5) - i18n (0.8.1) - json (2.0.3) mediawiki_api (0.7.0) 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) parser (2.3.1.2) ast (~> 2.2) powerpack (0.1.1) rainbow (2.1.0) 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.32.1) astrolabe (~> 1.3) parser (>= 2.2.2.5, < 3.0) @@ -86,29 +34,17 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) ruby-progressbar (1.8.1) - 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) - watir (6.2.0) - selenium-webdriver (~> 3.0) - websocket (1.2.4) - yml_reader (0.7) PLATFORMS ruby DEPENDENCIES commons_upload (~> 1.0, >= 1.0.1) - mediawiki_selenium (~> 1.8) rake (~> 10.4, >= 10.4.2) rubocop (~> 0.32.1) BUNDLED WITH - 1.14.5 + 1.15.4 diff --git a/Rakefile b/Rakefile index 029febda81..6eef121628 100644 --- a/Rakefile +++ b/Rakefile @@ -8,9 +8,6 @@ RuboCop::RakeTask.new(:rubocop) do |task| task.options = ['-c', '.rubocop.yml'] end -require 'mediawiki_selenium/rake_task' -MediawikiSelenium::RakeTask.new(test_dir: 'modules/ve-mw/tests/browser') - task default: [:test] desc 'Run all build/tests commands (CI entry point)' diff --git a/modules/ve-mw/tests/browser/.gitignore b/modules/ve-mw/tests/browser/.gitignore deleted file mode 100644 index eb56bcc718..0000000000 --- a/modules/ve-mw/tests/browser/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Puppet-managed dependencies for browser tests -.bundle -.gem -.ruby-version diff --git a/modules/ve-mw/tests/browser/README.md b/modules/ve-mw/tests/browser/README.md deleted file mode 100644 index 363194980b..0000000000 --- a/modules/ve-mw/tests/browser/README.md +++ /dev/null @@ -1 +0,0 @@ -Please see https://github.com/wikimedia/mediawiki-selenium for instructions on how to run tests. diff --git a/modules/ve-mw/tests/browser/ci.yml b/modules/ve-mw/tests/browser/ci.yml deleted file mode 100644 index 8c9865e6dd..0000000000 --- a/modules/ve-mw/tests/browser/ci.yml +++ /dev/null @@ -1,8 +0,0 @@ -BROWSER: - - firefox - -MEDIAWIKI_ENVIRONMENT: - - beta - -PLATFORM: - - Linux diff --git a/modules/ve-mw/tests/browser/environments.yml b/modules/ve-mw/tests/browser/environments.yml deleted file mode 100644 index 8740e5d17a..0000000000 --- a/modules/ve-mw/tests/browser/environments.yml +++ /dev/null @@ -1,39 +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: https://en.wikipedia.beta.wmflabs.org/wiki/ - mediawiki_user: Selenium_user - # mediawiki_password: SET THIS IN THE ENVIRONMENT! - -test2: - mediawiki_url: https://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 diff --git a/modules/ve-mw/tests/browser/features/anon.feature b/modules/ve-mw/tests/browser/features/anon.feature deleted file mode 100644 index aa3587c07b..0000000000 --- a/modules/ve-mw/tests/browser/features/anon.feature +++ /dev/null @@ -1,14 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor - - Scenario: Basic edit - Given I go to the "Anonymous Edit Test" page with content "Anonymous Edit Test" - When I edit the page with Editing with - And I see the IP warning signs - And I click Save page - And I do not see This is a minor edit - And I click Review your changes - And I click Return to save form - And I edit the description of the change - And I click Save page the second time - Then Page text should contain Editing with diff --git a/modules/ve-mw/tests/browser/features/bullets.feature b/modules/ve-mw/tests/browser/features/bullets.feature deleted file mode 100644 index 9d141a4265..0000000000 --- a/modules/ve-mw/tests/browser/features/bullets.feature +++ /dev/null @@ -1,43 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Bullets, Numbering - - Background: - Given I go to the "Bullets VisualEditor Test" page with content "Bullets VisualEditor Test" - And I make the text "Bullets VisualEditor Test" be selected - - Scenario Outline: check strings for bullets and numbering - When I click - And I click Save page - And I click Review your changes - Then a is added in front of input string in the diff view - And I can click the X on the save box - Examples: - | control | character | - | Numbering | # | - | Bullets | * | - - Scenario Outline: check increase indent for bullets and numbering - When I click - And I click Increase indentation - And I click Save page - And I click Review your changes - Then a is added in front of input string in the diff view - And I can click the X on the save box - And I can click Cancel save - And I click Decrease indentation - Examples: - | control | character | - | Numbering | ## | - | Bullets | ** | - - Scenario Outline: check decrease indent for bullets and numbering - When I click - And I click Decrease indentation - And I click Save page - And I click Review your changes - Then nothing is added in front of input string in the diff view - And I can click the X on the save box - Examples: - | control | - | Numbering | - | Bullets | diff --git a/modules/ve-mw/tests/browser/features/cite.feature b/modules/ve-mw/tests/browser/features/cite.feature deleted file mode 100644 index 977f32f38c..0000000000 --- a/modules/ve-mw/tests/browser/features/cite.feature +++ /dev/null @@ -1,101 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Cite - - Background: - Given I go to the "Cite VisualEditor Test" page with content "Cite VisualEditor Test" - And I click in the editable part - And I open the Cite menu - - Scenario: Website - When I click Website - And I fill in the first textarea with "http://en.wikipedia.org/" - And I fill in the second textarea with "Website Source title" - And I fill in the third textarea with "Website Source date 28 July 2014" - And I fill in the fourth textarea with "28 July 2014" - And I fill in the fifth textarea with "Website title" - And I fill in the sixth textarea with "Website publisher" - And I fill in the seventh textarea with "Website Last name" - And I fill in the eighth textarea with "Website First name" - And the Website input field titles are in the correct order - And I click Add more information - And I see Show more fields - And I type in a field name "New website field" - And I click the new field label - And I fill in the new field "New website field contents" - And I click Insert Citation - And I click Save page - And I click Review your changes - Then diff view should show the Website citation added - - Scenario: Book - When I click Book - And I fill in the first textarea with "Book title" - And I fill in the second textarea with "Book author last name" - And I fill in the third textarea with "Book author first name" - And I fill in the fourth textarea with "Book publisher" - And I fill in the fifth textarea with "2014" - And I fill in the sixth textarea with "9780743273565" - And I fill in the seventh textarea with "Location of publication" - And I fill in the eighth textarea with "123" - And the Book input field titles are in the correct order - And I click Add more information - And I type in a field name "New book field" - And I click the new field label - And I fill in the new field "New book field contents" - And I click Insert Citation - And I click Save page - And I click Review your changes - Then diff view should show the Book citation added - - Scenario: News - When I click News - And I fill in the first textarea with "News URL" - And I fill in the second textarea with "News Source title" - And I fill in the third textarea with "News Last name" - And I fill in the fourth textarea with "News First name" - And I fill in the fifth textarea with "News Source date" - And I fill in the sixth textarea with "News Work" - And I fill in the seventh textarea with "News URL access date" - And the News input field titles are in the correct order - And I click Insert Citation - And I click Save page - And I click Review your changes - Then diff view should show the News citation added - - Scenario: Journal - When I click Journal - And I fill in the first textarea with "Journal title" - And I fill in the second textarea with "Journal Source date" - And I fill in the third textarea with "Journal Last Name" - And I fill in the fourth textarea with "Journal First Name" - And I fill in the fifth textarea with "Journal Source Date" - And I fill in the sixth textarea with "Journal Journal" - And I fill in the seventh textarea with "Journal Access Date" - And I fill in the eighth textarea with "Journal DOI" - And the Journal input field titles are in the correct order - And I click Insert Citation - And I click Save page - And I click Review your changes - Then diff view should show the Journal citation added - - Scenario: Basic - When I click Basic - Then I should see the VisualEditor interface - And I should see the Options use this group text - And I should see the General references - #And I fill in General references - - Scenario: Error message for required field not present - When I click Journal - And I fill in the first textarea with "Journal title" - And I click Insert Citation - Then I should see a Required parameters missing error - And I should see a Go back button - And I should see a Continue anyway button - - Scenario: Reusing an existing reference - Given I go to a page that has references - When I edit the page with Some content related to existing reference - And I create a reference using existing reference - Then first link to reference should be visible - And second link to reference should be visible diff --git a/modules/ve-mw/tests/browser/features/edit_utf8_logged_in.feature b/modules/ve-mw/tests/browser/features/edit_utf8_logged_in.feature deleted file mode 100644 index fa22b938fe..0000000000 --- a/modules/ve-mw/tests/browser/features/edit_utf8_logged_in.feature +++ /dev/null @@ -1,25 +0,0 @@ -# encoding: UTF-8 -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor - - Background: - Given I am logged in - And I go to the browser specific edit page page - - Scenario Outline: Edit with strings - When I edit the page with - And I click Save page - And I click This is a minor edit - And I click Review your changes - And I click Return to save form - And I edit the description of the change - And I click Save page the second time - Then Page text should contain - Examples: - | input_string | output_string | - | Editing with | Editing with | - | Editing with ÀÈÌÒÙ | Editing with ÀÈÌÒÙ | - | Editing with ÄËÏÖÜ | Editing with ÄËÏÖÜ | - | Editing with ÂÊÎÔÛ | Editing with ÂÊÎÔÛ | - | Editing with áéíóú | Editing with áéíóú | - | Editing with Déjà vu 北京 menu option - And I click Save page - And I click Review your changes - Then should appear in the diff view - And I can click the X on the save box - Examples: - | type_of_markup | expected_markup_text | - | Bold | '''General Markup VisualEditor Test''' | - | Italics | ''General Markup VisualEditor Test'' | - - Scenario Outline: VisualEditor more general markup - When I click the text style menu - And I click the More option - And I click the menu option - And I click Save page - And I click Review your changes - Then should appear in the diff view - And I can click the X on the save box - Examples: - | type_of_markup | expected_markup_text | - | Computer Code | General Markup VisualEditor Test | - | Strikethrough | General Markup VisualEditor Test | - | Subscript | General Markup VisualEditor Test | - | Superscript | General Markup VisualEditor Test | - | Underline | General Markup VisualEditor Test | diff --git a/modules/ve-mw/tests/browser/features/headings.feature b/modules/ve-mw/tests/browser/features/headings.feature deleted file mode 100644 index 7b42e76890..0000000000 --- a/modules/ve-mw/tests/browser/features/headings.feature +++ /dev/null @@ -1,23 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Headings - - Background: - Given I go to the "Headings VisualEditor Test" page with content "Headings VisualEditor Test" - And I make the text "Headings VisualEditor Test" be selected - - Scenario Outline: Cycle through headings values - When I click the down arrow on the Headings menu - And I click - And I click Save page - And I click Review your changes - Then should appear in the diff view - And I can click the X on the save box - Examples: - | headings_interface_name | headings_string | - | Heading | "^== Headings VisualEditor Test" | - | Subheading1 | "^=== Headings VisualEditor Test" | - | Subheading2 | "^==== Headings VisualEditor Test" | - | Subheading3 | "^===== Headings VisualEditor Test" | - | Subheading4 | "^====== Headings VisualEditor Test" | - | Preformatted | " Headings VisualEditor Test" | - | Page title | "^= Headings VisualEditor Test" | diff --git a/modules/ve-mw/tests/browser/features/indent_outdent.feature b/modules/ve-mw/tests/browser/features/indent_outdent.feature deleted file mode 100644 index 10c9886e74..0000000000 --- a/modules/ve-mw/tests/browser/features/indent_outdent.feature +++ /dev/null @@ -1,22 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox -Feature: VisualEditor Indent, Outdent - - Background: - Given I go to the "Indent Outdent VisualEditor Test" page with content "Indent Outdent VisualEditor Test" - And I make the text "Indent Outdent" be selected - - Scenario: Check indentation controls disabled by default - Then Decrease indentation should be disabled - And Increase indentation should be disabled - - Scenario Outline: check indent and outdent enable and disable - When I click - Then Decrease indentation should be - And Increase indentation should be - And I undo - And Decrease indentation should be - And Increase indentation should be - Examples: - | control | initial_state | final_state | - | Bullets | enabled | disabled | - | Numbering | enabled | disabled | diff --git a/modules/ve-mw/tests/browser/features/links.feature b/modules/ve-mw/tests/browser/features/links.feature deleted file mode 100644 index c089bea425..0000000000 --- a/modules/ve-mw/tests/browser/features/links.feature +++ /dev/null @@ -1,29 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Links - - Background: - Given I go to the "Links VisualEditor Test" page with content "Links VisualEditor Test" - And I click in the editable part - And I click the Link button - And I can see the Link User Inteface - - Scenario: Enter external link - When I enter external link http://www.example.com into link Content box - And I click Done to close Link User Interface - And I click Save page - And I click Review your changes - Then an external link appears in the diff view - - Scenario: Enter internal link - When I enter internal link Main Page into link Content box - And I click Done to close Link User Interface - And I click Save page - And I click Review your changes - Then an internal link appears in the diff view - - Scenario: Enter non-existing link - When I enter non existing link DoesNotExist into link Content box - And I click Done to close Link User Interface - And I click Save page - And I click Review your changes - Then a non-existing link appears in the diff view diff --git a/modules/ve-mw/tests/browser/features/media_general_settings.feature b/modules/ve-mw/tests/browser/features/media_general_settings.feature deleted file mode 100644 index b631d1e204..0000000000 --- a/modules/ve-mw/tests/browser/features/media_general_settings.feature +++ /dev/null @@ -1,18 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Media Interface - - Background: - Given I go to the "Media Interface VisualEditor Test" page with content "Media Interface VisualEditor Test" - And I click in the editable part - - Scenario: VisualEditor insert new media - Given I click Media - And I enter Apollo 11 bootprint into media Search box - And I select an Image - And I click Use this image - And I fill up the Caption field with "caption" - And I fill up the Alternative text with "alt text" - And I click Insert - And I click Save page - And I click Review your changes - Then diff view should show media file with caption and alt text diff --git a/modules/ve-mw/tests/browser/features/media_interface.feature b/modules/ve-mw/tests/browser/features/media_interface.feature deleted file mode 100644 index c3acf4046b..0000000000 --- a/modules/ve-mw/tests/browser/features/media_interface.feature +++ /dev/null @@ -1,19 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Media Interface - - Background: - Given I go to the "Media Interface VisualEditor Test" page with content "Media Interface VisualEditor Test" - And I click in the editable part - - Scenario Outline: VisualEditor insert new media - Given I click Media - And I enter into media Search box - And I select an Image - And I click Use this image - And I click Insert - And I click Save page - And I click Review your changes - Then diff view should show correct markup - Examples: - | search_term | - | Apollo 11 bootprint | diff --git a/modules/ve-mw/tests/browser/features/multiedit_workflow.feature b/modules/ve-mw/tests/browser/features/multiedit_workflow.feature deleted file mode 100644 index 7ba7774a0d..0000000000 --- a/modules/ve-mw/tests/browser/features/multiedit_workflow.feature +++ /dev/null @@ -1,18 +0,0 @@ -# encoding: UTF-8 -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor multi-edit workflow - - Goal of the test is to make sure the "Save" and "Review Changes" - workflows are consistent even where a user makes multiple page - edits in the same session. See this bug ticket: - https://bugzilla.wikimedia.org/show_bug.cgi?id=57654 - - Not implemented as a Scenario outline since the goal is - to test multiple page edits within a single session. - - Scenario: Make multiple edits to the same article - Given I am on the Multiple edits page - And I enter and save the first edit - And I enter and save a second edit - And I enter and save a third edit - Then the saved page should contain all three edits. diff --git a/modules/ve-mw/tests/browser/features/options.feature b/modules/ve-mw/tests/browser/features/options.feature deleted file mode 100644 index 1903c3596e..0000000000 --- a/modules/ve-mw/tests/browser/features/options.feature +++ /dev/null @@ -1,55 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox -Feature: VisualEditor Options - - Background: - Given I go to the "Options VisualEditor Test" page with content "Options VisualEditor Test" - And I click in the editable part - And I click the hamburger menu - - Scenario: Options - When I click Options - Then I should see the options overlay - - @skip - Scenario: Advanced Settings - When I click Advanced Settings - Then I should see the options overlay - And the options overlay should display Advanced Settings - - @skip - Scenario: Page Settings - When I click Page Settings - Then I should see the options overlay - And the options overlay should display Page Settings - - @skip - Scenario: Categories - When I click Categories - Then I should see the options overlay - And the options overlay should display Categories - - @skip - Scenario: Advanced Settings setting fields - When I click Advanced Settings - And I click Yes for Indexed by Search Engines - And I click Yes for showing tab for adding new section - And I check the option for Enable display title - And I type "automated test" for display title textbox - And I click Apply Changes button - And I click Save page - And I click Review your changes - Then the options set in Advanced Settings panel should appear in diff view - - @skip - Scenario: Setting the fields in Page Settings - When I click Page Settings - And I check the option for Redirect this page to - And I type "Linux" for redirect page - And I check the option for Prevent this redirect being updated when target page is moved - And I select the option Always for showing Table of Contents - And I check the option for Disable edit links next to each heading on this page - And I check the option for This is a Disambiguation page - And I click Apply Changes button - And I click Save page - And I click Review your changes - Then the options set in Page Settings panel should appear in diff view diff --git a/modules/ve-mw/tests/browser/features/references.feature b/modules/ve-mw/tests/browser/features/references.feature deleted file mode 100644 index e9b3e2e07f..0000000000 --- a/modules/ve-mw/tests/browser/features/references.feature +++ /dev/null @@ -1,12 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor References - - Background: - Given I go to a page that has references - And I click in the editable part - - Scenario: Creating References list - Given I click Reference - And I can see the References User Interface - When I click Insert references list - Then link to Insert menu should be visible diff --git a/modules/ve-mw/tests/browser/features/step_definitions/bullets_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/bullets_steps.rb deleted file mode 100644 index d666bb70ff..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/bullets_steps.rb +++ /dev/null @@ -1,98 +0,0 @@ -When(/^I click Bullets$/) do - on(VisualEditorPage) do |page| - page.bullet_number_selector_element.when_present.click - page.ve_bullets_element.when_present.click - end -end - -When(/^I click Decrease indentation$/) do - on(VisualEditorPage) do |page| - step 'I click in the editable part' - page.bullet_number_selector_element.when_present.click - page.decrease_indentation_element.when_present.click - end -end - -When(/^I click Increase indentation$/) do - on(VisualEditorPage) do |page| - page.bullet_number_selector_element.when_present.click - page.increase_indentation_element.when_present.click - end -end - -When(/^I click Numbering$/) do - on(VisualEditorPage) do |page| - page.bullet_number_selector_element.when_present.click - page.ve_numbering_element.when_present.click - end -end - -When(/^I undo Bullets$/) do - on(VisualEditorPage) do |page| - page.bullet_number_selector_element.when_present.click - page.ve_bullets_element.when_present.click - end -end - -When(/^I undo Numbering$/) do - on(VisualEditorPage) do |page| - page.bullet_number_selector_element.when_present.click - page.ve_numbering_element.when_present.click - end -end - -Then(/^a \# is added in front of input string in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? "# #{@wikitext}" - end - expect(page.diff_view).to match(/^\# #{@wikitext}/) - end -end - -Then(/^a \* is added in front of input string in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? "* #{@wikitext}" - end - expect(page.diff_view).to match(/^\* #{@wikitext}/) - end -end - -Then(/^a \#\# is added in front of input string in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? "## #{@wikitext}" - end - expect(page.diff_view).to match(/^\#\# #{@wikitext}/) - end -end - -Then(/^a \*\* is added in front of input string in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? "** #{@wikitext}" - end - expect(page.diff_view).to match(/^\*\* #{@wikitext}/) - end -end - -Then(/^Decrease indentation should be enabled$/) do - expect(on(VisualEditorPage).decrease_indentation_element.class_name).not_to match(/disabled/) -end - -Then(/^Decrease indentation should be disabled$/) do - expect(on(VisualEditorPage).decrease_indentation_element).not_to be_visible -end - -Then(/^Increase indentation should be enabled$/) do - expect(on(VisualEditorPage).increase_indentation_element.class_name).not_to match(/disabled/) -end - -Then(/^Increase indentation should be disabled$/) do - expect(on(VisualEditorPage).increase_indentation_element).to_not be_visible -end - -Then(/^nothing is added in front of input string in the diff view$/) do - expect(on(VisualEditorPage).review_failed_element.when_present).to be_visible -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb deleted file mode 100644 index 6810d164e0..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb +++ /dev/null @@ -1,159 +0,0 @@ -Given(/^I open the Cite menu$/) do - on(VisualEditorPage).cite_menu_element.when_present.click -end - -When(/^I click Add more information$/) do - on(VisualEditorPage).cite_add_more_information_button_element.when_present.click -end - -When(/^I click Basic$/) do - on(VisualEditorPage).cite_basic_reference_element.when_present.click -end - -When(/^I click Book$/) do - on(VisualEditorPage).cite_book_element.when_present.click -end - -When(/^I click Insert Citation$/) do - on(VisualEditorPage).insert_citation_element.when_present.click -end - -When(/^I click Journal$/) do - on(VisualEditorPage).cite_journal_element.when_present.click -end - -When(/^I click News$/) do - on(VisualEditorPage).cite_news_element.when_present.click -end - -When(/^I click the new field label$/) do - on(VisualEditorPage).cite_new_field_label_element.when_present.click -end - -When(/^I click Website$/) do - on(VisualEditorPage).cite_website_element.when_present.click -end - -When(/^I fill in the first textarea with "(.*?)"$/) do |first_string| - on(VisualEditorPage).cite_first_textarea_element.when_present.send_keys first_string -end - -When(/^I fill in the second textarea with "(.*?)"$/) do |second_string| - on(VisualEditorPage).cite_second_textarea_element.when_present.send_keys second_string -end - -When(/^I fill in the third textarea with "(.*?)"$/) do |third_string| - on(VisualEditorPage).cite_third_textarea_element.when_present.send_keys third_string -end - -When(/^I fill in the fourth textarea with "(.*?)"$/) do |fourth_string| - on(VisualEditorPage).cite_fourth_textarea_element.when_present.send_keys fourth_string -end - -When(/^I fill in the fifth textarea with "(.*?)"$/) do |fifth_string| - on(VisualEditorPage).cite_fifth_textarea_element.when_present.send_keys fifth_string -end - -When(/^I fill in the sixth textarea with "(.*?)"$/) do |sixth_string| - on(VisualEditorPage).cite_sixth_textarea_element.when_present.send_keys sixth_string -end - -When(/^I fill in the seventh textarea with "(.*?)"$/) do |seventh_string| - on(VisualEditorPage).cite_seventh_textarea_element.when_present.send_keys seventh_string -end - -When(/^I fill in the eighth textarea with "(.*?)"$/) do |eighth_string| - on(VisualEditorPage).cite_eighth_textarea_element.when_present.send_keys eighth_string -end - -When(/^I fill in the new field "(.*?)"$/) do |new_field_text| - on(VisualEditorPage).cite_new_website_field_element.when_present.send_keys new_field_text -end - -When(/^I see Show more fields$/) do - on(VisualEditorPage).cite_show_more_fields_element.when_present -end - -When(/^I type in a field name "(.*?)"$/) do |custom_field| - on(VisualEditorPage).cite_custom_field_name_element.when_present.send_keys custom_field -end - -Then(/^diff view should show the Book citation added$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - sleep 1 - page.diff_view.include? 'Cite VisualEditor Test' - end - expect(page.diff_view).to match '{{Cite book|title = Book title|last = Book author last name|first = Book author first name|publisher = Book publisher|year = 2014|isbn = 9780743273565|location = Location of publication|pages = 123|New book field = New book field contents}}Cite VisualEditor Test' - end -end - -Then(/^diff view should show the Journal citation added$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - sleep 1 - page.diff_view.include? 'Cite VisualEditor Test' - end - expect(page.diff_view).to match '{{Cite journal|url = Journal title|title = Journal Source date|last = Journal Last Name|first = Journal First Name|date = Journal Source Date|journal = Journal Journal|accessdate = Journal Access Date|doi = Journal DOI}}Cite VisualEditor Test' - end -end - -Then(/^diff view should show the News citation added$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - sleep 1 - page.diff_view.include? 'Cite VisualEditor Test' - end - expect(page.diff_view).to match '{{Cite news|url = News URL|title = News Source title|last = News Last name|first = News First name|date = News Source date|work = News Work|accessdate = News URL access date}}Cite VisualEditor Test' - end -end - -Then(/^diff view should show the Website citation added$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - sleep 1 - page.diff_view.include? 'Cite VisualEditor Test' - end - expect(page.diff_view).to match '{{Cite web|url = http://en.wikipedia.org/|title = Website Source title|date = Website Source date 28 July 2014|accessdate = {{CURRENTMONTHNAME}} {{CURRENTYEAR}}28 July 2014|website = Website title|publisher = Website publisher|last = Website Last name|first = Website First name|New website field = New website field contents}}Cite VisualEditor Test' - end -end - -Then(/^I should see a Continue anyway button$/) do - expect(on(VisualEditorPage).required_parameters_continue_anyway_element.when_present).to be_visible -end - -Then(/^I should see a Go back button$/) do - expect(on(VisualEditorPage).required_parameters_go_back_element.when_present).to be_visible -end - -Then(/^I should see a Required parameters missing error$/) do - expect(on(VisualEditorPage).required_parameters_missing_message_element.when_present).to be_visible -end - -Then(/^I should see the General references$/) do - expect(on(VisualEditorPage).cite_group_name_textarea_element).to be_visible -end - -Then(/^I should see the Options use this group text$/) do - expect(on(VisualEditorPage).cite_basic_options_area_element.text).to match(/Options.+Use this group/m) -end - -Then(/^I should see the VisualEditor interface$/) do - expect(on(VisualEditorPage).cite_visualeditor_user_interface_element).to be_visible -end - -Then(/^the Book input field titles are in the correct order$/) do - expect(on(VisualEditorPage).cite_ui).to match(/Title.+Last name.+First name.+Publisher.+Year of publication.+ISBN.+Location of publication.+Page/m) -end - -Then(/^the Journal input field titles are in the correct order$/) do - expect(on(VisualEditorPage).cite_ui).to match(/Title.+Source date/m) -end - -Then(/^the News input field titles are in the correct order$/) do - expect(on(VisualEditorPage).cite_ui).to match(/URL.+Source title.+Last name.+First name.+Source date.+Work.+URL access date/m) -end - -Then(/^the Website input field titles are in the correct order$/) do - expect(on(VisualEditorPage).cite_ui).to match(/URL.+Source title.+Source date.+URL access date.+Website title.+Publisher.+Last name.+First name/m) -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb deleted file mode 100644 index c5117d6ada..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/general_markup_steps.rb +++ /dev/null @@ -1,35 +0,0 @@ -When(/^I click the Bold menu option$/) do - on(VisualEditorPage).ve_bold_text_element.when_present.click -end - -When(/^I click the Computer Code menu option$/) do - on(VisualEditorPage).ve_computer_code_element.when_present(15).click -end - -When(/^I click the Italics menu option$/) do - on(VisualEditorPage).ve_italics_element.when_present.click -end - -When(/^I click the More option$/) do - on(VisualEditorPage).ve_more_markup_options_element.when_present(15).click -end - -When(/^I click the Strikethrough menu option$/) do - on(VisualEditorPage).ve_strikethrough_element.when_present(15).click -end - -When(/^I click the Subscript menu option$/) do - on(VisualEditorPage).ve_subscript_element.when_present(15).click -end - -When(/^I click the Superscript menu option$/) do - on(VisualEditorPage).ve_superscript_element.when_present(15).click -end - -When(/^I click the text style menu$/) do - on(VisualEditorPage).ve_text_style_element.when_present(15).click -end - -When(/^I click the Underline menu option$/) do - on(VisualEditorPage).ve_underline_element.when_present(15).click -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb deleted file mode 100644 index df62a187b4..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb +++ /dev/null @@ -1,35 +0,0 @@ -When(/^I click Heading$/) do - on(VisualEditorPage).heading_element.when_present.click -end - -When(/^I click Page title$/) do - on(VisualEditorPage).page_title_element.when_present.click -end - -When(/^I click Paragraph$/) do - on(VisualEditorPage).paragraph_element.when_present.click -end - -When(/^I click Preformatted$/) do - on(VisualEditorPage).preformatted_element.when_present.click -end - -When(/^I click Subheading1$/) do - on(VisualEditorPage).subheading1_element.when_present.click -end - -When(/^I click Subheading2$/) do - on(VisualEditorPage).subheading2_element.when_present.click -end - -When(/^I click Subheading3$/) do - on(VisualEditorPage).subheading3_element.when_present.click -end - -When(/^I click Subheading4$/) do - on(VisualEditorPage).subheading4_element.when_present.click -end - -When(/^I click the down arrow on the Headings menu$/) do - on(VisualEditorPage).format_indicator_down_element.when_present.click -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/links_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/links_steps.rb deleted file mode 100644 index e42902c6d5..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/links_steps.rb +++ /dev/null @@ -1,61 +0,0 @@ -Given(/^I can see the Link User Inteface$/) do - on(VisualEditorPage).ve_link_ui_element.when_present -end - -When(/^I click Done to close Link User Interface$/) do - on(VisualEditorPage).links_done_element.when_present.click -end - -When(/^I click the Link button$/) do - on(VisualEditorPage).ve_link_icon_element.when_present.click -end - -When(/^I enter external link (.+) into link Content box$/) do |link_content| - on(VisualEditorPage) do |page| - page.link_textfield_element.when_present - page.link_textfield_element.send_keys(link_content) - end -end - -When(/^I enter internal link (.+) into link Content box$/) do |link_content| - on(VisualEditorPage) do |page| - page.link_textfield_element.when_present - page.link_textfield_element.send_keys(link_content) - page.link_overlay_wiki_page_element.when_present - end -end - -When(/^I enter non existing link (.+) into link Content box$/) do |link_content| - on(VisualEditorPage) do |page| - page.link_textfield_element.when_present - page.link_textfield_element.send_keys(link_content) - page.link_overlay_does_not_exist_element.when_present - end -end - -Then(/^a non\-existing link appears in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? 'DoesNotExist' - end - expect(page.diff_view).to match '[[DoesNotExist|Links]]' - end -end - -Then(/^an external link appears in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? 'example.com' - end - expect(page.diff_view).to match '[http://www.example.com Links]' - end -end - -Then(/^an internal link appears in the diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? 'Main Page' - end - expect(page.diff_view).to match '[[Main Page|Links]]' - end -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/media_general_settings_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/media_general_settings_steps.rb deleted file mode 100644 index f28600d8f6..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/media_general_settings_steps.rb +++ /dev/null @@ -1,16 +0,0 @@ -Given(/^I fill up the Caption field with "(.*?)"$/) do |caption_text| - on(VisualEditorPage).caption_element.when_present.send_keys caption_text -end - -Given(/^I fill up the Alternative text with "(.*?)"$/) do |alt_text| - on(VisualEditorPage).alternative_text_element.when_present.send_keys alt_text -end - -Then(/^diff view should show media file with caption and alt text$/) do - on(VisualEditorPage) do |page| - page.wait_until(15) do - page.diff_view_element.exists? - end - expect(page.diff_view).to match(/\[\[File:Apollo 11 bootprint.jpg\|alt=alt text\|thumb\|caption\]\]/) - end -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/media_interface_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/media_interface_steps.rb deleted file mode 100644 index 774ac37efa..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/media_interface_steps.rb +++ /dev/null @@ -1,34 +0,0 @@ -When(/^I click Media$/) do - on(VisualEditorPage) do |page| - page.insert_indicator_down_element.when_present.click - page.ve_media_menu_element.when_present.click - end -end - -When(/^I enter (.+) into media Search box$/) do |content| - on(VisualEditorPage) do |page| - sleep 1 - page.media_search_element.when_present.send_keys(content) - end -end - -When(/^I select an Image$/) do - on(VisualEditorPage).media_select_element.when_present(20).click -end - -When(/^I click Use this image/) do - on(VisualEditorPage).use_image_button_element.when_present.click -end - -When(/^I click Insert$/) do - on(VisualEditorPage).media_insert_button_element.when_present.click -end - -Then(/^diff view should show correct markup$/) do - on(VisualEditorPage) do |page| - page.wait_until(15) do - page.diff_view_element.exists? - end - expect(page.diff_view).to match(/\[\[File:Apollo 11 bootprint.jpg\|thumb\]\]/) - end -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/multiedit_workflow_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/multiedit_workflow_steps.rb deleted file mode 100644 index 262fd08706..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/multiedit_workflow_steps.rb +++ /dev/null @@ -1,27 +0,0 @@ -When(/^I enter and save the first edit$/) do - @first_edit_text = 'Editing with ' + Random.rand.to_s - step "I insert the text #{@first_edit_text}" - step 'I click Save page' - step 'I click This is a minor edit' - step 'I click Review your changes' - step 'I click Return to save form' - step 'I click Save page the second time' -end - -When(/^I enter and save a (.+) edit$/) do |count| - on(VisualEditorPage).medium_dialog_element.when_not_visible(10) - edit_text = 'Editing with ' + Random.rand.to_s - instance_variable_set("@#{count}_edit_text", edit_text) - step 'I click Edit for VisualEditor' - step "I insert the text #{edit_text}" - step 'I click Save page' - step 'I click Save page the second time' -end - -When(/^I insert the text (.*?)$/) do |input_string| - on(VisualEditorPage).content_element.when_present(10).send_keys(input_string) -end - -Then(/^the saved page should contain all three edits\.$/) do - expect(on(VisualEditorPage).page_text_element.when_present(10).text).to match "#{@third_edit_text}#{@second_edit_text}Editing with #{@random_string} #{@first_edit_text}" -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/options_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/options_steps.rb deleted file mode 100644 index 7669c7e476..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/options_steps.rb +++ /dev/null @@ -1,101 +0,0 @@ -When(/^I check the option for Enable display title$/) do - on(VisualEditorPage).check_option_to_enable_display_title -end - -When(/^I check the option for Disable edit links next to each heading on this page$/) do - on(VisualEditorPage).check_option_to_disable_edit_links -end - -When(/^I check the option for Prevent this redirect being updated when target page is moved$/) do - on(VisualEditorPage).check_option_to_prevent_redirect_being_updated -end - -When(/^I check the option for Redirect this page to$/) do - on(VisualEditorPage).check_option_to_redirect_the_page -end - -When(/^I check the option for This is a Disambiguation page$/) do - on(VisualEditorPage).check_option_to_refer_as_disambiguation_page -end - -When(/^I click Advanced Settings$/) do - on(VisualEditorPage).option_advanced_settings_element.when_present.click -end - -When(/^I click Apply Changes button$/) do - on(VisualEditorPage).apply_changes_button_element.when_present.click -end - -When(/^I click Categories$/) do - on(VisualEditorPage).options_categories_element.when_present.click -end - -When(/^I click Options$/) do - on(VisualEditorPage).options_in_hamburger_element.when_present.click -end - -When(/^I click Page Settings$/) do - on(VisualEditorPage).option_page_settings_element.when_present.click -end - -When(/^I click the hamburger menu$/) do - on(VisualEditorPage).hamburger_menu_element.when_present.click -end - -When(/^I click Yes for Indexed by Search Engines$/) do - on(VisualEditorPage).option_to_set_index_by_search_element.when_present.click -end - -When(/^I click Yes for showing tab for adding new section$/) do - on(VisualEditorPage).option_to_show_new_section_tab_element.when_present.click -end - -When(/^I see options overlay$/) do - on(VisualEditorPage).options_page_title_element.when_present -end - -When(/^I select the option Always for showing Table of Contents$/) do - on(VisualEditorPage).option_to_always_show_TOC_element.when_present.click -end - -When(/^I type "(.*?)" for display title textbox$/) do |display_title_text| - on(VisualEditorPage).display_title_textbox_element.when_present.send_keys(display_title_text) -end - -When(/^I type "(.*?)" for redirect page$/) do |redirect_page_name| - on(VisualEditorPage).redirect_page_name_textbox_element.when_present.send_keys(redirect_page_name) -end - -Then(/^I should see the options overlay$/) do - expect(on(VisualEditorPage).options_page_title_element.when_present).to be_visible -end - -Then(/^the options overlay should display Advanced Settings$/) do - expect(on(VisualEditorPage).options_settings_content_advanced_element).to be_visible -end - -Then(/^the options overlay should display Categories$/) do - expect(on(VisualEditorPage).options_settings_content_categories_element).to be_visible -end - -Then(/^the options overlay should display Page Settings$/) do - expect(on(VisualEditorPage).options_settings_content_page_settings_element).to be_visible -end - -Then(/^the options set in Advanced Settings panel should appear in diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? 'automated test' - end - expect(page.diff_view).to match(/{{DISPLAYTITLE:automated test}}.+Options VisualEditor Test.+__INDEX__.+__NEWSECTIONLINK__/m) - end -end - -Then(/^the options set in Page Settings panel should appear in diff view$/) do - on(VisualEditorPage) do |page| - page.wait_until(10) do - page.diff_view.include? 'Linux' - end - expect(page.diff_view).to match(/#REDIRECT \[\[Linux\]\].+Options VisualEditor Test.+__FORCETOC__.+__STATICREDIRECT__.+__NOEDITSECTION__.+__DISAMBIG__/m) - end -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb deleted file mode 100644 index 71d1e5ca7e..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb +++ /dev/null @@ -1,55 +0,0 @@ -Given(/^I go to a page that has references$/) do - wikitext = "VisualEditor is a MediaWiki extension.[http://www.mediawiki.org/wiki/Extension:VisualEditor Extension:VisualEditor] - -==References== -" - - api.create_page 'Reference VisualEditor Test', wikitext - step 'I am on the Reference VisualEditor Test page' -end - -Given(/^I can see the References User Interface$/) do - on(VisualEditorPage).references_title_element.when_present -end - -When(/^I click Insert references list$/) do - on(VisualEditorPage).insert_element.when_present.click -end - -When(/^I click Reference$/) do - on(VisualEditorPage) do |page| - page.insert_indicator_down_element.when_present.click - page.ve_more_references_options_element.when_present.click - page.ve_references_element.when_present.click - end -end - -When(/^I click use an existing reference button in References User Interface$/) do - on(VisualEditorPage).cite_reuse_existing_reference_element.when_present.click -end - -When(/^I click on Extension:VisualEditor reference$/) do - on(VisualEditorPage).extension_reference_element.when_present.click -end - -When(/^I create a reference using existing reference$/) do - step('I open the Cite menu') - step('I click use an existing reference button in References User Interface') - step('I click on Extension:VisualEditor reference') -end - -Then(/^first link to reference should be visible$/) do - expect(on(VisualEditorPage).first_reference_element.when_present).to be_visible -end - -Then(/^second link to reference should be visible$/) do - expect(on(VisualEditorPage).second_reference_element.when_present).to be_visible -end - -Then(/^I should see Insert reference button enabled$/) do - expect(on(VisualEditorPage).insert_reference_element).to be_visible -end - -Then(/^link to Insert menu should be visible$/) do - expect(on(VisualEditorPage).insert_indicator_element).to be_visible -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb deleted file mode 100644 index 9878c13e7d..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb +++ /dev/null @@ -1,109 +0,0 @@ -Given(/^I am on the (.+) page$/) do |article| - article = article.gsub(/ /, '_') - visit(ZtargetPage, using_params: { article_name: article }) -end - -Given(/^I click in the editable part$/) do - on(VisualEditorPage).content_element.when_present.send_keys('') -end - -Given(/^I go to the browser specific edit page page$/) do - page_title = 'Edit page for ' + browser_name - page_content = 'Edit page for ' + browser_name - - api.create_page page_title, page_content - step "I am on the #{page_title} page" -end - -Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_content| - @wikitext = page_content - api.create_page page_title, page_content - step "I am on the #{page_title} page" -end - -Given(/^I make the text "(.*?)" be selected$/) do |select_text| - on(VisualEditorPage) do |page| - page.content_element.when_present.click - require 'watir/extensions/select_text' - page.content_element.when_present.select_text select_text - end -end - -When(/^I click Edit for VisualEditor$/) do - on(VisualEditorPage) do |page| - page.edit_ve_element.when_present.click - page.content_element.when_present.click - end -end - -When(/^I click Return to save form$/) do - on(VisualEditorPage) do |page| - page.diff_view_element.when_present(10) - page.return_to_save_element.when_present(10).click - end -end - -When(/^I click Review your changes$/) do - on(VisualEditorPage).review_changes_element.when_present(10).click -end - -When(/^I click Save page$/) do - on(VisualEditorPage) do |page| - page.save_page_element.when_present.click - end -end - -When(/^I click Save page the second time$/) do - on(VisualEditorPage) do |page| - page.second_save_page_element.when_present.click - page.second_save_page_element.when_not_present - end -end - -When(/^I click This is a minor edit$/) do - on(VisualEditorPage).minor_edit_element.when_present.click -end - -When(/^I do not see This is a minor edit$/) do - on(VisualEditorPage).minor_edit_element.when_not_present -end - -When(/^I edit the description of the change$/) do - on(VisualEditorPage).describe_change_element.when_visible.send_keys("Describing with #{@random_string}") -end - -When(/^I edit the page with (.+)$/) do |input_string| - on(VisualEditorPage) do |page| - page.page_text_element.when_not_visible - page.content_element.when_present(10).send_keys(input_string + " #{@random_string} ") - end -end - -When(/^I see the IP warning signs$/) do - on(VisualEditorPage).ip_warning_element.when_present -end - -Then(/^I can click Cancel save$/) do - on(VisualEditorPage).confirm_switch_cancel_element.when_present.click -end - -Then(/^I can click the X on the save box$/) do - on(VisualEditorPage).ex_element.when_present.click -end - -Then(/^Page text should contain (.+)$/) do |output_string| - expect(on(VisualEditorPage).page_text_element.when_present.text).to match Regexp.escape(output_string + " #{@random_string}") -end - -Then(/^(.+) should appear in the diff view$/) do |headings_string| - on(VisualEditorPage) do |page| - # Contents pulled from the Cucumber tables in the .feature are escaped regexes. - # In this case we want unescaped regexes (and in one case a leading space) - # So we put single quotes around the entries in the .feature file and strip them here to get unescaped regexes. - headings_string = headings_string.gsub(/"/, '') - page.wait_until(10) do - page.diff_view.include? 'Your text' - end - expect(page.diff_view).to match headings_string - end -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/switch_editing_mode_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/switch_editing_mode_steps.rb deleted file mode 100644 index 6c4b3649c9..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/switch_editing_mode_steps.rb +++ /dev/null @@ -1,67 +0,0 @@ -When(/^I clear the confirm dialog by clicking Keep changes$/) do - on(VisualEditorPage).confirm_switch_element.when_present.click -end - -When(/^I click Edit for VisualEditor from this page$/) do - on(VisualEditorPage) do |page| - page.alert do - page.edit_ve_element.when_present.click - end - end -end - -When(/^I click the Switch to source editing menu option$/) do - on(VisualEditorPage) do |page| - page.alert do - page.tools_menu_element.when_present.click - page.switch_to_source_editing_element.when_present.click - end - end -end - -When(/^I enter the wikitext editor$/) do - on(VisualEditorPage) do |page| - page.edit_wikitext_element.when_present.click - step 'I clear the confirm dialog by clicking Keep changes' - page.wikitext_editor_element.when_present - end -end - -When(/^I see the Cancel option$/) do - on(VisualEditorPage).confirm_switch_cancel_on_switch_element.when_present -end - -When(/^I see the Discard option$/) do - on(VisualEditorPage).confirm_switch_discard_element.when_present -end - -When(/^I see the wikitext editor$/) do - on(VisualEditorPage).wikitext_editor_element.when_present(10) -end - -Then(/^I should be in Visual Editor editing alternate mode$/) do - on(VisualEditorPage) do |page| - page.wait_until(15) do - page.text.include? 'Edit page for' - end - expect(page.content_element.when_present).to be_visible - end -end - -Then(/^I should be in Visual Editor editing mode$/) do - on(VisualEditorPage) do |page| - page.wait_until(15) do - page.text.include? 'Edit page for' - end - end - expect(browser.url).to match(%r{w/index\.php\?title=Edit_page_for_#{browser_name}&veaction=edit}) -end - -Then(/^I should be in wikitext editing mode$/) do - on(VisualEditorPage) do |page| - page.wait_until(15) do - page.text.include? 'Editing Edit page for' - end - end - expect(browser.url).to eq(wiki_url("Edit page for #{browser_name}?action=submit")) -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/table_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/table_steps.rb deleted file mode 100644 index 5586a1dbd7..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/table_steps.rb +++ /dev/null @@ -1,14 +0,0 @@ -Given(/^I am editing an empty page$/) do - visit(VisualEditorPage) -end - -When(/^I click the insert table toolbar element$/) do - on(VisualEditorPage) do |page| - page.insert_menu_element.when_present.click - page.insert_table_element.click - end -end - -Then(/^the table should appear$/) do - expect(on(VisualEditorPage).table_element).to be_visible -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/transclusion_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/transclusion_steps.rb deleted file mode 100644 index 77addb772e..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/transclusion_steps.rb +++ /dev/null @@ -1,49 +0,0 @@ -Given(/^I can see the Transclusion User Interface$/) do - on(VisualEditorPage).add_a_template_title_element.when_present -end - -Given(/^I click the Add template button$/) do - on(VisualEditorPage).add_template_element.when_present.click -end - -Given(/^I click the parameter representation containing q$/) do - on(VisualEditorPage).parameter_icon_element.when_present.click -end - -Given(/^I click Transclusion$/) do - on(VisualEditorPage) do |page| - page.insert_indicator_down_element.when_present.click - page.transclusion_element.when_present.click - end -end - -Given(/^I see a list of template suggestions$/) do - on(VisualEditorPage).suggestion_list_element.when_present -end - -Given(/^I see an input text area$/) do - on(VisualEditorPage).transclusion_description_element.when_present -end - -When(/^I click Remove parameter$/) do - on(VisualEditorPage).remove_parameter_element.when_present.click -end - -When(/^I enter (.+) in the parameter box$/) do |param_value| - on(VisualEditorPage) do |page| - page.no_unused_fields_element.when_present - page.transclusion_description_element.when_present.send_keys(param_value) - end -end - -When(/^I enter (.+) into transclusion Content box$/) do |content| - on(VisualEditorPage).transclusion_description_element.when_present.send_keys(content) -end - -Then(/^I should see a list of template suggestions$/) do - expect(on(VisualEditorPage).suggestion_list_element.when_present).to be_visible -end - -Then(/^I should see the Insert template button$/) do - expect(on(VisualEditorPage).insert_element.when_present).to be_visible -end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/verify_production_wikis_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/verify_production_wikis_steps.rb deleted file mode 100644 index cfb9876f65..0000000000 --- a/modules/ve-mw/tests/browser/features/step_definitions/verify_production_wikis_steps.rb +++ /dev/null @@ -1,12 +0,0 @@ -When(/^I visit a non-existent page at (.+)$/) do |site| - visit(DummyPage, using_params: { site: site }) -end - -Then(/^I should see the Visual Editor editing surface$/) do - on(DummyPage) do |page| - page.wait_until(10) do - page.ve_editing_surface_element.exists? - end - expect(on(DummyPage).ve_editing_toolbar_element).to exist - end -end diff --git a/modules/ve-mw/tests/browser/features/support/env.rb b/modules/ve-mw/tests/browser/features/support/env.rb deleted file mode 100644 index c1072b26a2..0000000000 --- a/modules/ve-mw/tests/browser/features/support/env.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'mediawiki_selenium/cucumber' -require 'mediawiki_selenium/pages' -require 'mediawiki_selenium/step_definitions' diff --git a/modules/ve-mw/tests/browser/features/support/pages/dummy_page.rb b/modules/ve-mw/tests/browser/features/support/pages/dummy_page.rb deleted file mode 100644 index bcaf7aa689..0000000000 --- a/modules/ve-mw/tests/browser/features/support/pages/dummy_page.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This is used in the verify_production_wikis test -class DummyPage - include PageObject - - page_url 'http://<%=params[:site]%>/wiki/asdfdgfghlkj?veaction=edit' - - div(:ve_editing_surface, class: 've-ui-surface ve-init-mw-target-surface') - div(:ve_editing_toolbar, class: 'oo-ui-toolbar-bar') -end diff --git a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb deleted file mode 100644 index 3dde4ce7f3..0000000000 --- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb +++ /dev/null @@ -1,229 +0,0 @@ -# This is the main page for VisualEditor -class VisualEditorPage - include PageObject - - page_url 'User:<%= env.user %>/<%= env.browser_name %>?vehidebetadialog=true&veaction=edit' - - div(:add_a_template_title, class: 'oo-ui-processDialog-location', text: /Add a template/) - text_field(:add_category, css: 'div.ve-ui-mwCategoryInputWidget > input') - span(:add_template, text: 'Add template') - span(:apply_changes_button, text: 'Apply changes') - span(:basic_reference, class: 'oo-ui-iconElement-icon oo-ui-icon-reference') - span(:bullet_number_selector, class: 'oo-ui-iconElement-icon oo-ui-icon-listBullet') - div(:category_add_area, css: 'div.oo-ui-pageLayout-active > div.oo-ui-fieldsetLayout') - a(:category_first, css: 'div.ve-ui-mwCategoryItemWidget > a.oo-ui-buttonElement-button') - span(:category_link, class: 'oo-ui-iconElement-icon oo-ui-icon-tag') - div(:category_popup, css: 'div.ve-ui-mwCategoryPopupWidget > div.oo-ui-popupWidget-popup') - span(:category_item, class: 'oo-ui-tool-name-categories') - div(:category_recommendation, class: 've-ui-mwCategoryInputWidget-menu') - a(:category_remove, css: 'div.ve-ui-mwCategoryPopupWidget-removeButton > a.oo-ui-buttonElement-button') - text_area(:cite_first_textarea, index: 0) - text_area(:cite_second_textarea, index: 2) - text_area(:cite_third_textarea, index: 4) - text_area(:cite_fourth_textarea, index: 6) - text_area(:cite_fifth_textarea, index: 8) - text_area(:cite_sixth_textarea, index: 10) - text_area(:cite_seventh_textarea, index: 12) - text_area(:cite_eighth_textarea, index: 14) - a(:cite_add_more_information_button, css: '.ve-ui-mwParameterPage-more a', index: 7) - div(:cite_basic_options_area, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout') - span(:cite_basic_reference, css: '.oo-ui-tool-name-reference > a:nth-child(1) > span:nth-child(1)') - a(:cite_book, css: '.oo-ui-tool-name-cite-book > a:nth-child(1)') - div(:cite_button, class: 've-test-toolbar-cite') - text_field(:cite_custom_field_name, css: '.oo-ui-searchWidget-query > div:nth-child(1) > input:nth-child(1)') - text_field(:cite_group_name_textarea, css: 'div.oo-ui-indicatorElement:nth-child(1) > input:nth-child(1)') - a(:cite_journal, css: '.oo-ui-tool-name-cite-journal > a:nth-child(1)') - span(:cite_indicator_down, css: '.ve-test-toolbar-cite .oo-ui-indicator-down') - span(:cite_menu, css: '.ve-test-toolbar-cite > span:nth-child(1) > span:nth-child(3)') - div(:cite_new_field_label, css: '.oo-ui-optionWidget') - text_area(:cite_new_website_field, css: 'div.oo-ui-layout:nth-child(10) > div:nth-child(3) > div:nth-child(1) > textarea:nth-child(1)') - a(:cite_news, css: '.oo-ui-tool-name-cite-news > a:nth-child(1)') - div(:cite_pull_down, css: '.ve-test-toolbar-cite .oo-ui-clippableElement-clippable') - span(:cite_reuse_existing_reference, css: '.oo-ui-icon-reference-existing') - div(:cite_show_more_fields, class: 've-ui-mwMoreParametersResultWidget-label') - div(:cite_ui, class: 'oo-ui-window-frame') - div(:cite_visualeditor_user_interface, css: 'div.ve-ui-surface:nth-child(2)') - span(:cite_website, css: '.oo-ui-icon-ref-cite-web') - span(:confirm_switch, text: 'Keep changes') - span(:confirm_switch_cancel, text: 'Resume editing') - span(:confirm_switch_cancel_on_switch, text: 'Cancel') - span(:confirm_switch_discard, text: 'Discard changes') - span(:option_to_always_show_TOC, css: 'div.oo-ui-fieldLayout-align-top:nth-child(4) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > span:nth-child(2)') - span(:decrease_indentation, class: 'oo-ui-iconElement-icon oo-ui-icon-outdent') - text_area(:describe_change, index: 0) - div(:diff_view, class: 've-ui-mwSaveDialog-viewer') - div(:disabled_save_button, css: 'div.ve-init-mw-desktopArticleTarget-toolbar .oo-ui-toolbar-actions > div.oo-ui-flaggedElement-progressive.oo-ui-widget-disabled') - text_field(:display_title_textbox, css: 'div.oo-ui-fieldLayout-align-inline:nth-child(4) > label:nth-child(1) > div:nth-child(1) > div:nth-child(1) > input:nth-child(1)') - div(:enable_redirect, class: 've-test-page-settings-enable-redirect') - div(:external_link, class: 've-test-external-link-tab') - text_field(:external_link_field, css: 'div.ve-ui-linkAnnotationWidget > div.oo-ui-widget > input') - div(:prevent_redirect, class: 've-test-page-settings-prevent-redirect') - text_field(:redirect_page_name_textbox, css: 'div.oo-ui-lookupElement:nth-child(1) > input:nth-child(1)') - div(:format_indicator, class: 've-test-toolbar-format') - span(:format_indicator_down, css: '.ve-test-toolbar-format .oo-ui-indicator-down') - a(:edit_ve, title: /Edit this page with VisualEditor/) - a(:edit_wikitext, title: /You can edit this page\./) - span(:ex, text: 'Return to save form') - div(:extension_reference, class: 've-ui-mwReferenceResultWidget-shield') - a(:first_reference, text: '[1]', index: 1) - div(:formatting_option_menus, class: 'oo-ui-toolGroup-tools oo-ui-clippableElement-clippable', index: 2) - img(:formula_image, class: 've-ce-focusableNode-highlight-relocatable-marker') - span(:formula_insert_menu, class: 'oo-ui-tool-name-math') - a(:formula_link, css: 'span.oo-ui-tool-name-math > a.oo-ui-tool-link') - span(:heading, class: 'oo-ui-tool-title', text: /Heading/) - span(:hamburger_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-menu') - div(:heading_dropdown_menus, class: 'oo-ui-toolGroup-tools oo-ui-clippableElement-clippable', index: 1) - div(:window_frame, css: 'div.oo-ui-window-setup > div.oo-ui-window-frame') - span(:increase_indentation, class: 'oo-ui-iconElement-icon oo-ui-icon-indent') - div(:indentation_button, class: 've-test-toolbar-structure') - div(:indentation_pull_down, css: '.ve-test-toolbar-structure .oo-ui-clippableElement-clippable') - span(:insert_citation, css: '.ve-ui-nodeDialog > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > div:nth-child(1) > a:nth-child(1) > span:nth-child(2) -') - span(:insert_menu, css: '.ve-test-toolbar-insert .oo-ui-indicator-down') - span(:insert_indicator, text: 'Insert') - div(:insert_button, class: 've-test-toolbar-insert') - span(:insert_indicator_down, css: '.ve-test-toolbar-insert .oo-ui-indicator-down') - a(:more_fewer, css: '.oo-ui-popupToolGroup-active .oo-ui-tool-name-more-fewer .oo-ui-tool-link') - div(:insert_pull_down, css: '.ve-test-toolbar-insert .oo-ui-clippableElement-clippable') - div(:insert_references, class: 'oo-ui-processDialog-location') - span(:insert, text: 'Insert') - a(:insert_table, css: '.oo-ui-tool-name-insertTable a') - a(:internal_link, class: 've-ce-linkAnnotation ve-ce-mwInternalLinkAnnotation') - div(:ip_warning, class: 've-ui-mwNoticesPopupTool-item', text: /Your IP address/) - div(:language_notification, class: 'tipsy-inner') - div(:left_navigation, id: 'left-navigation') - div(:link_list, class: 'oo-ui-windowManager-floating') - span(:link_overlay_does_not_exist, text: /page does not exist yet/) - div(:link_overlay_wiki_page, class: 'mw-widget-titleOptionWidget') - text_field(:link_textfield, index: 0) - span(:links_done, text: 'Done') - unordered_list(:media_caption, class: 've-ui-contextSelectWidget') - span(:media_exit, text: 'Return to save form') - figure(:media_image, index: 0) - span(:media_insert_menu, class: 'oo-ui-tool-name-media') - text_field(:media_search, css: 'div.oo-ui-textInputWidget > input') - div(:media_select, class: 'mw-widget-mediaResultWidget-overlay') - div(:medium_dialog, class: 'oo-ui-window oo-ui-dialog oo-ui-dialog-open oo-ui-dialog-medium') - span(:use_image_button, css: '.oo-ui-processDialog-actions-primary > div:nth-child(1) > a:nth-child(1) > span:nth-child(2)') - span(:media_insert_button, css: '.oo-ui-flaggedElement-progressive > a:nth-child(1) > span:nth-child(2)') - div(:caption, css: 'div.ve-ui-surface:nth-child(2) > div:nth-child(1) > div.ve-ce-documentNode.ve-ce-branchNode') - text_field(:alternative_text, css: '.oo-ui-textInputWidget.ve-ui-mwMediaDialog-altText > input') - checkbox(:minor_edit, id: 'wpMinoredit') - div(:no_unused_fields, text: 'No unused fields') - a(:new_link, class: 've-ce-linkAnnotation ve-ce-mwInternalLinkAnnotation new') - span(:options_categories, class: 'oo-ui-tool-title', text: 'Categories') - span(:options_in_hamburger, class: 'oo-ui-tool-title', text: 'Options') - span(:option_advanced_settings, class: 'oo-ui-tool-title', text: 'Advanced settings') - span(:option_page_settings, class: 'oo-ui-tool-title', text: 'Page settings') - div(:options_page_title, class: 'oo-ui-processDialog-location', text: 'Options') - div(:options_settings_content_advanced, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Advanced settings/) - div(:options_settings_content_categories, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Categories/) - div(:options_settings_content_page_settings, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', text: /Page settings/) - checkbox(:option_to_enable_display_title, index: 4) - checkbox(:option_to_redirect_the_page, index: 0) - checkbox(:option_to_prevent_redirect_being_updated, index: 1) - checkbox(:option_to_disable_edit_links, index: 2) - checkbox(:option_to_refer_as_disambiguation_page, index: 3) - span(:option_to_set_index_by_search, class: 'oo-ui-labelElement-label', text: 'Yes', index: 0) - span(:option_to_show_new_section_tab, class: 'oo-ui-labelElement-label', text: 'Yes', index: 1) - div(:page_option_menu, css: '.oo-ui-toolbar-actions .oo-ui-toolbar-tools .oo-ui-toolGroup-tools.oo-ui-clippableElement-clippable') - span(:page_settings_item, class: 'oo-ui-tool-name-settings') - span(:page_settings, class: 'oo-ui-iconElement-icon oo-ui-icon-settings') - div(:page_settings_editlinks, class: 've-test-page-settings-noeditsection') - div(:page_text, id: 'mw-content-text') - a(:page_title, text: /Page title/) - a(:paragraph, text: /Paragraph/) - div(:parameter_icon, text: 'q') - unordered_list(:popup_icon, class: 've-ui-contextSelectWidget') - a(:preformatted, text: /Preformatted/) - span(:ref_list_insert_menu, class: 'oo-ui-tool-name-referencesList') - span(:refs_link, text: 'Reference') - div(:references_title, class: 'oo-ui-processDialog-location', text: /References/) - a(:remove_parameter, css: '.ve-ui-mwParameterPage-removeButton > a:nth-child(1)') - span(:required_parameters_continue_anyway, text: 'Continue anyway') - span(:required_parameters_go_back, text: 'Go back') - span(:required_parameters_missing_message, text: 'Required parameters missing') - span(:return_to_save, class: 'oo-ui-labelElement-label', text: 'Return to save form') - a(:review_changes, css: '.oo-ui-window-content-setup > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1)') - span(:review_failed, text: 'No changes to review') - div(:top_editing_tabs, id: 'p-views') - li(:ve_edit_tab, id: 'ca-ve-edit') - li(:edit_source_tab, id: 'ca-edit') - div(:save_enabled, css: 'div.ve-init-mw-desktopArticleTarget-toolbar .oo-ui-toolbar-actions > div.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled') - div(:search_page_link, class: 'oo-ui-optionWidget-selected') - a(:second_reference, text: '[1]', index: 2) - span(:second_save_page, css: '.oo-ui-processDialog-actions-primary > div:nth-child(1) > a:nth-child(1) > span:nth-child(2)') - div(:settings_apply_button, css: '.oo-ui-window-frame .oo-ui-processDialog-actions-primary') - span(:special_character, class: 'oo-ui-iconElement-icon oo-ui-icon-specialCharacter') - a(:subheading1, text: /Sub-heading 1/) - a(:subheading2, text: /Sub-heading 2/) - a(:subheading3, text: /Sub-heading 3/) - a(:subheading4, text: /Sub-heading 4/) - div(:suggestion_list, class: 'mw-widget-titleInputWidget-menu') - span(:switch_to_source_editing, class: 'oo-ui-iconElement-icon oo-ui-icon-wikiText') - table(:table, class: 've-ce-tableNode') - div(:table_of_contents, class: 've-test-page-settings-table-of-contents') - span(:template_insert_menu, class: 'oo-ui-tool-name-transclusion') - div(:toolbar, class: 've-init-mw-desktopArticleTarget-toolbar') - div(:toolbar_actions, class: 'oo-ui-toolbar-actions') - a(:transclusion, css: 'span.oo-ui-widget.oo-ui-iconElement.oo-ui-tool.oo-ui-tool-name-transclusion.oo-ui-widget-enabled > a') - text_field(:transclusion_description, css: '.oo-ui-inputWidget > input:nth-child(1)') - span(:ve_bullets, css: '.oo-ui-clippableElement-clippable .oo-ui-iconElement-icon.oo-ui-icon-listBullet') - span(:ve_computer_code, class: 'oo-ui-iconElement-icon oo-ui-icon-code') - div(:ve_heading_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-down') - span(:ve_link_icon, class: 'oo-ui-iconElement-icon oo-ui-icon-link') - span(:ve_link_ui, class: 'oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement-label oo-ui-labelWidget oo-ui-processDialog-title oo-ui-labelElement', text: 'Link') - span(:ve_media_menu, class: 'oo-ui-iconElement-icon oo-ui-icon-picture') - span(:ve_more_markup_options, css: 'span.oo-ui-tool-name-more-fewer:nth-child(10) > a:nth-child(1) > span:nth-child(2)') - a(:ve_more_references_options, css: '.ve-test-toolbar-insert > div:nth-child(2) > span:nth-child(8) > a:nth-child(1)') - span(:ve_numbering, class: 'oo-ui-iconElement-icon oo-ui-icon-listNumbered') - span(:ve_references, class: 'oo-ui-iconElement-icon oo-ui-icon-references') - span(:ve_strikethrough, class: 'oo-ui-iconElement-icon oo-ui-icon-strikethrough') - span(:ve_subscript, class: 'oo-ui-iconElement-icon oo-ui-icon-subscript') - span(:ve_superscript, class: 'oo-ui-iconElement-icon oo-ui-icon-superscript') - div(:ve_text_style_button, class: 've-test-toolbar-style') - span(:ve_text_style, class: 'oo-ui-iconElement-icon oo-ui-icon-textStyle') - span(:ve_underline, class: 'oo-ui-iconElement-icon oo-ui-icon-underline') - div(:visual_editor_toolbar, class: 'oo-ui-toolbar-tools') - text_area(:wikitext_editor, id: 'wpTextbox1') - text_area(:formula_area, css: '.oo-ui-popupWidget-popup textarea') - text_field(:media_alternative_text, css: 'div.oo-ui-widget.oo-ui-widget-enabled.oo-ui-inputWidget.oo-ui-textInputWidget.ve-ui-mwMediaDialog-altText > input') - div(:content_box, class: 've-ce-documentNode ve-ce-branchNode noime') - div(:media_alternative_block, class: 'oo-ui-layout oo-ui-iconElement oo-ui-labelElement oo-ui-fieldsetLayout', index: 2) - div(:media_advanced_settings, class: 'oo-ui-outlineOptionWidget-level-0', index: 1) - - def visual_editor_element(script) - Timeout.timeout(10) do - loop do - begin - browser.execute_script script - rescue Selenium::WebDriver::Error::JavascriptError, Selenium::WebDriver::Error::StaleElementReferenceError, Selenium::WebDriver::Error::UnknownError => e - else - e = nil - end - break unless (e.class == Selenium::WebDriver::Error::JavascriptError) || (e.class == Selenium::WebDriver::Error::UnknownError) || (e.class == Selenium::WebDriver::Error::StaleElementReferenceError) - end - end - browser.execute_script script - end - - def ve_bold_text_element - visual_editor_element('return ve.init.target.getToolbar().items[2].tools.bold.$link[0]') - end - - def ve_italics_element - visual_editor_element('return ve.init.target.getToolbar().items[2].tools.italic.$link[0]') - end - - def content_element - visual_editor_element('return ve.init.target.surface.view.documentView.documentNode.$element[0]') - end - - def tools_menu_element - if browser_name == :chrome - div(class: 'oo-ui-widget oo-ui-widget-enabled oo-ui-toolGroup oo-ui-iconElement oo-ui-popupToolGroup oo-ui-listToolGroup') - else - span(class: 'oo-ui-iconElement-icon oo-ui-icon-menu') - end - end -end diff --git a/modules/ve-mw/tests/browser/features/support/pages/zarticlepage.rb b/modules/ve-mw/tests/browser/features/support/pages/zarticlepage.rb deleted file mode 100644 index e51ec42ae4..0000000000 --- a/modules/ve-mw/tests/browser/features/support/pages/zarticlepage.rb +++ /dev/null @@ -1,4 +0,0 @@ -# This page object exists because logged in users should not see these URL params -class ZtargetPage < VisualEditorPage - page_url '<%=params[:article_name]%>?vehidebetadialog=true&veaction=edit' -end diff --git a/modules/ve-mw/tests/browser/features/switch_editing_mode.feature b/modules/ve-mw/tests/browser/features/switch_editing_mode.feature deleted file mode 100644 index 06a5320098..0000000000 --- a/modules/ve-mw/tests/browser/features/switch_editing_mode.feature +++ /dev/null @@ -1,23 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: Switching between wikitext and Visual Editor modes - - Test for both pathways that allow switching between Visual Editor and wikitext editing modes. - - Background: - Given I am logged in - And I go to the browser specific edit page page - When I edit the page with Switch edit mode test - - Scenario: Switch editing modes via toolbar - When I enter the wikitext editor - And I click Edit for VisualEditor - Then I should be in Visual Editor editing mode - - Scenario: Switch editing modes via Page Settings drop-down menu - When I click the Switch to source editing menu option - And I see the Cancel option - And I see the Discard option - And I clear the confirm dialog by clicking Keep changes - And I see the wikitext editor - And I click Edit for VisualEditor from this page - Then I should be in Visual Editor editing alternate mode diff --git a/modules/ve-mw/tests/browser/features/table.feature b/modules/ve-mw/tests/browser/features/table.feature deleted file mode 100644 index 590729c4c9..0000000000 --- a/modules/ve-mw/tests/browser/features/table.feature +++ /dev/null @@ -1,7 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox -Feature: Table - - Scenario: Insert table - Given I go to the "Table Insert Test" page with content "Table Insert Test" - When I click the insert table toolbar element - Then the table should appear diff --git a/modules/ve-mw/tests/browser/features/transclusion.feature b/modules/ve-mw/tests/browser/features/transclusion.feature deleted file mode 100644 index f5934b0be7..0000000000 --- a/modules/ve-mw/tests/browser/features/transclusion.feature +++ /dev/null @@ -1,31 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor Transclusion - - Background: - Given I go to the "Template:Seleniumtest" page with content "Template for selenium testing" - And I go to the "Transclusion VisualEditor Test" page with content "Transclusion VisualEditor Test" - And I click in the editable part - And I click Transclusion - And I can see the Transclusion User Interface - - Scenario: Add template - When I enter S into transclusion Content box - Then I should see a list of template suggestions - - Scenario: Add parameter to template - And I enter S into transclusion Content box - And I see a list of template suggestions - And I click the Add template button - And I see an input text area - When I enter x in the parameter box - Then I should see the Insert template button - - Scenario: Remove parameter - And I enter S into transclusion Content box - And I see a list of template suggestions - And I click the Add template button - And I see an input text area - And I enter q in the parameter box - And I click the parameter representation containing q - When I click Remove parameter - Then I should see the Insert template button diff --git a/modules/ve-mw/tests/browser/features/verify_production_wikis.feature b/modules/ve-mw/tests/browser/features/verify_production_wikis.feature deleted file mode 100644 index efbfec8060..0000000000 --- a/modules/ve-mw/tests/browser/features/verify_production_wikis.feature +++ /dev/null @@ -1,314 +0,0 @@ -@en.wikipedia.beta.wmflabs.org @firefox @skip -Feature: VisualEditor on production wikis - - Verify that VisualEditor is available as - expected on production wiki sites. - - Exclusion: - - http://sv.wiktionary.org - only enabled in NS_USER for now. - - Scenario Outline: VisualEditor production availability - Given I visit a non-existent page at - Then I should see the Visual Editor editing surface - Examples: - | wiki | - | test.wikipedia.org | - | test2.wikipedia.org | - | www.mediawiki.org | - | meta.wikimedia.org | - | incubator.wikimedia.org | - | aa.wikipedia.org | - | ab.wikipedia.org | - | ace.wikipedia.org | - | af.wikipedia.org | - | ak.wikipedia.org | - | als.wikipedia.org | - | am.wikipedia.org | - | an.wikipedia.org | - | ang.wikipedia.org | - | ar.wikipedia.org | - | arc.wikipedia.org | - | arz.wikipedia.org | - | as.wikipedia.org | - | ast.wikipedia.org | - | av.wikipedia.org | - | ay.wikipedia.org | - | az.wikipedia.org | - | ba.wikipedia.org | - | bar.wikipedia.org | - | bat-smg.wikipedia.org | - | bcl.wikipedia.org | - | be.wikipedia.org | - | be-x-old.wikipedia.org | - | bg.wikipedia.org | - | bh.wikipedia.org | - | bi.wikipedia.org | - | bjn.wikipedia.org | - | bm.wikipedia.org | - | bn.wikipedia.org | - | bo.wikipedia.org | - | bpy.wikipedia.org | - | br.wikipedia.org | - | bs.wikipedia.org | - | bug.wikipedia.org | - | bxr.wikipedia.org | - | ca.wikipedia.org | - | cbk-zam.wikipedia.org | - | cdo.wikipedia.org | - | ce.wikipedia.org | - | ceb.wikipedia.org | - | ch.wikipedia.org | - | cho.wikipedia.org | - | chr.wikipedia.org | - | chy.wikipedia.org | - | ckb.wikipedia.org | - | co.wikipedia.org | - | cr.wikipedia.org | - | crh.wikipedia.org | - | cs.wikipedia.org | - | csb.wikipedia.org | - | cu.wikipedia.org | - | cv.wikipedia.org | - | cy.wikipedia.org | - | da.wikipedia.org | - | de.wikipedia.org | - | diq.wikipedia.org | - | dsb.wikipedia.org | - | dv.wikipedia.org | - | dz.wikipedia.org | - | ee.wikipedia.org | - | el.wikipedia.org | - | eml.wikipedia.org | - | en.wikipedia.org | - | eo.wikipedia.org | - | es.wikipedia.org | - | et.wikipedia.org | - | eu.wikipedia.org | - | ext.wikipedia.org | - | fa.wikipedia.org | - | ff.wikipedia.org | - | fi.wikipedia.org | - | fiu-vro.wikipedia.org | - | fj.wikipedia.org | - | fo.wikipedia.org | - | fr.wikipedia.org | - | frp.wikipedia.org | - | frr.wikipedia.org | - | fur.wikipedia.org | - | fy.wikipedia.org | - | ga.wikipedia.org | - | gag.wikipedia.org | - | gan.wikipedia.org | - | gd.wikipedia.org | - | gl.wikipedia.org | - | glk.wikipedia.org | - | gn.wikipedia.org | - | got.wikipedia.org | - | gu.wikipedia.org | - | gv.wikipedia.org | - | ha.wikipedia.org | - | hak.wikipedia.org | - | haw.wikipedia.org | - | he.wikipedia.org | - | hi.wikipedia.org | - | hif.wikipedia.org | - | ho.wikipedia.org | - | hr.wikipedia.org | - | hsb.wikipedia.org | - | ht.wikipedia.org | - | hu.wikipedia.org | - | hy.wikipedia.org | - | hz.wikipedia.org | - | ia.wikipedia.org | - | id.wikipedia.org | - | ie.wikipedia.org | - | ig.wikipedia.org | - | ii.wikipedia.org | - | ik.wikipedia.org | - | ilo.wikipedia.org | - | io.wikipedia.org | - | is.wikipedia.org | - | it.wikipedia.org | - | iu.wikipedia.org | - | ja.wikipedia.org | - | jbo.wikipedia.org | - | jv.wikipedia.org | - | ka.wikipedia.org | - | kaa.wikipedia.org | - | kab.wikipedia.org | - | kbd.wikipedia.org | - | kg.wikipedia.org | - | ki.wikipedia.org | - | kj.wikipedia.org | - | kk.wikipedia.org | - | kl.wikipedia.org | - | km.wikipedia.org | - | kn.wikipedia.org | - | ko.wikipedia.org | - | koi.wikipedia.org | - | kr.wikipedia.org | - | krc.wikipedia.org | - | ks.wikipedia.org | - | ksh.wikipedia.org | - | ku.wikipedia.org | - | kv.wikipedia.org | - | kw.wikipedia.org | - | ky.wikipedia.org | - | la.wikipedia.org | - | lad.wikipedia.org | - | lb.wikipedia.org | - | lbe.wikipedia.org | - | lez.wikipedia.org | - | lg.wikipedia.org | - | li.wikipedia.org | - | lij.wikipedia.org | - | lmo.wikipedia.org | - | ln.wikipedia.org | - | lo.wikipedia.org | - | lt.wikipedia.org | - | ltg.wikipedia.org | - | lv.wikipedia.org | - | map-bms.wikipedia.org | - | mdf.wikipedia.org | - | mg.wikipedia.org | - | mh.wikipedia.org | - | mhr.wikipedia.org | - | mi.wikipedia.org | - | min.wikipedia.org | - | mk.wikipedia.org | - | ml.wikipedia.org | - | mn.wikipedia.org | - | mo.wikipedia.org | - | mr.wikipedia.org | - | mrj.wikipedia.org | - | ms.wikipedia.org | - | mt.wikipedia.org | - | mus.wikipedia.org | - | mwl.wikipedia.org | - | my.wikipedia.org | - | myv.wikipedia.org | - | mzn.wikipedia.org | - | na.wikipedia.org | - | nah.wikipedia.org | - | nap.wikipedia.org | - | nds-nl.wikipedia.org | - | nds.wikipedia.org | - | ne.wikipedia.org | - | new.wikipedia.org | - | ng.wikipedia.org | - | nl.wikipedia.org | - | nn.wikipedia.org | - | no.wikipedia.org | - | nov.wikipedia.org | - | nrm.wikipedia.org | - | nso.wikipedia.org | - | nv.wikipedia.org | - | ny.wikipedia.org | - | oc.wikipedia.org | - | om.wikipedia.org | - | or.wikipedia.org | - | os.wikipedia.org | - | pa.wikipedia.org | - | pag.wikipedia.org | - | pam.wikipedia.org | - | pap.wikipedia.org | - | pcd.wikipedia.org | - | pdc.wikipedia.org | - | pfl.wikipedia.org | - | pi.wikipedia.org | - | pih.wikipedia.org | - | pl.wikipedia.org | - | pms.wikipedia.org | - | pnb.wikipedia.org | - | pnt.wikipedia.org | - | ps.wikipedia.org | - | pt.wikipedia.org | - | qu.wikipedia.org | - | rm.wikipedia.org | - | rmy.wikipedia.org | - | rn.wikipedia.org | - | ro.wikipedia.org | - | roa-rup.wikipedia.org | - | roa-tara.wikipedia.org | - | ru.wikipedia.org | - | rue.wikipedia.org | - | rw.wikipedia.org | - | sa.wikipedia.org | - | sah.wikipedia.org | - | sc.wikipedia.org | - | scn.wikipedia.org | - | sco.wikipedia.org | - | sd.wikipedia.org | - | se.wikipedia.org | - | sg.wikipedia.org | - | sh.wikipedia.org | - | si.wikipedia.org | - | simple.wikipedia.org | - | sk.wikipedia.org | - | sl.wikipedia.org | - | sm.wikipedia.org | - | sn.wikipedia.org | - | so.wikipedia.org | - | sq.wikipedia.org | - | sr.wikipedia.org | - | srn.wikipedia.org | - | ss.wikipedia.org | - | st.wikipedia.org | - | stq.wikipedia.org | - | su.wikipedia.org | - | sv.wikipedia.org | - | sw.wikipedia.org | - | szl.wikipedia.org | - | ta.wikipedia.org | - | te.wikipedia.org | - | tet.wikipedia.org | - | tg.wikipedia.org | - | th.wikipedia.org | - | ti.wikipedia.org | - | tk.wikipedia.org | - | tl.wikipedia.org | - | tn.wikipedia.org | - | to.wikipedia.org | - | tpi.wikipedia.org | - | tr.wikipedia.org | - | ts.wikipedia.org | - | tt.wikipedia.org | - | tum.wikipedia.org | - | tw.wikipedia.org | - | ty.wikipedia.org | - | tyv.wikipedia.org | - | udm.wikipedia.org | - | ug.wikipedia.org | - | uk.wikipedia.org | - | ur.wikipedia.org | - | uz.wikipedia.org | - | ve.wikipedia.org | - | vec.wikipedia.org | - | vep.wikipedia.org | - | vi.wikipedia.org | - | vls.wikipedia.org | - | vo.wikipedia.org | - | wa.wikipedia.org | - | war.wikipedia.org | - | wo.wikipedia.org | - | wuu.wikipedia.org | - | xal.wikipedia.org | - | xh.wikipedia.org | - | xmf.wikipedia.org | - | yi.wikipedia.org | - | yo.wikipedia.org | - | za.wikipedia.org | - | zea.wikipedia.org | - | zh-classical.wikipedia.org | - | zh-min-nan.wikipedia.org | - | zh-yue.wikipedia.org | - | zh.wikipedia.org | - | zu.wikipedia.org | - | fr.wiktionary.org | - | fr.wikibooks.org | - | pt.wikibooks.org | - | fr.wikiversity.org | - | pt.wikiversity.org | - | fr.wikinews.org | - | se.wikimedia.org |