Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/88444
Change subject: Make sitelink browsertests work on beta labs ...................................................................... Make sitelink browsertests work on beta labs - the instances on beta labs provide limited content e.g. there are only a few wikipedias and those only have a limited number of articles. this needs to be taken into account when choosing testcases. an alternative would be to implement a better setup logic, e.g. create new articles on the beta wikipedias before running sitelinks tests. Change-Id: If8eff8824456470253b7172c41e1b45585b396ed --- M selenium_cuc/features/sitelinks.feature M selenium_cuc/features/support/utils/utils.rb 2 files changed, 38 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/44/88444/1 diff --git a/selenium_cuc/features/sitelinks.feature b/selenium_cuc/features/sitelinks.feature index a495da86..c253065 100644 --- a/selenium_cuc/features/sitelinks.feature +++ b/selenium_cuc/features/sitelinks.feature @@ -105,10 +105,10 @@ @save_sitelink @modify_entity Scenario Outline: Save sitelink Given The following sitelinks do not exist: - | enwiki | Africa | + | enwiki | Asia | When I click the sitelink add button And I type enwiki into the siteid input field - And I type Africa into the page input field + And I type Asia into the page input field And I <save> Then There should be 1 sitelinks in the list @@ -120,10 +120,10 @@ @save_sitelink @modify_entity Scenario Outline: Save sitelink & reload Given The following sitelinks do not exist: - | enwiki | Africa | + | enwiki | Asia | When I click the sitelink add button And I type enwiki into the siteid input field - And I type Africa into the page input field + And I type Asia into the page input field And I <save> And I reload the page Then There should be 1 sitelinks in the list @@ -136,10 +136,10 @@ @save_sitelink @modify_entity Scenario: Edit sitelink Given The following sitelinks do not exist: - | enwiki | Africa | + | enwiki | Asia | | enwiki | Europe | When I add the following sitelinks: - | enwiki | Africa | + | enwiki | Asia | And I reload the page And I click the sitelink edit button And I type Europe into the page input field @@ -170,31 +170,31 @@ Examples: | siteid | pagename | expected_language | normalized_pagename | - | enwiki | Africa | English | Africa | - | srwiki | Helijum | српски / srpski | Хелијум | + | enwiki | Asia | English | Asia | + # | srwiki | Helijum | српски / srpski | Хелијум | @save_sitelink @modify_entity Scenario: Add multiple sitelinks Given The following sitelinks do not exist: | enwiki | Europe | - | dewiki | Europa | - | itwiki | Europa | + | dewiki | Testseite | + | sqwiki | Wikipedia | When I add the following sitelinks: | enwiki | Europe | - | dewiki | Europa | - | itwiki | Europa | + | dewiki | Testseite | + | sqwiki | Wikipedia | Then There should be 3 sitelinks in the list @save_sitelink @modify_entity Scenario: Remove multiple sitelinks Given The following sitelinks do not exist: | enwiki | Europe | - | dewiki | Europa | - | itwiki | Europa | + | dewiki | Testseite | + | sqwiki | Wikipedia | When I add the following sitelinks: | enwiki | Europe | - | dewiki | Europa | - | itwiki | Europa | + | dewiki | Testseite | + | sqwiki | Wikipedia | And I remove all sitelinks And I reload the page Then There should be 0 sitelinks in the list @@ -204,48 +204,48 @@ @save_sitelink @modify_entity Scenario: Initial sorting of sitelinks Given The following sitelinks do not exist: - | enwiki | Rome | - | dewiki | Rom | - | itwiki | Roma | - | fiwiki | Rooma | + | enwiki | Rashidun | + | dewiki | Error | + | sqwiki | Wikipedia | + | simplewiki | Wiktionary | When I add the following sitelinks: - | enwiki | Rome | - | dewiki | Rom | - | itwiki | Roma | - | fiwiki | Rooma | + | enwiki | Rashidun | + | dewiki | Error | + | sqwiki | Wikipedia | + | simplewiki | Wiktionary | And I reload the page Then There should be 4 sitelinks in the list And Order of sitelinks should be: - | dewiki | enwiki | fiwiki | itwiki | + | dewiki | enwiki | simplewiki | sqwiki | @save_sitelink @modify_entity Scenario: Sorting sitelinks by languagename Given The following sitelinks do not exist: - | enwiki | Rome | - | dewiki | Rom | - | itwiki | Roma | - | fiwiki | Rooma | + | enwiki | Rashidun | + | dewiki | Error | + | sqwiki | Wikipedia | + | simplewiki | Wiktionary | When I add the following sitelinks: - | enwiki | Rome | - | dewiki | Rom | - | itwiki | Roma | - | fiwiki | Rooma | + | enwiki | Rashidun | + | dewiki | Error | + | sqwiki | Wikipedia | + | simplewiki | Wiktionary | And I reload the page And I order the sitelinks by languagename Then There should be 4 sitelinks in the list And Order of sitelinks should be: - | dewiki | enwiki | itwiki | fiwiki | + | dewiki | enwiki | sqwiki | simplewiki | @save_sitelink @modify_entity Scenario: List of sitelinks is complete Given The following sitelinks do not exist: | enwiki | Europe | - | dewiki | Europa | + | dewiki | Testseite | When I add the following sitelinks: | enwiki | Europe | And I mock that the list of sitelinks is complete And I add the following sitelinks: - | dewiki | Europa | + | dewiki | Testseite | Then Sitelink add button should be disabled @save_sitelink diff --git a/selenium_cuc/features/support/utils/utils.rb b/selenium_cuc/features/support/utils/utils.rb index c7724f7..6f29261 100644 --- a/selenium_cuc/features/support/utils/utils.rb +++ b/selenium_cuc/features/support/utils/utils.rb @@ -67,6 +67,8 @@ resp = ActiveSupport::JSON.decode(response.body) if resp["success"] != 1 && resp["error"]["code"] != 'no-such-entity-link' + puts siteid + puts resp["error"]["code"] abort('Failed to create new entity: API error') end -- To view, visit https://gerrit.wikimedia.org/r/88444 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8eff8824456470253b7172c41e1b45585b396ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits