More refactoring of tests per feature
Change-Id: Ie9acf09f9bb992f6e03ff6dfbb80e1e20a9d43ca
This commit is contained in:
@@ -46,3 +46,13 @@ Before('@uls-in-sidebar-only') do |scenario|
|
|||||||
scenario.skip_invoke!
|
scenario.skip_invoke!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Before('@uls-in-personal-only') do |scenario|
|
||||||
|
if !defined?($uls_position)
|
||||||
|
visit(ULSPage)
|
||||||
|
$uls_position = @browser.execute_script( "return mw.config.get( 'wgULSPosition' )" );
|
||||||
|
end
|
||||||
|
if $uls_position != 'personal'
|
||||||
|
scenario.skip_invoke!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
When(/^I click language selector trigger element$/) do
|
|
||||||
on(RandomPage).uls_trigger
|
|
||||||
end
|
|
||||||
|
|
||||||
Then(/^I should see the Language selector$/) do
|
|
||||||
on(RandomPage).language_settings_dialog_element.should be_visible
|
|
||||||
end
|
|
||||||
|
|
||||||
Then(/^I should see a cog icon near the 'Languages' header$/) do
|
|
||||||
on(RandomPage).cog_element.should exist
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
When(/^I click language selector trigger element$/) do
|
||||||
|
on(RandomPage).uls_trigger
|
||||||
|
end
|
||||||
|
|
||||||
|
Then(/^I should see the Language selector$/) do
|
||||||
|
on(RandomPage).language_settings_dialog_element.should be_visible
|
||||||
|
end
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@sandbox.translatewiki.net
|
|
||||||
Feature: Universal Language Selector User language selector
|
|
||||||
|
|
||||||
@test2.wikipedia.org
|
|
||||||
Scenario: Open Language selector
|
|
||||||
Given I visit a random page
|
|
||||||
When I click language selector trigger element
|
|
||||||
Then I should see the Language selector
|
|
||||||
|
|
||||||
Scenario: The cog icon is visible in the sidebar on an article
|
|
||||||
Given I am at random page
|
|
||||||
Then I should see a cog icon near the 'Languages' header
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
@en.wikipedia.beta.wmflabs.org @ie6-bug @ie7-bug
|
|
||||||
Feature: ULS cog in the sidebar allows access to language settings
|
|
||||||
|
|
||||||
@login @uls-in-sidebar-only
|
|
||||||
Scenario Outline: Opening language settings from sidebar
|
|
||||||
Given I am <user status>
|
|
||||||
And I am on <page type>
|
|
||||||
When I click the cog icon by Languages in the sidebar
|
|
||||||
Then I see the <user status> language settings panel
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
| user status | page type |
|
|
||||||
| logged out | a page without interlanguage links |
|
|
||||||
| logged in | a page with interlanguage links |
|
|
||||||
| logged out | a talk page without interlanguage links |
|
|
||||||
| logged out | a talk page with interlanguage links |
|
|
||||||
|
|
||||||
@login @uls-in-sidebar-only
|
|
||||||
Scenario Outline: Closing language settings without saving
|
|
||||||
Given I am <user status>
|
|
||||||
And I am on a page without interlanguage links
|
|
||||||
When I click the cog icon by Languages in the sidebar
|
|
||||||
And <close method>
|
|
||||||
Then I do not see the Language Settings panel
|
|
||||||
And I click the cog icon by Languages in the sidebar
|
|
||||||
And I see the <user status> language settings panel
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
| user status | close method |
|
|
||||||
| logged in | I click X |
|
|
||||||
| logged out | I click Cancel |
|
|
||||||
# It is weird that this works, since the button is disabled until changes
|
|
||||||
# have been made
|
|
||||||
| logged out | I click Apply Settings |
|
|
||||||
|
|
||||||
@login
|
|
||||||
Scenario Outline: Input settings display
|
|
||||||
Givan I am <user status>
|
|
||||||
And I am on a page without interlanguage links
|
|
||||||
When I open "Input" panel of language settings
|
|
||||||
Then I can enable input methods
|
|
||||||
And I can disable input methods
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
| user status |
|
|
||||||
| logged out |
|
|
||||||
| logged in |
|
|
||||||
|
|
||||||
Scenario: How to use link appears in the Input settings panel
|
|
||||||
Given I am at random page
|
|
||||||
When I open "Input" panel of language settings
|
|
||||||
And I click the button with the ellipsis
|
|
||||||
And in the language filter I type ml
|
|
||||||
And I click on the link to select Malayalam
|
|
||||||
Then I should see the How to use link near the Malayalam transliteration item
|
|
||||||
|
|
||||||
Scenario: More languages (input language selection)
|
|
||||||
Given I am at random page
|
|
||||||
When I open "Input" panel of language settings
|
|
||||||
And I click the button with the ellipsis
|
|
||||||
Then I see Worldwide
|
|
||||||
And I see Language Search
|
|
||||||
And I can navigate back to Input Settings
|
|
||||||
|
|
||||||
@login
|
|
||||||
Scenario: More languages (interface language selection)
|
|
||||||
Given I am logged in
|
|
||||||
When I open "Language" panel of language settings
|
|
||||||
And I click the button with the ellipsis
|
|
||||||
Then I see Common Languages
|
|
||||||
And I see Worldwide
|
|
||||||
And I see Language Search
|
|
||||||
And I can navigate back to Language Settings
|
|
||||||
41
tests/browser/features/uls_settings_panel.feature
Normal file
41
tests/browser/features/uls_settings_panel.feature
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
@commons.wikimedia.beta.wmflabs.org @en.wikipedia.beta.wmflabs.org
|
||||||
|
Feature: ULS settings panel
|
||||||
|
|
||||||
|
@login
|
||||||
|
Scenario Outline: Input settings display
|
||||||
|
Givan I am <user status>
|
||||||
|
And I am on a page without interlanguage links
|
||||||
|
When I open "Input" panel of language settings
|
||||||
|
Then I can enable input methods
|
||||||
|
And I can disable input methods
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| user status |
|
||||||
|
| logged out |
|
||||||
|
| logged in |
|
||||||
|
|
||||||
|
Scenario: How to use link appears in the Input settings panel
|
||||||
|
Given I am at random page
|
||||||
|
When I open "Input" panel of language settings
|
||||||
|
And I click the button with the ellipsis
|
||||||
|
And in the language filter I type ml
|
||||||
|
And I click on the link to select Malayalam
|
||||||
|
Then I should see the How to use link near the Malayalam transliteration item
|
||||||
|
|
||||||
|
Scenario: More languages (input language selection)
|
||||||
|
Given I am at random page
|
||||||
|
When I open "Input" panel of language settings
|
||||||
|
And I click the button with the ellipsis
|
||||||
|
Then I see Worldwide
|
||||||
|
And I see Language Search
|
||||||
|
And I can navigate back to Input Settings
|
||||||
|
|
||||||
|
@login
|
||||||
|
Scenario: More languages (interface language selection)
|
||||||
|
Given I am logged in
|
||||||
|
When I open "Language" panel of language settings
|
||||||
|
And I click the button with the ellipsis
|
||||||
|
Then I see Common Languages
|
||||||
|
And I see Worldwide
|
||||||
|
And I see Language Search
|
||||||
|
And I can navigate back to Language Settings
|
||||||
40
tests/browser/features/uls_triggers.feature
Normal file
40
tests/browser/features/uls_triggers.feature
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
@commons.wikimedia.beta.wmflabs.org @en.wikipedia.beta.wmflabs.org
|
||||||
|
Feature: ULS trigger in personal toolbar
|
||||||
|
|
||||||
|
@uls-in-personal-only
|
||||||
|
Scenario: Open language selector
|
||||||
|
Given I visit a random page
|
||||||
|
When I click language selector trigger element
|
||||||
|
Then I should see the Language selector
|
||||||
|
|
||||||
|
@login @uls-in-sidebar-only
|
||||||
|
Scenario Outline: Opening language settings from sidebar
|
||||||
|
Given I am <user status>
|
||||||
|
And I am on <page type>
|
||||||
|
When I click the cog icon by Languages in the sidebar
|
||||||
|
Then I see the <user status> language settings panel
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| user status | page type |
|
||||||
|
| logged out | a page without interlanguage links |
|
||||||
|
| logged in | a page with interlanguage links |
|
||||||
|
| logged out | a talk page without interlanguage links |
|
||||||
|
| logged out | a talk page with interlanguage links |
|
||||||
|
|
||||||
|
@login @uls-in-sidebar-only
|
||||||
|
Scenario Outline: Closing language settings without saving
|
||||||
|
Given I am <user status>
|
||||||
|
And I am on a page without interlanguage links
|
||||||
|
When I click the cog icon by Languages in the sidebar
|
||||||
|
And <close method>
|
||||||
|
Then I do not see the Language Settings panel
|
||||||
|
And I click the cog icon by Languages in the sidebar
|
||||||
|
And I see the <user status> language settings panel
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| user status | close method |
|
||||||
|
| logged in | I click X |
|
||||||
|
| logged out | I click Cancel |
|
||||||
|
# It is weird that this works, since the button is disabled until changes
|
||||||
|
# have been made
|
||||||
|
| logged out | I click Apply Settings |
|
||||||
Reference in New Issue
Block a user