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 for anonymous users
Implementation:

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

Background: Base language at the start of the test is English

Background: The tests need to be run as an anonymous user

URL to use: to-be-decided

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 titled "In other languages" 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 titled "In other languages" and a cog icon near it

Scenario: The cog icon is visible in the sidebar on the talk page of an article without interlanguage links Given I am on a talk page of an article without interlanguage links When I scroll to the area where interlanguage links are on articles Then I should see the Languages header titled "In other languages" and a cog icon near it

Scenario: The cog icon is visible in the sidebar on the talk page of an article with interlanguage links Given I am on a talk page of an article with interlanguage links When I scroll to the area where interlanguage links are on articles Then I should see the Languages header titled "In other languages" and a cog icon near it

Scenario: Clicking the cog icon opens the Language Settings panel Given I am on a wiki page When I click on the cog icon near the interlanguage links on the side-bar Then the "Language Settings" panel appears

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

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

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

Feature: ULS cog behaviour on the side-bar for logged in users
Implementation:

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

Background: Base language at the start of the test is English

Background: The tests needs to run with a logged-in user

URL to use: to-be-decided

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 titled "In other languages" 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 titled "In other languages" and a cog icon near it

Scenario: The cog icon is visible in the sidebar on the talk page of an article without interlanguage links Given I am on a talk page of an article without interlanguage links When I scroll to the area where interlanguage links are on articles Then I should see the Languages header titled "In other languages" and a cog icon near it

Scenario: The cog icon is visible in the sidebar on the talk page of an article with interlanguage links Given I am on a talk page of an article with interlanguage links When I scroll to the area where interlanguage links are on articles Then I should see the Languages header titled "In other languages" and a cog icon near it

Scenario: Clicking the cog icon opens the Language Settings panel Given I am on a wiki page When I click on the cog icon near the interlanguage links on the side-bar Then the "Language Settings" panel appears

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

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

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

Feature: Display settings on the Language Settings panel menu for anonymous users
Implementation: Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki.

Background: Base language at the start of the test is English

Background: The tests need to be run as an anonymous user

URL to use: to-be-decided Scenario: Language settings panel displays "Display" and "Input" options Given I clicked the cog icon to open the 'Language Settings' panel When the panel opens Then I see the buttons "Display" and "Input" buttons on the left side

Scenario: "Display" option is selected by default in a new Language settings panel Given I clicked the cog icon to open the 'Language Settings' panel When the panel opens Then I see the button "Display" selected at the start

Scenario: Selected option can be changed in the Language settings panel Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default When I click on the 'Input' option Then I see the "Display" options changed to the "Input" options

Scenario:Language settings panel can be closed after changing the selected option Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it	When I click on the close button	Then the "Language settings" panel disappears

Scenario:Language settings panel can be closed after changing the selected option and applying the setting Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it	When I click on the 'apply settings' button	Then the "Language settings" panel disappears

Scenario:Language settings panel can be closed after changing the selected option and cancelling Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it	When I click on the 'cancel' button	Then the "Language settings" panel disappears

Scenario: Selected option should be persistant on reopening the Language settings panel after closing Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it            And I have closed the panel using the X button to close it	When I click on the cog to reopen the panel	Then I see the "Input" option selected by default

Scenario: Selected option should be persistant on reopening the Language settings panel after applying the setting Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it            And I have closed the panel using the 'apply setting' button to close it	When I click on the cog to reopen the panel	Then I see the "Input" option selected by default

Scenario: Selected option should be persistant on reopening the Language settings panel after cancelling Given I clicked the cog icon to open the 'Language Settings' panel with 'Display' settings selected by default And I have clicked the 'Input" option to select it            And I have closed the panel using the 'cancel' button to close it	When I click on the cog to reopen the panel	Then I see the "Input" option selected by default

Scenario: "Language" and "Fonts" are shown within the Display" option	Given I clicked the cog icon to open the 'Language Settings' panel	When the panel opens            And the 'Display" option is selected at the start Then I see the "Language" and "Fonts" buttons on the right hand side

Scenario: "Language" option in selected by default within the Display" option	Given I clicked the cog icon to open the 'Language Settings' panel	When the panel opens            And the 'Display" option is selected at the start Then I see the "Language" button selected by default

Scenario: "Language" option does not allow changes by anonymous users Given I clicked the cog icon to open the 'Language Settings' panel When the 'Display' option is shown Then I see a 'Log in' link inside the panel

Scenario: "Fonts" option allows the font to the selected Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Fonts' button Then I see a dropdown button to select the font

Scenario: "Fonts" selection dropdown button should be active Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Fonts' button Then I should see a dropdown button in an active state

Scenario: "Fonts" selection dropdown button should display options to select Given I clicked the cog icon to open the 'Language Settings' panel And I have selected the 'Fonts' option When I click on the dropdown button to select a font Then I should see a list of fonts that I can select from

Scenario: Font selected from the "Fonts" selection dropdown button should be used Given I clicked the cog icon to open the 'Language Settings' panel And I have selected the 'Fonts' option When I click on the dropdown button and select a font Then I should see selected font being immediately used in the page

