jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/364325 )
Change subject: Remove browser tests of features that now belong to Minerva
......................................................................
Remove browser tests of features that now belong to Minerva
Change-Id: I5e83d9e75f3c01fc984f221ae5f4fb7394b4a127
Depends-On: Iff1f7e63e796cc5d4a6d2ab0370e0c33248d2fce
Bug: T168758
---
D tests/browser/features/category.feature
D tests/browser/features/diff.feature
D tests/browser/features/editor_wikitext_nosave.feature
D tests/browser/features/editor_wikitext_saving.feature
D tests/browser/features/issues.feature
D tests/browser/features/language.feature
D tests/browser/features/mainmenu.feature
D tests/browser/features/mainmenu_loggedin.feature
D tests/browser/features/no_javascript_site.feature
D tests/browser/features/notification.feature
D tests/browser/features/pageactions.feature
D tests/browser/features/pageactions_protected.feature
D tests/browser/features/references.feature
D tests/browser/features/search.feature
D tests/browser/features/search_loggedin.feature
D tests/browser/features/search_tablet.feature
D tests/browser/features/signup_edit_tutorial.feature
D tests/browser/features/special.feature
D tests/browser/features/step_definitions/category_steps.rb
M tests/browser/features/step_definitions/common_article_steps.rb
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/create_page_api_steps.rb
D tests/browser/features/step_definitions/diff_steps.rb
D tests/browser/features/step_definitions/editor_steps.rb
D tests/browser/features/step_definitions/editor_ve_steps.rb
D tests/browser/features/step_definitions/issues_steps.rb
D tests/browser/features/step_definitions/language_icon_steps.rb
D tests/browser/features/step_definitions/language_steps.rb
D tests/browser/features/step_definitions/mainmenu_steps.rb
D tests/browser/features/step_definitions/messages_steps.rb
D tests/browser/features/step_definitions/nearby_steps.rb
D tests/browser/features/step_definitions/notification_steps.rb
D tests/browser/features/step_definitions/pageactions_steps.rb
D tests/browser/features/step_definitions/references_steps.rb
D tests/browser/features/step_definitions/search_steps.rb
D tests/browser/features/step_definitions/signup_edit_tutorial.rb
M tests/browser/features/step_definitions/special_history_steps.rb
D tests/browser/features/step_definitions/talk_steps.rb
D tests/browser/features/step_definitions/toc_steps.rb
D tests/browser/features/step_definitions/toggling_steps.rb
D tests/browser/features/step_definitions/ui_links_steps.rb
M tests/browser/features/step_definitions/user_page_steps.rb
D tests/browser/features/step_definitions/watchstar_steps.rb
D tests/browser/features/step_definitions/wikidata_descriptions.rb
D tests/browser/features/talk.feature
D tests/browser/features/toc.feature
D tests/browser/features/toggling.feature
D tests/browser/features/toggling_tablet.feature
D tests/browser/features/ui.feature
D tests/browser/features/user_page.feature
D tests/browser/features/watchstar.feature
D tests/browser/features/wikidata_descriptions.feature
52 files changed, 0 insertions(+), 1,448 deletions(-)
Approvals:
jenkins-bot: Verified
Jdlrobson: Looks good to me, approved
diff --git a/tests/browser/features/category.feature
b/tests/browser/features/category.feature
deleted file mode 100644
index 090ab6d..0000000
--- a/tests/browser/features/category.feature
+++ /dev/null
@@ -1,11 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant @login
-Feature: Categories
-
- Scenario: I can view categories
- Given I am in a wiki that has categories
- And I am using the mobile site
- And I am in beta mode
- And I am on the "Selenium categories test page" page
- When I click on the category button
- Then I should see the categories overlay
- And I should see a list of categories
diff --git a/tests/browser/features/diff.feature
b/tests/browser/features/diff.feature
deleted file mode 100644
index 98f7d3d..0000000
--- a/tests/browser/features/diff.feature
+++ /dev/null
@@ -1,14 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant @login
-Feature: Page diff
-
- @smoke @editing @integration
- Scenario: Added and removed content
- Given I am logged into the mobile website
- And I am on a page that has the following edits:
- | text |
- | ABC DEF |
- | ABC GHI |
- And I click on the history link in the last modified bar
- And I open the latest diff
- Then I should see "GHI" as added content
- And I should see "DEF" as removed content
diff --git a/tests/browser/features/editor_wikitext_nosave.feature
b/tests/browser/features/editor_wikitext_nosave.feature
deleted file mode 100644
index eba39de..0000000
--- a/tests/browser/features/editor_wikitext_nosave.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant @login
-Feature: Wikitext Editor
-
- Background:
- Given I am logged into the mobile website
- And I am on a page that does not exist
- And I click the edit button
- And I see the wikitext editor overlay
-
- @smoke @integration
- Scenario: Closing editor (overlay button)
- When I click the wikitext editor overlay close button
- Then I should not see the wikitext editor overlay
-
- Scenario: Closing editor (browser button)
- When I click the browser back button
- Then I should not see the wikitext editor overlay
diff --git a/tests/browser/features/editor_wikitext_saving.feature
b/tests/browser/features/editor_wikitext_saving.feature
deleted file mode 100644
index 1af2936..0000000
--- a/tests/browser/features/editor_wikitext_saving.feature
+++ /dev/null
@@ -1,52 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @login
-Feature: Wikitext Editor (Makes actual saves)
-
- Background:
- Given I am logged into the mobile website
-
- @smoke @editing @integration
- Scenario: Successful edit on page without languages shows no language button
[bug 63675]
- Given the page "Selenium no languages test page" exists
- When I click the edit button
- And I see the wikitext editor overlay
- And I type "ABC GHI" into the editor
- And I click continue
- And I click submit
- Then I should see a toast notification
- And the text of the first heading should be "Selenium no languages test
page"
-
- @editing
- Scenario: Successful edit reloads language button
- Given I go to a page that has languages
- When I click the edit button
- And I see the wikitext editor overlay
- And I type "ABC GHI" into the editor
- And I click continue
- And I click submit
- And I do not see the wikitext editor overlay
- Then I should see a toast notification
-
- @editing
- Scenario: Redirects
- Given the page "Selenium wikitext editor test" exists
- And I am on a page that does not exist
- When I click the edit button
- And I clear the editor
- And I type "#REDIRECT [[Selenium wikitext editor test]]" into the editor
- And I click continue
- And I click submit
- And I say OK in the confirm dialog
- And I do not see the wikitext editor overlay
- Then the text of the first heading should be "Selenium wikitext editor
test"
-
- @editing
- Scenario: Broken redirects
- Given I am on a page that does not exist
- When I click the edit button
- And I clear the editor
- And I type "#REDIRECT [[AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA]]" into the
editor
- And I click continue
- And I click submit
- And I say OK in the confirm dialog
- And I do not see the wikitext editor overlay
- Then there should be a red link with text
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
diff --git a/tests/browser/features/issues.feature
b/tests/browser/features/issues.feature
deleted file mode 100644
index 8a8504d..0000000
--- a/tests/browser/features/issues.feature
+++ /dev/null
@@ -1,23 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant
-Feature: Issues
-
- Background:
- Given I am using the mobile site
- And I am on a page which has cleanup templates
- And this page has issues
-
- Scenario: Clicking page issues opens overlay
- When I click the page issues stamp
- Then I should see the issues overlay
-
- Scenario: Closing page issues
- When I click the page issues stamp
- And I see the issues overlay
- And I click the overlay issue close button
- Then I should not see the issues overlay
-
- Scenario: Closing page issues (browser back)
- When I click the page issues stamp
- And I see the issues overlay
- And I click the browser back button
- Then I should not see the issues overlay
diff --git a/tests/browser/features/language.feature
b/tests/browser/features/language.feature
deleted file mode 100644
index 454d96a..0000000
--- a/tests/browser/features/language.feature
+++ /dev/null
@@ -1,60 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
-Feature: Language selection
-
- Background:
- Given I am using the mobile site
-
- @smoke @integration
- Scenario: Language button
- Given I go to a page that has languages
- Then I should see the switch-language page action
-
- @smoke @integration
- Scenario: Language button (on a page that doesn't have languages)
- Given I go to a page that does not have languages
- Then I should see the disabled switch-language page action
-
- Scenario: Tapping icon opens language overlay
- Given I go to a page that has languages
- When I click the switch-language page action
- Then I should see the language overlay
-
- Scenario: Tapping icon does not open language overlay (on a page that
doesn't have languages)
- Given I go to a page that does not have languages
- When I click the switch-language page action
- Then I should not see the languages overlay
-
- Scenario: Tapping the disabled icon shows a toast
- Given I go to a page that does not have languages
- When I click the switch-language page action
- Then I should see a toast with message about page not being available in
other languages
-
- Scenario: Closing language overlay (overlay button)
- Given I go to a page that has languages
- When I click the switch-language page action
- And I see the language overlay
- And I click the language overlay close button
- Then I should not see the languages overlay
-
- Scenario: Closing language overlay (browser button)
- Given I go to a page that has languages
- When I click the switch-language page action
- And I see the language overlay
- And I click the browser back button
- Then I should not see the languages overlay
-
- Scenario: Checking that there are no suggested language links
- Given I go to a page that has languages
- When I click the switch-language page action
- And I see the language overlay
- Then I should not see a suggested language link
- Then I should see a non-suggested language link
-
- @smoke
- Scenario: Checking that the suggested language link has been created
- Given I go to a page that has languages
- And I click the switch-language page action
- And I click on a language from the list of all languages
- And I click the browser back button
- And I see the language overlay
- Then I should see a suggested language link
diff --git a/tests/browser/features/mainmenu.feature
b/tests/browser/features/mainmenu.feature
deleted file mode 100644
index 407c659..0000000
--- a/tests/browser/features/mainmenu.feature
+++ /dev/null
@@ -1,22 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant
-Feature: Menus open correct page for anonymous users
-
- Background:
- Given I am using the mobile site
- And I am on the "Main Page" page
-
- @smoke @integration
- Scenario: Check links in menu
- When I click on the main navigation button
- Then I should see a link to the disclaimer
- And I should see a link to the about page
- And I should see a link to "Home" in the main navigation menu
- And I should see a link to "Random" in the main navigation menu
- And I should see a link to "Settings" in the main navigation menu
- And I should see a link to "Log in" in the main navigation menu
-
- @extension-geodata
- Scenario: Nearby link in menu
- Given at least one article with geodata exists
- When I click on the main navigation button
- Then I should see a link to "Nearby" in the main navigation menu
diff --git a/tests/browser/features/mainmenu_loggedin.feature
b/tests/browser/features/mainmenu_loggedin.feature
deleted file mode 100644
index c830fcd..0000000
--- a/tests/browser/features/mainmenu_loggedin.feature
+++ /dev/null
@@ -1,25 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant @login
-Feature: Menus open correct page for anonymous users
-
- Background:
- Given I am logged into the mobile website
- And I am on the "Main Page" page
-
- @integration
- Scenario: Check links in menu
- When I click on the main navigation button
- Then I should see a link to the disclaimer
- And I should see a link to "Log out" in the main navigation menu
- And I should see a link to my user page in the main navigation menu
- And I should see a link to the about page
- And I should see a link to "Home" in the main navigation menu
- And I should see a link to "Random" in the main navigation menu
- And I should see a link to "Settings" in the main navigation menu
- And I should see a link to "Contributions" in the main navigation menu
- And I should see a link to "Watchlist" in the main navigation menu
-
- @extension-geodata
- Scenario: Nearby link in menu
- Given at least one article with geodata exists
- When I click on the main navigation button
- Then I should see a link to "Nearby" in the main navigation menu
diff --git a/tests/browser/features/no_javascript_site.feature
b/tests/browser/features/no_javascript_site.feature
deleted file mode 100644
index 2054b99..0000000
--- a/tests/browser/features/no_javascript_site.feature
+++ /dev/null
@@ -1,36 +0,0 @@
-@custom-browser @en.m.wikipedia.beta.wmflabs.org @firefox
@test2.m.wikipedia.org
-Feature: Basic site for legacy devices
-
- Background:
- Given my browser doesn't support JavaScript
- And I am using the mobile site
- And I am on the "Main Page" page
-
- # FIXME: Add scenario to check search actually works
- Scenario: Able to search in basic non-JavaScript site
- When I click on "Random" in the main navigation menu
- Then I should see the search button
- # FIXME: Check that the edit button is invisible
-
- @smoke
- Scenario: Able to access left navigation in basic non-JavaScript site
- When I click on "Random" in the main navigation menu
- And I click on the main navigation button
- Then I should see a link to "Home" in the main navigation menu
- And I should see a link to "Random" in the main navigation menu
- And I should see a link to "Settings" in the main navigation menu
- And I should not see a link to "Watchlist" in the main navigation menu
- And I should see a link to "Log in" in the main navigation menu
-
- @extension-geodata
- Scenario: Nearby link not present in main navigation menu
- When I click on "Random" in the main navigation menu
- And I click on the main navigation button
- Then I should not see a link to "Nearby" in the main navigation menu
-
- @smoke @integration @skip
- Scenario: Search with JavaScript disabled
- Given the page "Selenium search test" exists
- When I type into search box "Test is used by Selenium web driver"
- And I click the search button
- Then I should see a list of search results
diff --git a/tests/browser/features/notification.feature
b/tests/browser/features/notification.feature
deleted file mode 100644
index 0425f49..0000000
--- a/tests/browser/features/notification.feature
+++ /dev/null
@@ -1,20 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @extension-echo @firefox
@test2.m.wikipedia.org @vagrant @login
-Feature: Notification
-
- Background:
- Given I am logged into the mobile website
- And I have no notifications
- When I click on the notification icon
- And the notifications overlay appears
-
- @smoke @integration
- Scenario: Opening notifications
- Then I should see the notifications overlay
-
- Scenario: Closing notifications (overlay button)
- When I click the notifications overlay close button
- Then after 1 seconds I should not see the notifications overlay
-
- Scenario: Closing notifications (browser button)
- When I click the browser back button
- Then after 1 seconds I should not see the notifications overlay
diff --git a/tests/browser/features/pageactions.feature
b/tests/browser/features/pageactions.feature
deleted file mode 100644
index 3c43807..0000000
--- a/tests/browser/features/pageactions.feature
+++ /dev/null
@@ -1,15 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant
-Feature: Page actions menu when anonymous
-
- Background:
- Given I am using the mobile site
- And I am on the "Albert Einstein" page
-
- @feature-anon-editing-support
- Scenario: Receive notification message - Edit Icon
- When I click the edit button
- Then I see the anonymous editor warning
-
- Scenario: Receive notification message - Watchlist Icon
- When I click the watch star
- Then I should see a drawer with message "Keep track of this page and all
changes to it."
diff --git a/tests/browser/features/pageactions_protected.feature
b/tests/browser/features/pageactions_protected.feature
deleted file mode 100644
index ac46d02..0000000
--- a/tests/browser/features/pageactions_protected.feature
+++ /dev/null
@@ -1,10 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @adminuser
-Feature: Page actions menu when anonymous
-
- Background:
- Given I am using the mobile site
- And I visit a protected page
-
- Scenario: I cannot edit a protected page when anonymous
- When I click the edit icon holder
- Then I should see a toast notification
diff --git a/tests/browser/features/references.feature
b/tests/browser/features/references.feature
deleted file mode 100644
index 2273ddc..0000000
--- a/tests/browser/features/references.feature
+++ /dev/null
@@ -1,22 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant @extension-cite
-Feature: Reference popup drawer
-
- Background:
- Given I am using the mobile site
-
- Scenario: Opening the reference drawer
- Given I go to a page that has references
- When I click on a reference
- Then I should see the reference drawer
-
- Scenario: Closing the reference drawer
- Given I go to a page that has references
- When I click on a reference
- And I click on the page
- Then I should not see the reference drawer
-
- Scenario: Opening a nested reference
- Given I go to a page that has references
- When I click on a reference
- And I click on a nested reference
- Then I should see a drawer with message "This is a nested ref."
diff --git a/tests/browser/features/search.feature
b/tests/browser/features/search.feature
deleted file mode 100644
index 1f0a69c..0000000
--- a/tests/browser/features/search.feature
+++ /dev/null
@@ -1,50 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration
@test2.m.wikipedia.org @vagrant
-Feature: Search
-
- Background:
- Given I am using the mobile site
- And I am in beta mode
- And the page "Selenium search test" exists
- And I am on the "Main Page" page
- And I am viewing the site in mobile mode
- And I click the search icon
- And I see the search overlay
-
- Scenario: Closing search (overlay button)
- When I click the search overlay close button
- Then I should not see the search overlay
-
- Scenario: Closing search (browser button)
- When I click the browser back button
- Then I should not see the search overlay
-
- @smoke @integration
- Scenario: Search for partial text
- When I type into search box "Selenium search tes"
- Then search results should contain "Selenium search test"
-
- Scenario: Search with search in pages button
- When I type into search box "Test is used by Selenium web driver"
- And I see the search in pages button
- And I click the search in pages button
- Then I should see a list of search results
-
- Scenario: Search with enter key
- When I type into search box "Test is used by Selenium web driver"
- And I press the enter key
- Then I should see a list of search results
-
- Scenario: Going back to the previous page
- When I type into search box "Selenium search tes"
- When I click a search result
- When I click the browser back button
- Then I should not see '#/search' in URL
-
- @integration
- Scenario: Search doesn't break after one search result
- When I type into search box "Selenium search tes"
- And I click a search result
- And the text of the first heading should be "Selenium search test"
- And I click the search icon
- And I type into search box "Main Page"
- Then search results should contain "Main Page"
diff --git a/tests/browser/features/search_loggedin.feature
b/tests/browser/features/search_loggedin.feature
deleted file mode 100644
index 52cc5e9..0000000
--- a/tests/browser/features/search_loggedin.feature
+++ /dev/null
@@ -1,15 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration
@test2.m.wikipedia.org @vagrant @login
-Feature: Search
-
- Scenario: Clicking on a watchstar toggles the watchstar
- Given I am using the mobile site
- And I am in beta mode
- And the page "Selenium search test" exists
- And I am logged into the mobile website
- And I am on the "Main Page" page
- And I am viewing the site in mobile mode
- And I click the search icon
- And I see the search overlay
- And I type into search box "Selenium search tes"
- When I click a search watch star
- Then I should see a toast
diff --git a/tests/browser/features/search_tablet.feature
b/tests/browser/features/search_tablet.feature
deleted file mode 100644
index ff14d4b..0000000
--- a/tests/browser/features/search_tablet.feature
+++ /dev/null
@@ -1,10 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration
@test2.m.wikipedia.org @vagrant
-Feature: Search
-
- Scenario: Clicking search input in tablet mode
- Given I am using the mobile site
- And the page "Selenium search test" exists
- And I am on the "Main Page" page
- And I am viewing the site in tablet mode
- When I click the search input field
- Then I see the search overlay
diff --git a/tests/browser/features/signup_edit_tutorial.feature
b/tests/browser/features/signup_edit_tutorial.feature
deleted file mode 100644
index 696c0ae..0000000
--- a/tests/browser/features/signup_edit_tutorial.feature
+++ /dev/null
@@ -1,10 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @vagrant @login
-Feature: Signup edit tutorial
-
- Background:
- Given I have just signed up after trying to edit as anonymous
-
- Scenario: Signup edit tutorial shows up correctly and hides when main menu
is opened
- Then I should see the signup edit tutorial
- When I click on the main navigation button
- Then I should not see the signup edit tutorial
diff --git a/tests/browser/features/special.feature
b/tests/browser/features/special.feature
deleted file mode 100644
index 429b669..0000000
--- a/tests/browser/features/special.feature
+++ /dev/null
@@ -1,27 +0,0 @@
-@chrome @firefox @test2.m.wikipedia.org @vagrant @integration
-Feature: Generic special page features
-
- Background:
- Given I am using the mobile site
- And I am in beta mode
- And I am viewing the site in mobile mode
- And I am on the "Main Page" page
-
- @login
- Scenario: Search from Watchlist
- Given I am logged into the mobile website
- When I click on "Watchlist" in the main navigation menu
- And I click the search icon
- Then I should see the search overlay
-
- @en.m.wikipedia.beta.wmflabs.org @extension-geodata
- Scenario: Search from Nearby
- When I click on "Nearby" in the main navigation menu
- And I click the search icon
- Then I should see the search overlay
-
- @en.m.wikipedia.beta.wmflabs.org
- Scenario: Search from Login
- When I click on "Log in" in the main navigation menu
- And I click the search icon
- Then I should see the search overlay
diff --git a/tests/browser/features/step_definitions/category_steps.rb
b/tests/browser/features/step_definitions/category_steps.rb
deleted file mode 100644
index bfd3fda..0000000
--- a/tests/browser/features/step_definitions/category_steps.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-When(/^I click on the category button$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.categories')
- page.category_element.when_present.click
- end
-end
-
-Then(/^I should see the categories overlay$/) do
- on(ArticlePage) do |page|
- expect(page.overlay_heading_element.when_present.text).to match
'Categories'
- end
-end
-
-Then(/^I should see a list of categories$/) do
- on(ArticlePage) do |page|
- expect(page.overlay_category_topic_item_element.when_present).to be_visible
- end
-end
diff --git a/tests/browser/features/step_definitions/common_article_steps.rb
b/tests/browser/features/step_definitions/common_article_steps.rb
index c685eba..88bed7e 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -1,53 +1,6 @@
-Given(/^I click continue$/) do
- on(ArticlePage).continue_button_element.when_present.click
-end
-
-Given(/^I click submit$/) do
- on(ArticlePage) do |page|
- page.spinner_loading_element.when_not_present
- page.submit_button_element.when_present.click
- end
-end
-
-Given(/^I click the escape button$/) do
- on(ArticlePage).escape_button_element.when_present.click
-end
-
-Given(/^I switch to desktop$/) do
- on(ArticlePage).desktop_link_element.click
-end
-
When(/^I click on the history link in the last modified bar$/) do
on(ArticlePage).last_modified_bar_history_link_element.when_present.click
expect(on(SpecialHistoryPage).side_list_element.when_present(10)).to
be_visible
-end
-
-When(/^I click on the page$/) do
- on(ArticlePage).content_wrapper_element.click
-end
-
-When(/^I click the unwatch star$/) do
- on(ArticlePage).unwatch_star_element.when_present.click
-end
-
-When(/^I click the watch star$/) do
- on(ArticlePage).watch_star_element.when_present.click
-end
-
-Then(/^I should see a toast notification$/) do
- expect(on(ArticlePage).toast_element.when_present(10)).to be_visible
-end
-
-Then(/^I should see a toast error$/) do
- expect(on(ArticlePage).toast_element.when_present.class_name).to match
'error'
-end
-
-Then /^I should see a drawer with message "(.+)"$/ do |text|
- expect(on(ArticlePage).drawer_element.when_present.text).to match text
-end
-
-Then(/^I should see the error box message "(.+)"$/) do |error_message|
- expect(on(ArticlePage).error_message).to match (error_message)
end
Then(/^the text of the first heading should be "(.*)"$/) do |title|
@@ -57,12 +10,4 @@
end
expect(page.first_heading_element.when_present.text).to match title
end
-end
-
-Then /^the watch star should be selected$/ do
- expect(on(ArticlePage).unwatch_star_element).to be_visible
-end
-
-Then /^the watch star should not be selected$/ do
- expect(on(ArticlePage).watch_star_element).to be_visible
end
diff --git a/tests/browser/features/step_definitions/common_steps.rb
b/tests/browser/features/step_definitions/common_steps.rb
index e564342..528490f 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -1,17 +1,3 @@
-Given /^I am in beta mode$/ do
- visit(MainPage) do |page|
- page_uri = URI.parse(page.page_url_value)
-
- # A domain is explicitly given to avoid a bug in earlier versions of Chrome
- domain = page_uri.host == 'localhost' ? nil : page_uri.host
- # FIXME: remove 'mf_useformat' cookie from here
- browser.cookies.add 'mf_useformat', 'true', domain: domain
- browser.cookies.add 'optin', 'beta', domain: domain
-
- page.refresh
- end
-end
-
Given /^I am logged in as a new user$/ do
log_in
end
@@ -28,19 +14,6 @@
log_in
# avoids login failing (see https://phabricator.wikimedia.org/T109593)
expect(on(ArticlePage).is_authenticated_element.when_present(20)).to exist
-end
-
-Given(/^I am on a page that does not exist$/) do
- name = 'NewPage' + Time.now.to_i.to_s
- visit(ArticlePage, using_params: { article_name: name })
-end
-
-Given(/^I am on the random page$/) do
- visit(ArticlePage, using_params: { article_name: @random_string })
-end
-
-Given(/^I am on the sign-up page$/) do
- visit(SpecialUserLoginPage).create_account_link_element.when_present.click
end
Given(/^I am on the "(.+)" page$/) do |article|
@@ -60,47 +33,6 @@
end
end
-Given(/^I am viewing the site in mobile mode$/) do
- browser.window.resize_to(320, 480)
-end
-
-Given(/^I am viewing the site in tablet mode$/) do
- # Use numbers significantly larger than tablet threshold to account for
browser chrome
- browser.window.resize_to(1280, 1024)
-end
-
-Given(/^I choose to create an account$/) do
- on(SpecialUserLoginPage).create_account_link_element.when_present.click
-end
-
Given(/^my browser doesn't support JavaScript$/) do
browser_factory.override(browser_user_agent: 'Opera/9.80 (J2ME/MIDP; Opera
Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54')
-end
-
-Given(/^the "(.*?)" page is protected\.$/) do |page|
- api.protect_page(page, 'MobileFrontend Selenium test protected this page')
-end
-
-When(/^I click the browser back button$/) do
- on(ArticlePage).back
-end
-
-When(/^I say Cancel in the confirm dialog$/) do
- on(ArticlePage).confirm(false) {}
-end
-
-When(/^I say OK in the confirm dialog$/) do
- on(ArticlePage).confirm(true) do
- end
-end
-
-When(/^I visit the page "(.*?)" with hash "(.*?)"$/) do |article, hash|
- # Ensure we do not cause a redirect
- article = article.gsub(/ /, '_')
- visit(ArticlePage, using_params: { article_name: article, hash: hash })
-end
-
-Then(/^there should be a red link with text "(.+)"$/) do |text|
- # FIXME: Switch to link_element when red links move to stable
- expect(on(ArticlePage).content_wrapper_element.link_element(text:
text).when_present(10)).to be_visible
end
diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index 50b3577..2918489 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -1,105 +1,3 @@
-# export MEDIAWIKI_API_URL = http://en.wikipedia.beta.wmflabs.org/w/api.php
-
-Given(/^I create a random page using the API$/) do
- api.create_page @random_string, @random_string
-end
-
-Given(/^I go to a page that has references$/) do
- wikitext = "MobileFrontend is a MediaWiki extension.
-{{#tag:ref|This is a note.<ref>This is a nested ref.</ref>|group=note}}
-==Notes==
-<references group=note />
-==References==
-<references/>
-"
-
- api.create_page 'Selenium References test page', wikitext
- step 'I am on the "Selenium References test page" page'
-end
-
-Given(/^I go to a page that has sections$/) do
- wikitext = "==Section 1==
-Hello world
-== Section 2 ==
-Section 2.
-=== Section 2A ===
-Section 2A.
-== Section 3 ==
-Section 3.
-"
-
- api.create_page 'Selenium section test page2', wikitext
- step 'I am on the "Selenium section test page2" page'
-end
-
-Given(/^I am on a page which has cleanup templates$/) do
- wikitext = <<-END.gsub(/^ */, '')
- This page is used by Selenium to test MediaWiki functionality.
-
- <table class="metadata plainlinks ambox ambox-content ambox-Refimprove"
role="presentation">
- <tr>
- <td class="mbox-image">[[File:Question_book-new.svg|thumb]]</td>
- <td class="mbox-text">
- <span class="mbox-text-span">This article \'\'\'needs additional
citations for [[Wikipedia:Verifiability|verification]]\'\'\'. <span
class="hide-when-compact">Please help [[Selenium page issues test
page#editor/0|improve this article]] by
[[Help:Introduction_to_referencing/1|adding citations to reliable sources]].
Unsourced material may be challenged and removed.</span> <small><i>(October
2012)</i></small></span>
- </td>
- </tr>
- </table>
- END
-
- api.create_page 'Selenium page issues test page', wikitext
- step 'I am on the "Selenium page issues test page" page'
-end
-
-Given(/^the page "(.*?)" exists$/) do |title|
- api.create_page title, 'Test is used by Selenium web driver'
- step 'I am on the "' + title + '" page'
-end
-
-Given(/^at least one article with geodata exists$/) do
- api.create_page 'Selenium geo test page', <<-end
-This page is used by Selenium to test geo related features.
-
-{{#coordinates:43|-75|primary}}
- end
-end
-
-Given(/^I am in a wiki that has categories$/) do
- msg = 'This page is used by Selenium to test category related features.'
- wikitext = msg + '
-
-[[Category:Test category]]
-[[Category:Selenium artifacts]]
-[[Category:Selenium hidden category]]'
-
- api.create_page 'Category:Selenium artifacts', msg
- api.create_page 'Category:Test category', msg
- api.create_page 'Category:Selenium hidden category', '__HIDDENCAT__' + msg
- api.create_page 'Selenium categories test page', wikitext
-end
-
-Given(/^I go to a page that has languages$/) do
- wikitext = 'This page is used by Selenium to test language related features.
-
-[[es:Selenium language test page]]'
-
- api.create_page 'Selenium language test page', wikitext
- step 'I am on the "Selenium language test page" page'
-end
-
-Given(/^I go to a page that does not have languages$/) do
- wikitext = 'This page is used by Selenium to test language related features.'
-
- api.create_page 'Selenium language test page without languages', wikitext
- step 'I am on the "Selenium language test page without languages" page'
-end
-
-Given(/^the wiki has a terms of use$/) do
- api.create_page 'MediaWiki:mobile-frontend-terms-url',
'http://m.wikimediafoundation.org/wiki/Terms_of_Use'
- api.create_page 'MediaWiki:mobile-frontend-terms-text', 'Terms of use'
- # force a visit to check its existence
- visit(ArticlePage, using_params: { article_name:
'MediaWiki:Mobile-frontend-terms-url?action=info' })
-end
-
Given(/^the page "(.*?)" exists and has at least "(\d+)" edits$/) do |title,
min_edit_count|
# Page must first exist before we can get edit count information
step 'the page "' + title + '" exists'
@@ -110,10 +8,4 @@
api.create_page title, "Test is used by Selenium web driver edit ##{n}"
end
end
-end
-
-Given(/^I visit a protected page$/) do
- api.create_page 'Selenium protected test 2', 'Test is used by Selenium web
driver'
- step 'the "Selenium protected test 2" page is protected.'
- step 'I am on the "Selenium protected test 2" page'
end
diff --git a/tests/browser/features/step_definitions/diff_steps.rb
b/tests/browser/features/step_definitions/diff_steps.rb
deleted file mode 100644
index 2fcbee9..0000000
--- a/tests/browser/features/step_definitions/diff_steps.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-Then(/^I should see "(.*?)" as added content$/) do |text|
- expect(on(DiffPage).inserted_content_element.text).to eq text
-end
-
-Then(/^I should see "(.*?)" as removed content$/) do |text|
- expect(on(DiffPage).deleted_content_element.text).to eq text
-end
diff --git a/tests/browser/features/step_definitions/editor_steps.rb
b/tests/browser/features/step_definitions/editor_steps.rb
deleted file mode 100644
index 40b4130..0000000
--- a/tests/browser/features/step_definitions/editor_steps.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-Given(/^I am on a page that has the following edits:$/) do |table|
- page = 'Selenium_diff_test_'.concat(@random_string)
- table.rows.each { |(text)| api.edit(title: page, text: text) }
- visit(ArticlePage, using_params: { article_name: page })
-end
-
-When(/^I clear the editor$/) do
- on(ArticlePage).editor_textarea_element.when_present.clear
-end
-
-When(/^I click the edit button$/) do
- on(ArticlePage).edit_link_element.when_present.click
-end
-
-When(/^I click the editor mode switcher button$/) do
- on(ArticlePage).overlay_editor_mode_switcher_element.when_present.click
-end
-
-When(/^I click the source editor button$/) do
- on(ArticlePage).source_editor_button_element.when_present.click
-end
-
-When(/^I click the VisualEditor button$/) do
- on(ArticlePage).visual_editor_button_element.when_present.click
-end
-
-When(/^I click the wikitext editor overlay close button$/) do
- on(ArticlePage).editor_overlay_close_button_element.when_present.click
-end
-
-When(/^I do not see the wikitext editor overlay$/) do
- on(ArticlePage).editor_overlay_element.when_not_visible
-end
-
-When(/^I see the wikitext editor overlay$/) do
- on(ArticlePage).editor_textarea_element.when_present
-end
-
-When(/^I type "(.+)" into the editor$/) do |text|
- on(ArticlePage).editor_textarea_element.when_present.send_keys(text)
-end
-
-Then(/^I should not see the wikitext editor overlay$/) do
- expect(on(ArticlePage).editor_overlay_element).not_to be_visible
-end
-
-Then(/^I see the anonymous editor warning$/) do
- expect(on(ArticlePage).anon_editor_warning_element.when_present).to
be_visible
-end
diff --git a/tests/browser/features/step_definitions/editor_ve_steps.rb
b/tests/browser/features/step_definitions/editor_ve_steps.rb
deleted file mode 100644
index 42f1541..0000000
--- a/tests/browser/features/step_definitions/editor_ve_steps.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-Given(/^I am editing a new article with VisualEditor$/) do
- api.create_page 'Selenium Test Edit', ''
- step 'I am on the "Selenium Test Edit" page'
- step 'I click the edit button'
- step 'I click the editor mode switcher button'
- step 'I click the VisualEditor button'
- step 'VisualEditor has loaded'
-end
-
-Given(/^VisualEditor has loaded$/) do
- on(ArticlePage).editor_ve_element.when_present(20)
-end
-
-When(/^I edit the article using VisualEditor$/) do
- on(ArticlePage) do |page|
- @text_to_type = "text-#{rand(32**8).to_s(32)}"
- page.editor_ve_element.when_present.send_keys(' ')
- page.editor_ve_element.send_keys(@text_to_type)
- page.wait_until { page.continue_button_element.enabled? }
- page.continue_button
- page.wait_until { page.submit_button_element.enabled? }
- page.confirm(true) { page.submit_button }
- sleep 2 # this gets around a race condition bug in ChromeDriver where both
the confirm and the toast are in the page at once, and Chrome reports either
"stale element reference: element is not attached to the page document" or
"Element does not exist in cache"
- page.wait_until { page.toast.include?('Your edit was saved') }
- page.wait_until { page.content_element.visible? }
- end
-end
-
-When(/^I switch to editing the source$/) do
- step 'I click the editor mode switcher button'
- step 'I click the source editor button'
-end
-
-Then(/^I should no longer see the VisualEditor$/) do
- expect(on(ArticlePage).editor_ve_element).to_not be_visible
-end
-
-Then(/^I should see the article content$/) do
- expect(on(ArticlePage).content_element.when_present).to be_visible
-end
-
-Then(/^I should see the edit reflected in the article content$/) do
- expect(on(ArticlePage).content).to match @text_to_type
-end
diff --git a/tests/browser/features/step_definitions/issues_steps.rb
b/tests/browser/features/step_definitions/issues_steps.rb
deleted file mode 100644
index c9ed395..0000000
--- a/tests/browser/features/step_definitions/issues_steps.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-When(/^I click the overlay issue close button$/) do
- on(ArticlePage).overlay_close_button_element.when_present.click
-end
-
-When(/^I click the page issues stamp$/) do
- on(ArticlePage).issues_stamp_element.when_present.click
-end
-
-When(/^I see the issues overlay$/) do
- on(ArticlePage).overlay_element.when_present
-end
-
-When(/^this page has issues$/) do
- on(ArticlePage).issues_stamp_element.when_present
-end
-
-Then(/^I should not see the issues overlay$/) do
- expect(on(ArticlePage).overlay_element).not_to be_visible
-end
-
-Then(/^I should see the issues overlay$/) do
- expect(on(ArticlePage).overlay_element.when_present).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/language_icon_steps.rb
b/tests/browser/features/step_definitions/language_icon_steps.rb
deleted file mode 100644
index f8ec0c7..0000000
--- a/tests/browser/features/step_definitions/language_icon_steps.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-When /^I click the switch-language page action$/ do
- on(ArticlePage).wait_until_rl_module_ready('skins.minerva.scripts')
- on(ArticlePage).switch_language_page_action_element.when_present.click
-end
-
-Then(/^I should see the disabled switch-language page action$/) do
- expect(on(ArticlePage).disabled_switch_langage_page_action_element).to
be_visible
-end
-
-Then(/^I should see the switch-language page action$/) do
- expect(on(ArticlePage).switch_language_page_action_element).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/language_steps.rb
b/tests/browser/features/step_definitions/language_steps.rb
deleted file mode 100644
index 2b8eb30..0000000
--- a/tests/browser/features/step_definitions/language_steps.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-When(/^I click the language overlay close button$/) do
- on(ArticlePage).overlay_languages_element.when_present.button_element(class:
'cancel').click
-end
-
-When(/^I see the language overlay$/) do
- on(ArticlePage).overlay_languages_element.when_present
-end
-
-When /^I click on a language from the list of all languages$/ do
- on(ArticlePage).non_suggested_language_link_element.when_present.click
-end
-
-Then(/^I should see a toast with message about page not being available in
other languages$/) do
- expect(on(ArticlePage).toast_element.when_present.text).to match 'This page
is not available in other languages.'
-end
-
-Then(/^I should not see the languages overlay$/) do
- expect(on(ArticlePage).overlay_languages_element).not_to be_visible
-end
-
-Then(/^I should see the language overlay$/) do
- expect(on(ArticlePage).overlay_languages_element.when_present).to be_visible
-end
-
-Then(/^I should see a non-suggested language link$/) do
- expect(on(ArticlePage).non_suggested_language_link_element).to be_visible
-end
-
-Then(/^I should not see a suggested language link$/) do
- expect(on(ArticlePage).suggested_language_link_element).not_to be_visible
-end
-
-Then(/^I should see a suggested language link$/) do
- expect(on(ArticlePage).suggested_language_link_element).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/mainmenu_steps.rb
b/tests/browser/features/step_definitions/mainmenu_steps.rb
deleted file mode 100644
index 05c2e28..0000000
--- a/tests/browser/features/step_definitions/mainmenu_steps.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-When(/^I click on the main navigation button$/) do
- on(ArticlePage).mainmenu_button_element.click
-end
-
-When(/^I click on "(.*?)" in the main navigation menu$/) do |text|
- step 'I click on the main navigation button'
- on(ArticlePage).navigation_element.link_element(text:
text).when_visible.click
-end
-
-Then(/^I should see a link to "(.*?)" in the main navigation menu$/) do |text|
- expect(on(ArticlePage).navigation_element.link_element(text: text)).to
be_visible
-end
-
-Then(/^I should not see a link to "(.*?)" in the main navigation menu$/) do
|text|
- expect(on(ArticlePage).navigation_element.link_element(text: text)).not_to
be_visible
-end
-
-Then(/^I should see a link to the about page$/) do
- expect(on(ArticlePage).about_link_element).to be_visible
-end
-
-Then(/^I should see a link to the disclaimer$/) do
- expect(on(ArticlePage).disclaimer_link_element).to be_visible
-end
-
-Then(/^I should see a link to my user page in the main navigation menu$/) do
- expect(on(ArticlePage).navigation_element.link_element(href: /User:#{user}/,
text: user_label)).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/messages_steps.rb
b/tests/browser/features/step_definitions/messages_steps.rb
deleted file mode 100644
index 2d6fcda..0000000
--- a/tests/browser/features/step_definitions/messages_steps.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-Then('I should see the error "$message"') do |message|
- expect(on(ArticlePage).error_message).to match(message)
-end
diff --git a/tests/browser/features/step_definitions/nearby_steps.rb
b/tests/browser/features/step_definitions/nearby_steps.rb
deleted file mode 100644
index 80e7541..0000000
--- a/tests/browser/features/step_definitions/nearby_steps.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-Given(/^I give permission for the page to access my location$/) do
- unless ENV['NEARBY_FIREFOX']
- puts "NEARBY_FIREFOX environment variable is not defined. This test won't
work without it!"
- end
-end
-
-When(/^I click a nearby result$/) do
- on(ArticlePage).page_list_element.when_present(20).link_element(class:
'title').click
-end
-
-Then(/^I should see at least one result in the nearby items list$/) do
- on(ArticlePage) do |page|
- expect(page.page_list_element.when_present(20)).to be_visible
- expect(page.page_list_element.link_element(class: 'title')).to be_visible
- end
-end
-
-Then(/^I should see the page preview overlay$/) do
- expect(on(ArticlePage).overlay_element.when_present(20).div_element(class:
'content')).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/notification_steps.rb
b/tests/browser/features/step_definitions/notification_steps.rb
deleted file mode 100644
index c4f65ad..0000000
--- a/tests/browser/features/step_definitions/notification_steps.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-When /^I click on the notification icon$/ do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.notifications')
- page.notifications_button_element.when_present.click
- end
-end
-
-Given(/^I have no notifications$/) do
- expect(on(ArticlePage).notifications_button_element.when_present).to
be_visible
- # This is somewhat hacky, but I don't want this test making use of Echo's
APIs which may change
- browser.execute_script("$( function () { $( '.notification-count span'
).hide(); } );")
-end
-
-When(/^I click the notifications overlay close button$/) do
- sleep 1
- on(ArticlePage).notifications_overlay_close_button_element.when_present.click
-end
-
-When(/^the notifications overlay appears$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('oojs-ui-core')
- page.notifications_overlay_element.when_present
- end
-end
-
-Then(/^after (.+) seconds I should not see the notifications overlay$/) do
|seconds|
- sleep seconds.to_i
- expect(on(ArticlePage).notifications_overlay_element).not_to be_visible
-end
-
-Then(/^I should see the notifications overlay$/) do
- expect(on(ArticlePage).notifications_overlay_element.when_present).to
be_visible
-end
diff --git a/tests/browser/features/step_definitions/pageactions_steps.rb
b/tests/browser/features/step_definitions/pageactions_steps.rb
deleted file mode 100644
index 2485187..0000000
--- a/tests/browser/features/step_definitions/pageactions_steps.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-Given(/^I click the edit icon holder$/) do
- on(ArticlePage).edit_button_holder_element.when_present.click
-end
-
-Then(/^I should not see an upload an image to this page button$/) do
- expect(on(ArticlePage).upload_button_element).not_to be_visible
-end
diff --git a/tests/browser/features/step_definitions/references_steps.rb
b/tests/browser/features/step_definitions/references_steps.rb
deleted file mode 100644
index b647a85..0000000
--- a/tests/browser/features/step_definitions/references_steps.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-When(/^I click on a reference$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.scripts')
- page.reference_element.click
- page.reference_drawer_element.when_present
- end
-end
-
-When(/^I click on a nested reference$/) do
- on(ArticlePage) do |page|
- page.nested_reference_element.when_present.click
- end
-end
-
-Then(/^I should see the reference drawer$/) do
- expect(on(ArticlePage).reference_drawer_element).to be_visible
-end
-
-Then(/^I should not see the reference drawer$/) do
- expect(on(ArticlePage).reference_drawer_element.when_not_present).to be_nil
-end
-
-Then /^I should see a reference drawer with message "(.+)"$/ do |text|
- expect(on(ArticlePage).reference_drawer_element.when_present.text).to
include text
-end
diff --git a/tests/browser/features/step_definitions/search_steps.rb
b/tests/browser/features/step_definitions/search_steps.rb
deleted file mode 100644
index bd89290..0000000
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-When(/^I click a search result$/) do
- on(ArticlePage).search_result_element.when_present.click
-end
-
-When(/^I click the search icon$/) do
- on(ArticlePage).wait_until_rl_module_ready('skins.minerva.scripts')
- on(ArticlePage).search_icon_element.when_present.click
- # this check is needed to accommodate for the hack for opening the virtual
- # keyboard (see comments in search.js)
- on(ArticlePage).wait_until do
- on(ArticlePage).current_url.end_with? '#/search'
- end
-end
-
-When(/^I click the search input field$/) do
- on(ArticlePage).search_box_placeholder_element.when_present.click
-end
-
-When(/^I click the search button$/) do
- on(ArticlePage).search_icon_element.when_present.click
-end
-
-When(/^I see the search in pages button$/) do
- expect(on(ArticlePage).search_within_pages_element.when_visible).to
be_visible
-end
-
-When(/^I click the search in pages button$/) do
- on(ArticlePage).search_content_header_element.when_present.click
-end
-
-When(/^I click a search watch star$/) do
- on(ArticlePage).search_watchstars_element.when_present.click
-end
-
-When(/^I press the enter key$/) do
- on(ArticlePage).search_box2_element.when_present.send_keys :enter
-end
-
-When(/^I click the search overlay close button$/) do
- on(ArticlePage).search_overlay_close_button_element.click
-end
-
-When(/^I see the search overlay$/) do
- on(ArticlePage).search_overlay_element.when_present
-end
-
-When(/^I type into search box "(.+)"$/) do |search_term|
- on(ArticlePage) do |page|
- if page.search_box2_element.exists?
- # Type in JavaScript mode
- page.search_box2 = search_term
- else
- page.search_box_placeholder = search_term
- end
- end
-end
-
-Then(/^I should not see the search overlay$/) do
- expect(on(ArticlePage).search_overlay_element).not_to be_visible
-end
-
-Then(/^I should see a list of search results$/) do
- expect(on(SearchPage).list_of_results_element.when_present(10)).to be_visible
-end
-
-Then(/^I should see the search button$/) do
- expect(on(ArticlePage).search_icon_element.when_present).to be_visible
-end
-
-When(/^I should see the search overlay$/) do
- expect(on(ArticlePage).search_overlay_element.when_present).to be_visible
-end
-
-Then(/^search results should contain "(.+)"$/) do |text|
- expect(on(ArticlePage).search_result_heading_element.when_present.text).to
eq text
-end
-
-Then(/^I should not see '#\/search' in URL$/) do
- expect(on(ArticlePage).current_url.end_with? '#/search').to be false
-end
-
-Then(/^I should see a toast$/) do
- expect(on(ArticlePage).toast_element.when_present).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/signup_edit_tutorial.rb
b/tests/browser/features/step_definitions/signup_edit_tutorial.rb
deleted file mode 100644
index 49b0e27..0000000
--- a/tests/browser/features/step_definitions/signup_edit_tutorial.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-Given(/^I have just signed up after trying to edit as anonymous$/) do
- step 'I am logged into the mobile website'
- api.create_page 'Selenium mobile signup edit tutorial test', 'signup edit
tutorial test'
- visit(ArticlePage, using_params: { article_name:
'Selenium_mobile_signup_edit_tutorial_test?article_action=signup-edit' })
- on(ArticlePage).wait_until_rl_module_ready('skins.minerva.newusers')
-end
-
-Then(/^I should see the signup edit tutorial$/) do
- expect(on(ArticlePage).signup_edit_tutorial_element).to be_visible
-end
-
-Then(/^I should not see the signup edit tutorial$/) do
- expect(on(ArticlePage).signup_edit_tutorial_element).not_to be_visible
-end
diff --git a/tests/browser/features/step_definitions/special_history_steps.rb
b/tests/browser/features/step_definitions/special_history_steps.rb
index 21697b9..901cc93 100644
--- a/tests/browser/features/step_definitions/special_history_steps.rb
+++ b/tests/browser/features/step_definitions/special_history_steps.rb
@@ -1,12 +1,3 @@
-When(/^I click the more link$/) do
- on(SpecialHistoryPage).more_link_element.click
-end
-
-When(/^I open the latest diff$/) do
- on(SpecialHistoryPage).last_contribution_link_element.click
- expect(on(SpecialMobileDiffPage).user_info_element.when_present(20)).to
be_visible
-end
-
Then(/^I should see a more button$/) do
expect(on(SpecialHistoryPage).more_link_element).to be_visible
end
diff --git a/tests/browser/features/step_definitions/talk_steps.rb
b/tests/browser/features/step_definitions/talk_steps.rb
deleted file mode 100644
index 9c38192..0000000
--- a/tests/browser/features/step_definitions/talk_steps.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-When(/^I click the talk button$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.talk')
- page.talk_element.when_present.click
- end
-end
-
-When(/^no topic is present$/) do
-
expect(on(ArticlePage).talk_overlay_content_header_element.when_present.text).to
match 'There are no conversations about this page.'
-end
-
-When(/^I add a topic called "(.+)"$/) do |topic|
- step 'I click the add discussion button'
- on(ArticlePage) do |page|
- page.talk_overlay_summary = topic
- page.talk_overlay_wikitext_editor = 'Topic body is a really long text.'
- page.wait_until { page.talk_overlay_save_button_element.enabled? }
- page.talk_overlay_save_button
- end
-end
-
-When(/^I click the add discussion button$/) do
- on(ArticlePage).talkadd_element.when_present.click
-end
-
-Then(/^I should see the topic called "(.+)" in the list of topics$/) do |topic|
-
expect(on(ArticlePage).talk_overlay_first_topic_title_element.when_present.text).to
match topic
-end
-
-Then(/^I should see the talk overlay$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('mobile.talk.overlays')
- expect(on(ArticlePage).overlay_heading_element.when_present.text).to match
'Talk'
- end
-end
-
-Then(/^there should be no talk button$/) do
- expect(on(ArticlePage).talk_element).not_to be_visible
-end
-
-Then(/^there should be an add discussion button$/) do
- # give overlay time to fully load
- expect(on(ArticlePage).talkadd_element.when_present(10)).to be_visible
-end
-
-Then(/^there should be no add discussion button$/) do
- except(on(ArticlePage).talkadd_element).not_to be_visible
-end
diff --git a/tests/browser/features/step_definitions/toc_steps.rb
b/tests/browser/features/step_definitions/toc_steps.rb
deleted file mode 100644
index 2a7d746..0000000
--- a/tests/browser/features/step_definitions/toc_steps.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-Then(/^I should not see the table of contents$/) do
- on(ArticlePage) do |page|
- page.toc_element.when_not_visible
- expect(page.toc_element).not_to be_visible
- end
-end
-
-Then(/^I should see the table of contents$/) do
- expect(on(ArticlePage).toc_element.when_present(10)).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/toggling_steps.rb
b/tests/browser/features/step_definitions/toggling_steps.rb
deleted file mode 100644
index 6982ca2..0000000
--- a/tests/browser/features/step_definitions/toggling_steps.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-When(/^I click on the first collapsible section heading$/) do
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.toggling')
- page.first_section_element.when_present.click
- end
-end
-
-Then(/^I should not see the content of the first section$/) do
- expect(on(ArticlePage).first_section_content_element).not_to be_visible
-end
-
-Then(/^I should see the content of the first section$/) do
- expect(on(ArticlePage).first_section_content_element.when_present(10)).to
be_visible
-end
-
-Then(/^the heading element with id "(.*?)" should be visible$/) do |id|
- expect(on(ArticlePage).span_element(id: id).when_present(10)).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/ui_links_steps.rb
b/tests/browser/features/step_definitions/ui_links_steps.rb
deleted file mode 100644
index 6ec33a3..0000000
--- a/tests/browser/features/step_definitions/ui_links_steps.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-Then(/^I should see a link to the privacy page$/) do
- expect(on(ArticlePage).privacy_link_element).to be_visible
-end
-
-Then(/^I should see a link to the terms of use$/) do
- expect(on(ArticlePage).terms_link_element).to be_visible
-end
-
-Then(/^I should see the link to the user page of the last editor$/) do
- # T132753
- on(ArticlePage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.scripts')
- expect(page.last_modified_bar_history_userpage_link_element).to be_visible
- end
-end
-
-Then(/^I should see the history link$/) do
- expect(on(ArticlePage).standalone_edit_history_link_element).to be_visible
-end
-
-Then(/^I should see the beta mode indicator$/) do
- expect(on(ArticlePage).beta_mode_indicator_element).to be_visible
-end
-
-Then(/^I should not see the beta mode indicator$/) do
- expect(on(ArticlePage).beta_mode_indicator_element).not_to be_visible
-end
-
-Then(/^I should see the last modified bar history link$/) do
- expect(on(ArticlePage).last_modified_bar_history_link_element).to be_visible
-end
-
-Then(/^I should see the license link$/) do
- expect(on(ArticlePage).license_link_element).to be_visible
-end
-
-Then(/^I should see the switch to desktop link$/) do
- expect(on(ArticlePage).desktop_link_element).to be_visible
-end
diff --git a/tests/browser/features/step_definitions/user_page_steps.rb
b/tests/browser/features/step_definitions/user_page_steps.rb
index 936ed10..d103d4c 100644
--- a/tests/browser/features/step_definitions/user_page_steps.rb
+++ b/tests/browser/features/step_definitions/user_page_steps.rb
@@ -1,35 +1,8 @@
-Given(/^I visit my user page$/) do
- visit(UserPage, using_params: { user: user })
-end
-
Then(/^I should be on my user page$/) do
on(UserPage) do |page|
page.wait_until do
page.heading_element.when_present
end
expect(page.heading_element).to be_visible
- end
-end
-
-Then(/^there should be a link to my contributions$/) do
- expect(on(UserPage).contributions_link_element).to be_visible
-end
-
-Then(/^there should be a link to my talk page$/) do
- expect(on(UserPage).talk_link_element).to be_visible
-end
-
-Then(/^there should be a link to my uploads$/) do
- expect(on(UserPage).uploads_link_element).to be_visible
-end
-
-Then(/^there should be a link to create my user page$/) do
- expect(on(UserPage).edit_link_element).to be_visible
-end
-
-When(/^I click the create my user page link$/) do
- on(UserPage) do |page|
- page.wait_until_rl_module_ready('skins.minerva.editor')
- page.edit_link_element.click
end
end
diff --git a/tests/browser/features/step_definitions/watchstar_steps.rb
b/tests/browser/features/step_definitions/watchstar_steps.rb
deleted file mode 100644
index c6366e2..0000000
--- a/tests/browser/features/step_definitions/watchstar_steps.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-Given(/^I am viewing a watched page$/) do
- api.create_page 'Selenium mobile watch test', 'watch test'
- api.watch_page 'Selenium mobile watch test'
- step 'I am on the "Selenium mobile watch test" page'
-end
-
-Given(/^I am viewing an unwatched page$/) do
- api.create_page 'Selenium mobile watch test', 'watch test'
- api.unwatch_page 'Selenium mobile watch test'
- step 'I am on the "Selenium mobile watch test" page'
-end
-
-Then(/^I should see a toast with message about watching the page$/) do
- expect(on(ArticlePage).toast_element.when_present.text).to match 'Added
Selenium mobile watch test to your watchlist'
-end
-
-Then(/^I should see a toast with message about unwatching the page$/) do
- on(ArticlePage) do |page|
- page.wait_until do
- page.text.include? 'Removed' # Chrome needs this, FF does not
- end
- expect(page.toast_element.when_present.text).to match 'Removed Selenium
mobile watch test from your watchlist'
- end
-end
diff --git a/tests/browser/features/step_definitions/wikidata_descriptions.rb
b/tests/browser/features/step_definitions/wikidata_descriptions.rb
deleted file mode 100644
index 8b70621..0000000
--- a/tests/browser/features/step_definitions/wikidata_descriptions.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-Then(/^I should see a wikidata description$/) do
- expect(on(ArticlePage).wikidata_description_element).to be_visible
-end
-
-Then(/^I should not see a wikidata description$/) do
- expect(on(ArticlePage).wikidata_description_element).not_to be_visible
-end
diff --git a/tests/browser/features/talk.feature
b/tests/browser/features/talk.feature
deleted file mode 100644
index 07f0315..0000000
--- a/tests/browser/features/talk.feature
+++ /dev/null
@@ -1,50 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
@vagrant
-Feature: Talk
-
- Background:
- Given I am using the mobile site
-
- @smoke @integration @login
- Scenario: Talk doesn't show on talk pages
- Given the page "Talk:Selenium talk test" exists
- And I am logged in as a user with a > 5 edit count
- And I am on the "Talk:Selenium talk test" page
- Then there should be no talk button
-
- @login
- Scenario: Talk on a page that does exist
- Given the page "Talk:Selenium talk test" exists
- And I am logged in as a user with a > 5 edit count
- And the page "Selenium talk test" exists
- When I click the talk button
- Then I should see the talk overlay
-
- @login
- Scenario: Talk on a page that doesn't exist (bug 64268)
- Given I am logged in as a user with a > 5 edit count
- And I am on a page that does not exist
- When I click the talk button
- Then I should see the talk overlay
-
- @smoke @integration @login
- Scenario: Add discussion on talk page possible as logged in user
- Given the page "Talk:Selenium talk test" exists
- And I am logged in as a user with a > 5 edit count
- And the page "Selenium talk test" exists
- When I click the talk button
- Then there should be an add discussion button
-
- @integration
- Scenario: A newly created topic appears in the list of topics immediately
- Given the page "Talk:Selenium talk test" exists
- And I am logged in as a user with a > 5 edit count
- And the page "Selenium talk test" exists
- When I click the talk button
- And no topic is present
- And I add a topic called "New topic"
- Then I should see the topic called "New topic" in the list of topics
-
- Scenario: Add discussion on talk page not possible as logged out user
- Given the page "Talk:Selenium talk test" exists
- And the page "Selenium talk test" exists
- Then there should be no talk button
diff --git a/tests/browser/features/toc.feature
b/tests/browser/features/toc.feature
deleted file mode 100644
index 34706de..0000000
--- a/tests/browser/features/toc.feature
+++ /dev/null
@@ -1,17 +0,0 @@
[email protected] @firefox @test2.m.wikipedia.org @vagrant
-Feature: Table of contents
-
- Background:
- Given I am using the mobile site
- #And in Firefox see bug T88288
-
- @smoke @integration
- Scenario: Don't show table of contents on mobile
- Given I am viewing the site in mobile mode
- When I go to a page that has sections
- Then I should not see the table of contents
-
- Scenario: Show table of contents on tablet
- Given I am viewing the site in tablet mode
- When I go to a page that has sections
- Then I should see the table of contents
diff --git a/tests/browser/features/toggling.feature
b/tests/browser/features/toggling.feature
deleted file mode 100644
index 0ffc2a3..0000000
--- a/tests/browser/features/toggling.feature
+++ /dev/null
@@ -1,22 +0,0 @@
[email protected] @firefox @test2.m.wikipedia.org @vagrant
-Feature: Toggling sections
-
- Background:
- Given I am using the mobile site
- And I am viewing the site in mobile mode
-
- Scenario: Respect the hash on sections
- When I visit the page "Selenium section test page" with hash "#Section_2A"
- Then the heading element with id "Section_2A" should be visible
-
- @smoke @integration
- Scenario: Opening a section on mobile
- Given I go to a page that has sections
- When I click on the first collapsible section heading
- Then I should see the content of the first section
-
- Scenario: Closing a section on mobile
- Given I go to a page that has sections
- And I click on the first collapsible section heading
- When I click on the first collapsible section heading
- Then I should not see the content of the first section
diff --git a/tests/browser/features/toggling_tablet.feature
b/tests/browser/features/toggling_tablet.feature
deleted file mode 100644
index d5a8d1a..0000000
--- a/tests/browser/features/toggling_tablet.feature
+++ /dev/null
@@ -1,11 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @vagrant
-Feature: Toggling sections
-
- Background:
- Given I am using the mobile site
-
- Scenario: Section open by default on tablet
- Given I am viewing the site in tablet mode
- And I go to a page that has sections
- When I click on the first collapsible section heading
- Then I should not see the content of the first section
diff --git a/tests/browser/features/ui.feature
b/tests/browser/features/ui.feature
deleted file mode 100644
index 00899dd..0000000
--- a/tests/browser/features/ui.feature
+++ /dev/null
@@ -1,38 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox
-Feature: Check UI components
-
- Background:
- Given I am using the mobile site
-
- @smoke @integration
- Scenario: Check existence of important UI components on the main page
- Given I am on the "Main Page" page
- Then I should see the history link
-
- @smoke @integration
- Scenario: Check existence of important UI components on other pages.
- Given the page "Selenium UI test" exists
- And I am on the "Selenium UI test" page
- Then I should see the link to the user page of the last editor
- And I should see the last modified bar history link
- And I should see the switch to desktop link
- And I should see the license link
- And I should see a link to the privacy page
-
- @smoke @integration @adminuser
- Scenario: Check existence of important UI components on other pages.
- Given the wiki has a terms of use
- And the page "Selenium UI test" exists
- And I am on the "Selenium UI test" page
- Then I should see a link to the terms of use
-
- @smoke @integration
- Scenario: Check that the beta mode indicator is hidden in stable.
- Given I am on the "Main Page" page
- Then I should not see the beta mode indicator
-
- @smoke @integration
- Scenario: Check that the beta mode indicator is visible in beta.
- Given I am on the "Main Page" page
- And I am in beta mode
- Then I should see the beta mode indicator
diff --git a/tests/browser/features/user_page.feature
b/tests/browser/features/user_page.feature
deleted file mode 100644
index 72aca17..0000000
--- a/tests/browser/features/user_page.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @login
@test2.m.wikipedia.org @vagrant @integration @login
-Feature: User:<username>
-
- Background:
- Given I am logged into the mobile website
- And I visit my user page
-
- Scenario: Check components in user page
- Then I should be on my user page
- And there should be a link to my talk page
- And there should be a link to my contributions
- And there should be a link to my uploads
-
- Scenario: Check user page is editable
- And I should be on my user page
- And there should be a link to create my user page
- When I click the create my user page link
- Then I see the wikitext editor overlay
diff --git a/tests/browser/features/watchstar.feature
b/tests/browser/features/watchstar.feature
deleted file mode 100644
index e756399..0000000
--- a/tests/browser/features/watchstar.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration @smoke
@test2.m.wikipedia.org @login @vagrant
-Feature: Manage Watchlist
-
- Background:
- Given I am logged into the mobile website
-
- Scenario: Add an article to the watchlist
- Given I am viewing an unwatched page
- When I click the watch star
- Then I should see a toast with message about watching the page
- And the watch star should be selected
-
- Scenario: Remove an article from the watchlist
- Given I am viewing a watched page
- When I click the unwatch star
- Then I should see a toast with message about unwatching the page
- And the watch star should not be selected
diff --git a/tests/browser/features/wikidata_descriptions.feature
b/tests/browser/features/wikidata_descriptions.feature
deleted file mode 100644
index fdbc552..0000000
--- a/tests/browser/features/wikidata_descriptions.feature
+++ /dev/null
@@ -1,21 +0,0 @@
-@chrome @firefox @en.m.wikipedia.beta.wmflabs.org @vagrant
-Feature: Wikidata descriptions
-
- Background:
- Given I am using the mobile site
- And I am on the "Main Page" page
-
- Scenario: Description does not appear on Main Page
- Then I should not see a wikidata description
-
- Scenario: Description appears on main namespace
- When I am on the "Albert Einstein" page
- Then I should see a wikidata description
-
- Scenario: Description does not appear on non-main namespaces
- Given I am on the "Talk:Contributions" page
- Then I should not see a wikidata description
-
- Scenario: Description does not appear on special pages
- Given I am on the "Special:Contributions" page
- Then I should not see a wikidata description
--
To view, visit https://gerrit.wikimedia.org/r/364325
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5e83d9e75f3c01fc984f221ae5f4fb7394b4a127
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits