Language Testing Plan/ULS Test Scenarios

Feature: ULS Accept-Language
Implementation: https://github.com/wikimedia/qa-browsertests/blob/master/features/accept_language.feature

Scenario: Accept-Language German Given that my browser's accept language is "de" When I visit a random page on sandbox.translatewiki.net Then the text displayed for div with id n-mainpage-description is "Hauptseite" Scenario: Accept-Language Serbian Given that my browser's accept language is "sr" When I visit a random page on sandbox.translatewiki.net Then the text displayed for div with id n-mainpage-description is "Главна страна" Scenario: Accept-Language Serbian Cyrillic Given that my browser's accept language is "sr-ec" When I visit a random page on sandbox.translatewiki.net Then the text displayed for div with id n-mainpage-description is "Главна страна" Scenario: Accept-Language Serbian Latin Given that my browser's accept language is "sr-el" When I visit a random page on sandbox.translatewiki.net Then the text displayed for div with id n-mainpage-description is "Glavna strana"

Feature: ULS User Language Selector
Implemented here: https://github.com/wikimedia/qa-browsertests/blob/master/features/universal_language_selector.feature

Scenario: Open Language selector Given I am at random page with Accept-Language "en" When I click "English" Then I should see the Language selector

Feature: ULS IME
Implementation: -

Scenario: ULS enabled wiki Given I am on a wiki page with input options When I click on the IME keyboard icon Then I should see the dropdown menu with the a list of keymaps

Scenario: I am on an ULS enabled wiki page with input options Given  I have clicked on the IME keyboard icon When I get the drop down list of keymaps Then I should see the autonyms of the keymaps

Scenario: I am on an ULS enabled wiki page with input options Given I have the dropdown menu of the keymap open When I click on the 'More Settings' option at the bottom of the dropdown Then I should see the dialog to select Language and Input settings

Scenario: I am on an ULS enabled wiki page with input options Given I have the dropdown menu of the keymap open When I click on the '...' option near the bottom of the dropdown Then I should see the main ULS dialog

Scenario: I am on an ULS enabled wiki page with input options Given I have the dropdown menu of the keymap open When I click on the 'More Settings' option at the bottom of the dropdown Then I should see the dialog to select Language and Input settings

Scenario: I am on an ULS enabled wiki page with input options Given I have the dropdown menu of the keymap open When I click on the 'Bengali Probhat' keymap Then I should see the name of the keymap i.e. 'Bengali Probhat' displayed with the IME icon

Scenario: I am on an ULS enabled wiki page with input options Given I have selected and enabled a keymap to use from the dropdown menu and its name is displayed with the IME icon When I press 'Ctrl+m' Then I should see the selected keymap being disabled and am not able to type in that script

Scenario: I am on an ULS enabled wiki page with input options Given I have selected a keymap and enabled from the dropdown menu When I press 'ctrl+m' to disable it	Then I should see the name of the keymap removed from the tooltip displaying the IME icon

Scenario: I am on an ULS enabled wiki page with input options Given I have selected and disabled a keymap to use from the dropdown menu and its name is not displayed with the IME icon When I press 'Ctrl+m' Then I should see the selected keymap being disabled

Scenario: I am on an ULS enabled wiki page with input options Given The cursor is on an input box and I have not made any keymap selection When I press 'ctrl+m' Then I should not see any keymap name displayed along with the IME icon

Scenario: I am on an ULS enabled wiki page with input options Given I have selected a keymap and enabled from the dropdown menu When I move from the currently active input box to another input box and start typing Then I should be able to write in the keymap that was selected in the previous box

Scenario: I am on an ULS enabled wiki page with input options Given I have selected a keymap and enabled from the dropdown menu When I move from the currently active input box to another input box Then I should see the keymap name still displayed with the IME icon

Scenario: Open the Language Selector and select Bengali Probhat input method Given That I have $.ime.register( bnProbhat ); set When I activate the input method in a text field Then I should see Bengali Probhat enabled

Feature: ULS Language Settings
Implementation:

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello When I click on the ULS link at the top Then I should see the "Display settings" button at the bottom of the ULS window

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello and with the ULS window open When I click on the "Display settings" button at the bottom of the ULS window Then I should see the Display settings panel with "English" on one of the buttons

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello with the ULS window open at the Display settings panel When I click on the "English" button Then I should see the settings for English, with a dropdown saying "Select font for English" and the value "System font"

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello with the ULS window open at the English Display settings panel When I select "OpenDyslexic" in the dropdown menu Then I should see that the font of the text in the span element changes to OpenDyslexic

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in OpenDyslexic font When I press the "Apply settings" button Then I should see that the ULS window closes

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in OpenDyslexic font and I just pressed the "Apply settings" button When I refresh the page Then I should see that the font of the text in the span element is still OpenDyslexic

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in OpenDyslexic font When I click on the ULS link at the top Then I should see the "Display settings" button at the bottom of the ULS window

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in OpenDyslexic font and with the ULS window open When I click on the "Display settings" button at the bottom of the ULS window Then I should see the Display settings panel with "English" on one of the buttons and the English settings showing, and "OpenDyslexic" in the dropdown

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello with the ULS window open at the English Display settings panel When I select "System font" in the dropdown menu Then I should see that the font of the text in the span element changes from OpenDyslexic to the default system font

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in the system font When I press the "Apply settings" button Then I should see that the ULS window closes

Scenario: ULS enabled wiki Given I am on a wiki page with an element saying Hello in OpenDyslexic font and I just pressed the "Apply settings" button When I refresh the page Then I should see that the font of the text in the span element is still the system font

User Scenario
Lev. Professor interested in linguistics and advanced Wikipedia editor.
 * Quick input language switching. Lev edits Hebrew and Russian wikipedias, he always uses the same input method for each language but often switches between those. He needs a quick way to switch between his usual input methods.
 * Use in a foreign language. A friend from Greece is visiting Lev, he wants to print some information for him in Greek. Lev access the Greek version of an article but for exporting it, he adjusts the UI language so that he can understand the export options.

Based on the above:
 * Identify features
 * Scenarios