Scenario: Download font checkbox should be visible Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Fonts' button Then I should see a checkbox to 'Download font'

Scenario: Download font checkbox should be active Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Fonts' button Then I should see the checkbox to 'Download font' in is an active state

Scenario: Download font checkbox should be selected Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Fonts' button Then I should see that checkbox to 'Download font' is in a selected state

Scenario: Font selection dropdown will be hidden Given I clicked the cog icon to open the 'Language Settings' panel And I have selected the 'Fonts' option When I click on the 'Download font' checkbox button to uncheck it	Then I should see that dropdown button to select a font is hidden

Scenario: Font selection dropdown will be shown Given I clicked the cog icon to open the 'Language Settings' panel And I have selected the 'Fonts' option And the checkbox button to Download font is not selected When I click on the 'Download font' checkbox button to check it	Then I should see that a dropdown button to select a font is displayed

Feature: Input settings on the Language Settings panel menu for anonymous users
Implementation: Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki.

Background: Base language at the start of the test is English

Background: The tests need to be run as an anonymous user

URL to use: to-be-decided Scenario: Input settings options are displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then I see the option changes from Font settings to Input settings

Scenario: Buttons with language names displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then I see 3 buttons with language names and 1 button with ellipsis displayed in the panel

Scenario: Buttons with language names displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then I see the button for English selected by default

Scenario: Input methods is displayed for the language selected by default Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then I see radio buttons displayed for the input methods of the language button that is selected by default

Scenario: Input methods change when the language is changed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option And click on a button to change the language Then I see the input methods of the newly selected language displayed with the radio buttons

Scenario: ULS language selection dialog is displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option And click on the button with the ellipsis Then I see the ULS language selection dialog

Scenario: Disable input method option is displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then the option to 'Disable the input method' is displayed as the last option in the radio buttons displayed for the input methods of the language button that is selected by default

Scenario: Disable input method option is always displayed with the list of input methods Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then the option to 'Disable the input method' is displayed as the last option in the radio buttons displayed for the input methods of the language button that is selected by default

Scenario: Disable input method button is always displayed Given I clicked the cog icon to open the 'Language Settings' panel When I click on the 'Input' option Then a button to 'Disable input method tools' should always be visible

Scenario: Disable input method button should hide the language buttons Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And the input methods are not disabled When I click on the 'Disable input method tools' button Then the buttons with the language names and the ellipsis should be hidden

Scenario: Disable input method button should change its label when pressed Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And the input methods are not disabled When I click on the 'Disable input method tools' button Then the button label should change to 'Enable input method tools'

Scenario: Enable input method button should restore the language buttons Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And the input methods is disabled When I click on the 'Enable input method tools' button Then the buttons with the language names and the ellipsis should reappear

Scenario: Enable input method button should change its label when pressed Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And the input methods is disabled When I click on the 'Enable input method tools' button Then the button label should change to 'Disable input method tools'

Scenario: Input method selection should persist Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And I am on the default language English And I have selected the 'International Phonetic Alphabet - SIL' radio button And I have closed the panel using the X button When I click the cog button to reopen the Settings panel Then the selected input method should be 'International Phonetic Alphabet - SIL'

Scenario: Input method selection should persist Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And I am on the default language English And I have selected the 'International Phonetic Alphabet - SIL' radio button And I have closed the panel using the Cancel button When I click the cog button to reopen the Settings panel Then the selected input method should be 'International Phonetic Alphabet - SIL'

Scenario: Input method selection should persist Given I clicked the cog icon to open the 'Language Settings' panel And I have clicked the 'input' option And I am on the default language English And I have selected the 'International Phonetic Alphabet - SIL' radio button And I have closed the panel using the Apply Settings button When I click the cog button to reopen the Settings panel Then the selected input method should be 'International Phonetic Alphabet - SIL'

Feature: Display settings on the Language Settings panel menu for logged-in users
Implementation: Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki. Background: Base language at the start of the test is English URL to use: to-be-decided Scenario: Language settings panel is split into "Display" and "Input" Given I clicked the cog icon to open the 'Language Settings' panel When the panel opens Then I see the buttons "Display" and "Input" buttons on the left side

Scenario: Language settings panel is split into "Display" and "Input" Given I clicked the cog icon to open the 'Language Settings' panel When the panel opens Then I see the buttons "Display" and "Input" buttons on the left side

Scenario: Language settings are split to "Display" and "Input" Given I open the "Language Settings" panel When the click the Display 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: Input settings on the Language Settings panel menu for logged-in users
Implementation: Background: In all of the following scenarios the global variable $wgULSPosition is set to 'interlanguage' for the wiki.

Background: Base language at the start of the test is English

Background: The tests need to be run as an anonymous user

URL to use: to-be-decided

Feature: ULS Language Settings for anonymous users
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 Language Settings for logged in users
Implementation:

Feature: ULS Input preferences for anonymous users
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

Feature: ULS Input preferences for logged in users
Implementation:

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