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
Implementation: 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: User can see input method keyboard icon Given I am on a wiki page with input options When I click on an input box Then I should see the IME keyboard icon at the bottom right

Scenario: ULS can see dropdown menu when they click on the IME icon 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: Autonyms of keyboards should be visible to the user Given  I have clicked on the IME keyboard icon When I get the drop down list of keyboards Then I should see the autonyms of the keyboards

Scenario: Language and Input Settings dialog should be displayed to the user Given I have the dropdown menu of the keyboard 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: User should see the main ULS dialog Given I have the dropdown menu of the keyboard open When I click on the '...' option near the bottom of the dropdown Then I should see the main ULS dialog

Scenario: Name of the selected keymap is visible with the IME icon Given I have the dropdown menu of the keyboard open When I click on the 'Bengali Probhat' keyboard Then I should see the name of the keyboard i.e. 'Bengali Probhat' displayed with the IME icon

Scenario: User should not be able to type with a disabled keymap Given I have selected and enabled a keyboard 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 keyboard being disabled and am not able to type in that script

Scenario: The name of a disabled keyboard should not be visible in the IME icon tooltip Given I have selected a keyboard and enabled from the dropdown menu When I press 'ctrl+m' to disable it	Then I should see the name of the keyboard removed from the tooltip displaying the IME icon

Scenario: Without a prior keyboard selection a keyboard name should not be displayed on pressing the shortcut keys Given The cursor is on an input box and I have not made any keyboard selection When I press 'ctrl+m' Then I should not see any keyboard name displayed along with the IME icon

Scenario: Keyboard selected in one input box should also be the selected keyboard in the next one Given I have selected a keyboard 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 keyboard that was selected in the previous box

Scenario: Name of a keyboard selected in one input box should be displayed in the next one Given I have selected a keyboard and enabled from the dropdown menu When I move from the currently active input box to another input box Then I should see the keyboard name still displayed with the IME icon

Feature: ULS cog behaviour on the side-bar
Implementation:

Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage'.

Scenario: The cog icon is visible in the sidebar on an article without interlanguage links Given I am on a wiki content page without interlanguage links When I scroll to the area where interlanguage links are supposed to be	Then I should see the Languages header and a cog icon near it

Scenario: The cog icon is visible in the sidebar on an article with interlanguage links Given I am on a wiki content page with interlanguage links When I scroll to the area where interlanguage links are Then I should see the Languages header and a cog icon near it

Scenario: The cog icon is visible in the sidebar on a talk page Given I am on a talk page When I scroll to the area where interlanguage links are on articles Then I should see the Languages header and a cog icon near it

Scenario: Clicking the cog icon opens the Display settings panel Given I am on a wiki page When I click on the cog icon near the interlanguage links Then the "Display settings" panel appears

Scenario: Clicking the cog icon when the Display settings panel is open closes it	Given I am on a wiki page with the Display settings panel open When I click on the cog icon near the interlanguage links Then the "Display settings" panel disappears

Scenario: Clicking the cancel button in the Display settings panel closes it	Given I am on a wiki page with the Display settings panel open When I click on the "Cancel" button in the panel Then the "Display settings" panel disappears

Scenario: Clicking the cog after closing the Display settings panel using the Cancel button opens the panel Given I closed the Display settings panel using the Cancel button When I click on the cog icon Then the "Display settings" panel appears

Scenario: Display settings are split to "Language" and "Fonts" Given I logged in and clicked the cog icon When the panel opens Then I see the buttons "Language" and "Fonts" at the top, "Language" is pressed, three buttons with language names are shown, and one button with ellipsis

Scenario: Display settings are split to "Language" and "Fonts" Given I open the "Display settings" panel When the click the Fonts button Then the content language and the menu language appear and I can change the fonts for them

Scenario: Anonymous users cannot change the language using ULS Given I logged out and went to a wiki page When I click on the cog icon Then the opened panel shows the name of the content language and invites me to log in to change the language

Feature: ULS Language Settings
Implementation:

Scenario: Display Settings button should be visible at the bottom of the ULS Window 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: User should see the Display settings panel with the the name of currently selected language 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: Dropdown to select fonts for the selected language should be displayed 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: After selection of OpenDyslexic font the name of the font should be displayed in the span element 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: On OpenDyslexic font selection ULS window should close when settings are applied by pressing a button 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: Name of the selected font OpenDyslexic should be displayed in span element even after page refresh 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: Display Settings button should be displayed at the bottom of the ULS window when OpenDyslexic font is selected 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: English should be displayed as the name of the language and OpenDyslexic as font name in the display settings panel when OpenDyslexic font is selected 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: Font name should change in the span element on selection of system font from the dropdown 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: On system font selection ULS window should close when settings are applied by pressing a button 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: Name of the selected system font should be displayed in span element even after page refresh Given I am on a wiki page with an element saying Hello in the system 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

Feature: ULS Input preferences
Implementation:

Scenario: Input settings button should be visible at the bottom of the ULS Window Given I am on a wiki page When I click on the ULS link at the top Then I should see the "Input settings" button at the bottom of the ULS window

Scenario: Input settings open Given I am looking at the main ULS window When I click on the "Input settings" button at the bottom of the ULS window Then I should see the "Input settings" panel

Scenario: Input settings can be disabled Given I am looking at the Input settings panel When I click on the "Disable input method tools" button Then the preference "Enable input method tools" becomes disabled

Scenario: Input settings can be enabled Given I am looking at the Input settings panel When I click on the "Enable input method tools" button Then the preference "Enable input method tools" becomes enabled

Scenario: Preferences and ULS panel are synchronized Given I am logged in and I am looking at Special:Preferences When I uncheck the "Enable input method tools" preference, save the preferences and open ULS Input settings Then the panel shows the "Enable input method tools"

Scenario: Preferences and ULS panel are synchronized Given I am logged in and I am looking at Special:Preferences When I uncheck the "Enable input method tools" preference, save the preferences and open ULS Input settings Then the panel shows the "Enable input method tools"

Scenario: Preferences and ULS panel are synchronized Given I am logged in and I am looking at Special:Preferences When I check the "Enable input method tools" preference, save the preferences and open ULS Input settings Then the panel shows the "Disable input method tools" button, three buttons with language names and a list of input methods for one of the languages

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