diff --git a/.gitignore b/.gitignore deleted file mode 100644 index deeb73b..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*~ -*.kate-swp - -composer.lock - -vendor/ - -!.* -.idea/ - -.bundle/* - -.DS_Store diff --git a/.gitreview b/.gitreview deleted file mode 100644 index 077c44e..0000000 --- a/.gitreview +++ /dev/null @@ -1,6 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=wikidata/browsertests.git -defaultbranch=master -defaultrebase=0 diff --git a/.rubocop.yml b/.rubocop.yml deleted file mode 100644 index 430f3ae..0000000 --- a/.rubocop.yml +++ /dev/null @@ -1,23 +0,0 @@ -# See https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby -inherit_from: .rubocop_todo.yml - -AllCops: - StyleGuideCopsOnly: true - -Metrics/MethodLength: - Enabled: false - -Style/Alias: - Enabled: false - -Style/SignalException: - Enabled: false - -Style/TrivialAccessors: - ExactNameMatch: true - -Style/StringLiterals: - EnforcedStyle: single_quotes - -Style/AsciiComments: - Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml deleted file mode 100644 index e0ab40e..0000000 --- a/.rubocop_todo.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This configuration was generated by `rubocop --auto-gen-config` -# on 2014-11-13 12:15:50 +0100 using RuboCop version 0.27.1. -# The point is for the user to remove these configuration records -# one by one as the offenses are removed from the code base. -# Note that changes in the inspected code, or installation of new -# versions of RuboCop, may require this file to be generated again. - -# Offense count: 164 -# Configuration parameters: AllowURI, URISchemes. -Metrics/LineLength: - Max: 465 - -# Offense count: 2 -# Configuration parameters: MinBodyLength. -Style/GuardClause: - Enabled: false - -# Offense count: 9 -# Configuration parameters: MaxLineLength. -Style/IfUnlessModifier: - Enabled: false - -# Offense count: 1 -# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. -Style/Next: - Enabled: false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 52208d0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: ruby - -rvm: - - 1.9.3 - -script: - - bundle exec rubocop diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 80c8b61..0000000 --- a/Gemfile +++ /dev/null @@ -1,12 +0,0 @@ -# ruby=ruby-2.1.1 -# ruby-gemset=Wikibase - -source 'https://rubygems.org' - -gem 'activesupport', '~> 4.2', '>= 4.2.6' -gem 'mediawiki_api-wikidata', '~> 0.2.0', '>= 0.2.1' -gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.1' -gem 'parallel_tests', '~> 2.5' -gem 'rake', '~> 11.1', '>= 11.1.2' -gem 'require_all', '~> 1.3', '>= 1.3.3' -gem 'rubocop', '~> 0.40.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 3ac408b..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,124 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - ast (2.2.0) - builder (3.2.2) - childprocess (0.5.9) - 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 (0.22) - faker (>= 1.1.2) - yml_reader (>= 0.6) - diff-lcs (1.2.5) - domain_name (0.5.20160310) - unf (>= 0.0.5, < 1.0.0) - faker (1.6.3) - i18n (~> 0.5) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday-cookie_jar (0.0.6) - faraday (>= 0.7.4) - http-cookie (~> 1.0.0) - ffi (1.9.10) - gherkin (2.12.2) - multi_json (~> 1.3) - headless (2.2.3) - http-cookie (1.0.2) - domain_name (~> 0.5) - i18n (0.7.0) - json (1.8.3) - mediawiki_api (0.6.0) - faraday (~> 0.9, >= 0.9.0) - faraday-cookie_jar (~> 0.0, >= 0.0.6) - mediawiki_api-wikidata (0.2.1) - mediawiki_api (~> 0.6.0) - mediawiki_selenium (1.7.1) - cucumber (~> 1.3, >= 1.3.20) - headless (~> 2.0, >= 2.1.0) - json (~> 1.8, >= 1.8.1) - mediawiki_api (~> 0.6, >= 0.6.0) - page-object (~> 1.0) - rest-client (~> 1.6, >= 1.6.7) - rspec-core (~> 2.14, >= 2.14.4) - rspec-expectations (~> 2.14, >= 2.14.4) - syntax (~> 1.2, >= 1.2.0) - thor (~> 0.19, >= 0.19.1) - mime-types (2.99.2) - minitest (5.8.4) - multi_json (1.12.1) - multi_test (0.1.2) - multipart-post (2.0.0) - netrc (0.11.0) - page-object (1.1.1) - page_navigation (>= 0.9) - selenium-webdriver (>= 2.44.0) - watir-webdriver (>= 0.6.11) - page_navigation (0.9) - data_magic (>= 0.14) - parallel (1.8.0) - parallel_tests (2.5.0) - parallel - parser (2.3.1.0) - ast (~> 2.2) - powerpack (0.1.1) - rainbow (2.1.0) - rake (11.1.2) - require_all (1.3.3) - 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.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.8.0) - rubyzip (1.2.0) - selenium-webdriver (2.53.0) - childprocess (~> 0.5) - rubyzip (~> 1.0) - websocket (~> 1.0) - syntax (1.2.0) - thor (0.19.1) - thread_safe (0.3.5) - tzinfo (1.2.2) - thread_safe (~> 0.1) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.0.5) - watir-webdriver (0.9.1) - selenium-webdriver (>= 2.46.2) - websocket (1.2.3) - yml_reader (0.7) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (~> 4.2, >= 4.2.6) - mediawiki_api-wikidata (~> 0.2.0, >= 0.2.1) - mediawiki_selenium (~> 1.7, >= 1.7.1) - parallel_tests (~> 2.5) - rake (~> 11.1, >= 11.1.2) - require_all (~> 1.3, >= 1.3.3) - rubocop (~> 0.40.0) - -BUNDLED WITH - 1.12.5 diff --git a/README.md b/README.md index c4d84ef..762dbbd 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,7 @@ Wikidata Browser Tests ====================== -This repository contains the browser tests for [Wikidata](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Wikidata). +This repository is now inactive. -## Executing tests +It contained the browser tests for Wikidata which have been moved to https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Wikibase. -Update/install gems: -```shell -bundle install -``` - -Switch to the `tests/browser/` directory to run all tests: -```shell -bundle exec cucumber -``` - -Run a specific feature: -```shell -bundle exec cucumber features/label.feature -``` - -Run a specific scenario: -```shell -bundle exec cucumber features/label.feature:17 -``` - -Run only tests with a specific tag: -```shell -bundle exec cucumber --tag @ui_only -``` - -Run only tests that are supposed to be executed locally: -```shell -bundle exec cucumber --tag @local_config -``` - -## Configuration and setup -For setup and configuration please see [Browser Testing for Wikidata](https://www.mediawiki.org/wiki/Wikibase/Programmer%27s_guide_to_Wikibase#Browser_Testing_for_Wikidata). +See https://phabricator.wikimedia.org/T144486 for more information. \ No newline at end of file diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 2877bf6..0000000 --- a/Rakefile +++ /dev/null @@ -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] diff --git a/composer.json b/composer.json deleted file mode 100644 index 4c9bbf0..0000000 --- a/composer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "wikidata/browser-tests", - "description": "Browsertests for Wikidata", - "keywords": [ - "tests", - "browser", - "wikidata" - ], - "license": "GPL-2.0+", - "authors": [ - { - "name": "Tobi Gritschacher", - "homepage": "http://www.gritschacher.eu" - } - ], - "support": { - "issues": "https://phabricator.wikimedia.org/", - "irc": "irc://irc.freenode.net/wikidata" - }, - "require": { - "composer/installers": ">=1.0.1" - } -} diff --git a/tests/browser/ci.yml b/tests/browser/ci.yml deleted file mode 100644 index 0902f17..0000000 --- a/tests/browser/ci.yml +++ /dev/null @@ -1,9 +0,0 @@ -BROWSER: - - firefox - -MEDIAWIKI_ENVIRONMENT: - - beta - - test - -PLATFORM: - - Linux diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml deleted file mode 100644 index 3b28ccd..0000000 --- a/tests/browser/environments.yml +++ /dev/null @@ -1,52 +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 - language_code: en - browser: firefox - mediawiki_url: http://127.0.0.1:8080/wiki/ - mediawiki_user: Selenium_user - mediawiki_password: vagrant - -mw-vagrant-guest: - language_code: en - browser: firefox - mediawiki_url: http://127.0.0.1/wiki/ - mediawiki_user: Selenium_user - mediawiki_password: vagrant - -beta: - language_code: en - browser: firefox - mediawiki_url: https://wikidata.beta.wmflabs.org/wiki/ - mediawiki_user: Selenium_user - # mediawiki_password: SET THIS IN THE ENVIRONMENT! - -test: - language_code: en - browser: firefox - mediawiki_url: https://test.wikidata.org/wiki/ - mediawiki_user: Selenium_user - # mediawiki_password: SET THIS IN THE ENVIRONMENT! - -integration: - item_namespace: 'Item:' - language_code: en - browser: chrome - user_factory: true - # mediawiki_url: JENKINS WILL SET THIS - -default: *default diff --git a/tests/browser/features/aliases.feature b/tests/browser/features/aliases.feature deleted file mode 100644 index 8a5f965..0000000 --- a/tests/browser/features/aliases.feature +++ /dev/null @@ -1,206 +0,0 @@ -# Wikidata UI tests -# -# Author:: Tobias Gritschacher (tobias.gritschacher@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for item aliases tests - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @test.wikidata.org @wikidata.beta.wmflabs.org -Feature: Edit aliases - - Background: - Given I am on an item page - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - - @ui_only - Scenario: Type new alias - When I click the header edit button - And I enter "alias123" as new aliases - Then Header cancel button should be there - And Header save button should be there - And Modified alias input field should be there - And New alias input field should be there - - @ui_only - Scenario Outline: Cancel aliases - When I click the header edit button - And I enter "alias123" as new aliases - And I - Then Header edit button should be there - And Header cancel button should not be there - And New alias input field should not be there - And Header save button should not be there - And Aliases list should be empty - - Examples: - | cancel | - | click the header cancel button | - | press the ESC key in the new alias input field | - - @modify_entity @save_aliases - Scenario Outline: Save alias - When I click the header edit button - And I enter "alias123" as new aliases - And I - Then Aliases list should not be empty - And Header cancel button should not be there - And Header save button should not be there - And Header edit button should be there - And There should be 1 aliases in the list - And List of aliases should be "alias123" - - Examples: - | save | - | click the header save button | - | press the RETURN key in the new alias input field | - - @modify_entity @save_aliases - Scenario Outline: Save alias and reload - When I click the header edit button - And I enter "alias123" as new aliases - And I - And I reload the page - Then Header edit button should be there - And There should be 1 aliases in the list - And List of aliases should be "alias123" - - Examples: - | save | - | click the header save button | - | press the RETURN key in the new alias input field | - - @modify_entity @save_aliases @smoke - Scenario: Save multiple aliases - When I click the header edit button - And I enter "alias1", "alias2", "alias3" as new aliases - And I click the header save button - Then Aliases list should not be empty - And There should be 3 aliases in the list - And List of aliases should be "alias1", "alias2", "alias3" - - @modify_entity @save_aliases - Scenario: Remove alias - When I click the header edit button - And I enter "alias1", "alias2" as new aliases - And I click the header save button - And I click the header edit button - And I empty the first alias - And I click the header save button - Then List of aliases should be "alias2" - And There should be 1 aliases in the list - - @modify_entity @save_aliases - Scenario: Remove all aliases - When I click the header edit button - And I enter "alias1", "alias2" as new aliases - And I click the header save button - And I click the header edit button - And I empty the first alias - And I empty the first alias - And I click the header save button - Then Aliases list should be empty - And Header edit button should be there - - @modify_entity @save_aliases - Scenario: Remove all aliases and reload - When I click the header edit button - And I enter "alias1", "alias2" as new aliases - And I click the header save button - And I click the header edit button - And I empty the first alias - And I empty the first alias - And I click the header save button - And I reload the page - Then Aliases list should be empty - And Header edit button should be there - - @ui_only - Scenario: Edit aliases UI - When I click the header edit button - And I enter "alias123" as new aliases - And I click the header save button - And I click the header edit button - Then New alias input field should be there - And First alias input field should contain alias123 - And Header save button should not be there - And Header cancel button should be there - - @modify_entity @save_aliases - Scenario: Edit multiple aliases - When I click the header edit button - And I enter "alias1", "alias2" as new aliases - And I click the header save button - And I click the header edit button - And I enter "alias3", "alias4" as new aliases - And I empty the first alias - And I change the first alias to alias5 - And I click the header save button - Then There should be 3 aliases in the list - And List of aliases should be "alias5", "alias3", "alias4" - - @ui_only - Scenario: Duplicated aliases detection - When I click the header edit button - And I enter "alias1", "alias2", "alias1" as new aliases - Then Duplicate alias input field should be there - And Header save button should be there - And Header cancel button should be there - - @ui_only - Scenario: Duplicated aliases resolve - When I click the header edit button - And I enter "alias1", "alias2", "alias1" as new aliases - And I empty the first alias - Then Duplicate alias input field should not be there - - @modify_entity @save_aliases - Scenario: Save duplicated aliases - When I click the header edit button - And I enter "alias1", "alias2", "alias1" as new aliases - And I click the header save button - Then There should be 2 aliases in the list - And List of aliases should be "alias1", "alias2" - - @modify_entity @save_aliases - Scenario Outline: Special inputs for aliases - When I click the header edit button - And I enter as new aliases - And I click the header save button - Then There should be 1 aliases in the list - And List of aliases should be - - Examples: - | alias | alias_expected | - | "0" | "0" | - | " norm a lize me " | "norm a lize me" | - | "" | "" | - - @save_aliases - Scenario: Too long input for alias - When I click the header edit button - And I enter "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong" as new aliases - And I click the header save button - Then An error message should be displayed - - @bugfix @modify_entity @save_aliases - Scenario: Zombie alias bugfix - When I click the header edit button - And I enter "zombie" as new aliases - And I click the header save button - And I reload the page - And I click the header edit button - And I empty the first alias - And I click the header save button - And I click the header edit button - And I enter "alias123" as new aliases - And I click the header save button - Then There should be 1 aliases in the list - And List of aliases should be "alias123" - - @bugfix @ui_only - Scenario: Bugfix for editbutton appearing when it should not - When I click the header edit button - And I click the header cancel button - And I click the header edit button - Then Header edit button should not be there diff --git a/tests/browser/features/authority_control_gadget.feature b/tests/browser/features/authority_control_gadget.feature deleted file mode 100644 index 4ca5d7f..0000000 --- a/tests/browser/features/authority_control_gadget.feature +++ /dev/null @@ -1,38 +0,0 @@ -# Wikidata UI tests -# -# Author:: Tobias Gritschacher (tobias.gritschacher@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for authority control gadget tests - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @smoke -Feature: Authority control gadget test - - Scenario Outline: Check links created by gadget - When I navigate to item with resource loader debug mode - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - Then Authority control link should be active for claim 1 in group 1 - And Authority control link should be active for claim 1 in group 2 - And Authority control link should be active for claim 1 in group 3 - And Authority control link should be active for claim 1 in group 4 - And Authority control link should be active for claim 1 in group 5 - And Authority control link should be active for claim 1 in group 6 - And Authority control link should be active for claim 1 in group 7 - And Authority control link should be active for claim 1 in group 8 - And Authority control link should be active for claim 1 in group 9 - And Authority control link of claim 1 in group 1 should link to www.openstreetmap.org - And Authority control link of claim 1 in group 2 should link to commons.wikimedia.org - And Authority control link of claim 1 in group 3 should link to tools.wmflabs.org/geohack/geohack.php - And Authority control link of claim 1 in group 4 should link to imdb.com - And Authority control link of claim 1 in group 5 should link to d-nb.info - And Authority control link of claim 1 in group 6 should link to viaf.org - And Authority control link of claim 1 in group 7 should link to www.dmoz.org - And Authority control link of claim 1 in group 8 should link to musicbrainz.org - And Authority control link of claim 1 in group 9 should link to www.freebase.com - - @wikidata.beta.wmflabs.org - Examples: - | item_id | debug_mode | - | Q12480 | false | - | Q12480 | true | diff --git a/tests/browser/features/delete_item.feature b/tests/browser/features/delete_item.feature deleted file mode 100644 index 90379e1..0000000 --- a/tests/browser/features/delete_item.feature +++ /dev/null @@ -1,14 +0,0 @@ -# Wikidata item tests -# -# License:: GNU GPL v2+ -# -# feature the delete of an item - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @wikidata.beta.wmflabs.org -Feature: Delete item - -Scenario: Delete item - Given I am logged in to the repo - And I am on an item page - When I click the item delete button - Then Page should be deleted diff --git a/tests/browser/features/description.feature b/tests/browser/features/description.feature deleted file mode 100644 index 3f1893f..0000000 --- a/tests/browser/features/description.feature +++ /dev/null @@ -1,82 +0,0 @@ -# Wikidata UI tests -# -# Author:: Tobias Gritschacher (tobias.gritschacher@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for item description tests - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @test.wikidata.org @wikidata.beta.wmflabs.org -Feature: Edit description - - Background: - Given I am on an item page - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - - @ui_only - Scenario: Modify the description - When I click the header edit button - And I enter "MODIFIED DESCRIPTION" as description - Then Header save button should be there - And Header cancel button should be there - And Header edit button should not be there - - @ui_only - Scenario Outline: Cancel description - When I click the header edit button - And I enter "MODIFIED DESCRIPTION" as description - And I - Then Header edit button should be there - And Header cancel button should not be there - And Original description should be displayed - - Examples: - | cancel | - | click the header cancel button | - | press the ESC key in the description input field | - - @save_description @modify_entity - Scenario Outline: Save description - When I click the header edit button - And I enter "MODIFIED DESCRIPTION" as description - And I - Then "MODIFIED DESCRIPTION" should be displayed as description - - Examples: - | save | - | click the header save button | - | press the RETURN key in the description input field | - - @save_description @modify_entity - Scenario Outline: Save description - When I click the header edit button - And I enter "MODIFIED DESCRIPTION" as description - And I - And I reload the page - Then "MODIFIED DESCRIPTION" should be displayed as description - - Examples: - | save | - | click the header save button | - | press the RETURN key in the description input field | - - @save_description @modify_entity - Scenario Outline: Description with special input - When I click the header edit button - And I enter as description - And I click the header save button - Then should be displayed as description - - Examples: - | description | expected_description | - | "0" | "0" | - | " norm a lize me " | "norm a lize me" | - | "" | "" | - | "{{Template:blabla}}" | "{{Template:blabla}}" | - - @save_description - Scenario: Description with a too long value - When I click the header edit button - And I enter a long string as description - And I click the header save button - Then An error message should be displayed diff --git a/tests/browser/features/edit_tab.feature b/tests/browser/features/edit_tab.feature deleted file mode 100644 index 8c5ef3c..0000000 --- a/tests/browser/features/edit_tab.feature +++ /dev/null @@ -1,14 +0,0 @@ -# Wikidata item tests -# -# License:: GNU GPL v2+ -# -# feature the functionality of the edit tab function - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @test.wikidata.org @wikidata.beta.wmflabs.org -Feature: Edit tab - -Scenario: Edit tab - Given I am on an item page - Then the edit-tab button should not be visible - - diff --git a/tests/browser/features/empty_label_and_description.feature b/tests/browser/features/empty_label_and_description.feature deleted file mode 100644 index 2b700a0..0000000 --- a/tests/browser/features/empty_label_and_description.feature +++ /dev/null @@ -1,80 +0,0 @@ -# Wikidata UI tests -# -# Author:: Tobias Gritschacher (tobias.gritschacher@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for item description tests - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @test.wikidata.org @wikidata.beta.wmflabs.org -Feature: Empty label and description behaviour - - Background: - Given I am on an item page with empty label and description - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - - @ui_only - Scenario: Description UI is shown correctly when description is empty - Then Description input element should not be there - And Header edit button should be there - And Header cancel button should not be there - And Header save button should not be there - - @ui_only - Scenario: Description UI is shown correctly when description is empty - When I click the header edit button - Then Description input element should be there - And Description input element should be empty - And Header edit button should not be there - And Header cancel button should be there - And Header save button should not be there - - @ui_only - Scenario: Description UI behaves correctly when description is empty - When I click the header edit button - And I enter "NEW DESCRIPTION" as description - Then Header cancel button should be there - And Header save button should be there - - @ui_only @smoke - Scenario: Description UI behaves correctly when description is empty - When I click the header edit button - And I enter "NEW DESCRIPTION" as description - And I click the header cancel button - Then Header cancel button should not be there - And Header edit button should be there - And Header save button should not be there - And Description input element should not be there - - @ui_only - Scenario: Label UI is shown correctly when label is empty - Then Label input element should not be there - And Header edit button should be there - And Header cancel button should not be there - And Header save button should not be there - - @ui_only - Scenario: Label UI is shown correctly when label is empty - When I click the header edit button - Then Label input element should be there - And Label input element should be empty - And Header edit button should not be there - And Header cancel button should be there - And Header save button should not be there - - @ui_only - Scenario: Label UI behaves correctly when label is empty - When I click the header edit button - And I enter "NEW LABEL" as label - Then Header cancel button should be there - And Header save button should be there - - @ui_only - Scenario: Label UI behaves correctly when label is empty - When I click the header edit button - And I enter "NEW LABEL" as label - And I click the header cancel button - Then Header cancel button should not be there - And Header edit button should be there - And Header save button should not be there - And Label input element should not be there \ No newline at end of file diff --git a/tests/browser/features/header.feature b/tests/browser/features/header.feature deleted file mode 100644 index 54e850e..0000000 --- a/tests/browser/features/header.feature +++ /dev/null @@ -1,95 +0,0 @@ -# Wikidata UI tests -# -# Author:: Christoph Fischer (christoph.fischer@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for item header tests - -@chrome @firefox @internet_explorer_10 @internet_explorer_11 @local_config @test.wikidata.org @wikidata.beta.wmflabs.org -Feature: Use header - - Background: - Given I am on an item page - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - - @ui_only - Scenario: Header UI has all required elements - Then Original label should be displayed - And Original description should be displayed - And Header edit button should be there - And Header cancel button should not be there - And Header save button should not be there - - @ui_only - Scenario: Click edit button - When I click the header edit button - Then Header edit button should not be there - And Header save button should not be there - And Header cancel button should be there - And Label input element should be there - And Label input element should contain original label - And Description input element should be there - And Description input element should contain original description - And New alias input field should be there - - @ui_only - Scenario: Modify label, description and aliases - When I click the header edit button - And I enter random string as label - And I enter "MODIFIED DESCRIPTION" as description - And I enter "alias123" as new aliases - Then Header save button should be there - And Header cancel button should be there - And Header edit button should not be there - And Modified alias input field should be there - And New alias input field should be there - - @ui_only - Scenario Outline: Cancel label, description and aliases - When I click the header edit button - And I enter random string as label - And I enter "MODIFIED DESCRIPTION" as description - And I enter "alias123" as new aliases - And I - Then Header edit button should be there - And Header save button should not be there - And Header cancel button should not be there - And Original description should be displayed - And Original label should be displayed - And Aliases list should be empty - - - Examples: - | cancel | - | click the header cancel button | - | press the ESC key in the label input field | - - @modify_entity @save_description @save_aliases @save_label - Scenario Outline: Save label, description and aliases - When I click the header edit button - And I enter random string as label - And I enter "MODIFIED DESCRIPTION" as description - And I enter "alias123" as new aliases - And I - Then Header edit button should be there - And Header save button should not be there - And Header cancel button should not be there - And random string should be displayed as label - And "MODIFIED DESCRIPTION" should be displayed as description - And There should be 1 aliases in the list - And List of aliases should be "alias123" - - Examples: - | save | - | click the header save button | - | press the RETURN key in the description input field | - - @bugfix @modify_entity - Scenario: EntityTermView bugfix - When I click the header edit button - And I enter random string as label - And I click the header save button - And I reload the page - Then random string should be displayed as label - And random string should be displayed as English label in the EntityTermView box \ No newline at end of file diff --git a/tests/browser/features/item_smoke.feature b/tests/browser/features/item_smoke.feature deleted file mode 100644 index 22e6505..0000000 --- a/tests/browser/features/item_smoke.feature +++ /dev/null @@ -1,65 +0,0 @@ -# Wikidata UI tests -# -# Author:: Tobias Gritschacher (tobias.gritschacher@wikimedia.de) -# License:: GNU GPL v2+ -# -# feature definition for item smoke test - -@smoke @firefox @chrome @internet_explorer_10 @internet_explorer_11 -Feature: Item smoke test - - Scenario Outline: Check UI elements - When I navigate to item with resource loader debug mode - And The copyright warning has been dismissed - And Anonymous edit warnings are disabled - Then Header edit button should be there - And Label element should be there - And