Cucumber Features

Expand All

Collapse All

Feature: Input method engine


User is able to select among different input methods via a menu which is
activated by the input method indicator. User can type with selected input
method in different input fields and temporarily activate and deactivate the
input method.

@commons.wikimedia.beta.wmflabs.orgfeatures/ime.feature:9

Scenario: Input method indicator is shown The input method indicator is shown when input field gets a focus.

  1. Given I am at random page
    features/step_definitions/common_steps.rb:1
  2. When I click on an input box
    features/step_definitions/ime_steps.rb:9
  3. Then I should see the input method indicator
    features/step_definitions/ime_steps.rb:22
@commons.wikimedia.beta.wmflabs.orgfeatures/ime.feature:57

Scenario Outline: Input method menu is completely visible

  1. Given I visit a random page with <skin> skin and <language> as the interface language
    features/step_definitions/ime_steps.rb:66
  2. When I open the input method menu
    features/step_definitions/ime_steps.rb:17
  3. Then I should see the input method menu is not offscreen
    features/step_definitions/ime_steps.rb:70

Examples

skin
language
Vector
English
Vector
Hebrew
expected: true
     got: false (using ==)
./features/step_definitions/ime_steps.rb:71:in `/^I should see the input method menu is not offscreen$/'
features/ime.feature:60:in `Then I should see the input method menu is not offscreen'
Monobook
English
@login

Feature: Live preview of display language changes

Background

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. And I have reset my preferences
    features/step_definitions/textarea_font_steps.rb:1
  3. And I am at random page
    features/step_definitions/common_steps.rb:1
@commons.wikimedia.beta.wmflabs.orgfeatures/live_preview_of_display_language.feature:19

Scenario: Live preview of display language changes can be reverted on cancel

  1. Given I open the Universal Language Selector
    features/step_definitions/panel_steps.rb:5
  2. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  3. And I select a language different than English for display language
    features/step_definitions/live_preview_of_display_language_steps.rb:13
  4. When I click Cancel
    features/step_definitions/common_steps.rb:37
  5. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  6. Then I should see the text in the language panel in English
    features/step_definitions/live_preview_of_display_language_steps.rb:21
@commons.wikimedia.beta.wmflabs.orgfeatures/live_preview_of_display_language.feature:28

Scenario: Live preview of display language changes can be reverted on closing the dialog with the X button

  1. Given I open the Universal Language Selector
    features/step_definitions/panel_steps.rb:5
  2. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  3. And I select a language different than English for display language
    features/step_definitions/live_preview_of_display_language_steps.rb:13
  4. When I click X
    features/step_definitions/common_steps.rb:41
  5. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  6. Then I should see the text in the language panel in English
    features/step_definitions/live_preview_of_display_language_steps.rb:21
# https://bugzilla.wikimedia.org/57967
# @commons.wikimedia.beta.wmflabs.org
features/live_preview_of_display_language.feature:38

Scenario: Live preview of display language changes can be reverted on closing the dialog on cancel from a different panel

  1. Given I open the Universal Language Selector
    features/step_definitions/panel_steps.rb:5
  2. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  3. And I select a language different than English for display language
    features/step_definitions/live_preview_of_display_language_steps.rb:13
  4. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
  5. When I click Cancel
    features/step_definitions/common_steps.rb:37
  6. And I open Display panel of language settings
    features/step_definitions/panel_steps.rb:11
  7. Then I should see the text in the language panel in English
    features/step_definitions/live_preview_of_display_language_steps.rb:21
    unable to locate element, using {:class=>"uls-display-settings", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
    ./features/step_definitions/live_preview_of_display_language_steps.rb:23:in `/^I should see the text in the language panel in (.+?)$/'
    features/live_preview_of_display_language.feature:45:in `Then I should see the text in the language panel in English'
    21Then(/^I should see the text in the language panel in (.+?)$/) do |language|
    22	code = on(PanelPage).language_to_code(language)
    23	on(PanelPage).uls_display_settings_element.attribute("lang").should == code
    24end

Feature: Settings panel

@login @ime-default-onfeatures/settings_panel.feature:4

Scenario Outline: Input settings display

  1. Given I am <user status>
    features/step_definitions/common_steps.rb:5
  2. And I am on a page without interlanguage links
    features/step_definitions/cog_sidebar_user_steps.rb:5
  3. When I open ULS
    features/step_definitions/font_selection_steps.rb:17
  4. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
  5. Then I can disable input methods
    features/step_definitions/panel_steps.rb:42
  6. And I can enable input methods
    features/step_definitions/panel_steps.rb:46

Examples

user status
logged out
unable to locate element, using {:id=>"input-panel-trigger", :tag_name=>"div"}
./features/step_definitions/panel_steps.rb:80:in `/^I switch to Input panel of language settings$/'
features/settings_panel.feature:8:in `And I switch to Input panel of language settings'
logged in
unable to locate element, using {:id=>"input-panel-trigger", :tag_name=>"div"}
./features/step_definitions/panel_steps.rb:80:in `/^I switch to Input panel of language settings$/'
features/settings_panel.feature:8:in `And I switch to Input panel of language settings'
features/settings_panel.feature:17

Scenario: How to use link appears in the Input settings panel

  1. Given I am at random page
    features/step_definitions/common_steps.rb:1
  2. When I open ULS
    features/step_definitions/font_selection_steps.rb:17
  3. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
    unable to locate element, using {:id=>"input-panel-trigger", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
    ./features/step_definitions/panel_steps.rb:80:in `/^I switch to Input panel of language settings$/'
    features/settings_panel.feature:20:in `And I switch to Input panel of language settings'
    78
    79When(/^I switch to Input panel of language settings$/) do
    80	on(PanelPage).panel_side_input_element.click
    81end
  4. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  5. And in the language filter I type ml
    features/step_definitions/common_steps.rb:33
  6. And I click on the link to select Malayalam
    features/step_definitions/live_preview_of_display_language_steps.rb:17
  7. Then I should see the How to use link near the Malayalam transliteration item
    features/step_definitions/cog_sidebar_user_steps.rb:104
features/settings_panel.feature:26

Scenario: More languages (input language selection)

  1. Given I am at random page
    features/step_definitions/common_steps.rb:1
  2. When I open ULS
    features/step_definitions/font_selection_steps.rb:17
  3. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
    unable to locate element, using {:id=>"input-panel-trigger", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
    ./features/step_definitions/panel_steps.rb:80:in `/^I switch to Input panel of language settings$/'
    features/settings_panel.feature:29:in `And I switch to Input panel of language settings'
    78
    79When(/^I switch to Input panel of language settings$/) do
    80	on(PanelPage).panel_side_input_element.click
    81end
  4. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  5. Then I see Worldwide
    features/step_definitions/cog_sidebar_user_steps.rb:87
  6. And I see Language Search
    features/step_definitions/cog_sidebar_user_steps.rb:67
  7. And I can navigate back to Input Settings
    features/step_definitions/cog_sidebar_user_steps.rb:36
@loginfeatures/settings_panel.feature:36

Scenario: More languages (interface language selection)

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. When I open "Language" panel of language settings
    features/settings_panel.feature:38
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  3. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  4. Then I see Common Languages
    features/step_definitions/cog_sidebar_user_steps.rb:63
  5. And I see Worldwide
    features/step_definitions/cog_sidebar_user_steps.rb:87
  6. And I see Language Search
    features/step_definitions/cog_sidebar_user_steps.rb:67
  7. And I can navigate back to Language Settings
    features/step_definitions/cog_sidebar_user_steps.rb:43
@loginfeatures/settings_panel.feature:46

Scenario: Temporary live preview for menu language

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. When I open "Language" panel of language settings
    features/settings_panel.feature:49
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  3. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  4. And I use the panel to change my interface language to "German"
    features/step_definitions/panel_steps.rb:66
  5. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
  6. And I click X
    features/step_definitions/common_steps.rb:41
  7. And I open "Language" panel of language settings
    features/settings_panel.feature:54
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  8. Then the panel is in English
    features/step_definitions/panel_steps.rb:75
features/settings_panel.feature:57

Scenario: The name of site content language is correct when translation language is different This feature is a bit hard to test. In most cases content language matches the language of translation. In addition this only applies to anonymous users in wikis where language changing for anonymous users is disabled. So to test this we create a somewhat artificial test case by setting the wiki interface language to a non-default value.

  1. Given I temporarily use "Finnish" as the interface language
    features/step_definitions/common_steps.rb:19
  2. When I open "Language" panel of language settings
    features/settings_panel.feature:66
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  3. Then I see "English (sama kuin sisällön)" as the name of the content language
    features/step_definitions/panel_steps.rb:1
@loginfeatures/settings_panel.feature:70

Scenario: Selecting language via [...] button

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. And I have reset my preferences
    features/step_definitions/textarea_font_steps.rb:1
  3. When I open "Language" panel of language settings
    features/settings_panel.feature:74
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  4. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  5. And I use the panel to change my interface language to "German"
    features/step_definitions/panel_steps.rb:66
  6. And I apply the changes
    features/step_definitions/panel_steps.rb:35
  7. Then my interface language is "German"
    features/step_definitions/common_steps.rb:24
@commons.wikimedia.beta.wmflabs.org @loginfeatures/settings_panel.feature:81

Scenario: Regression test for bug 56913

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. And I have reset my preferences
    features/step_definitions/textarea_font_steps.rb:1
  3. When I open the Universal Language Selector
    features/step_definitions/panel_steps.rb:5
  4. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
    unable to locate element, using {:id=>"input-panel-trigger", :tag_name=>"div"} (Watir::Exception::UnknownObjectException)
    ./features/step_definitions/panel_steps.rb:80:in `/^I switch to Input panel of language settings$/'
    features/settings_panel.feature:86:in `And I switch to Input panel of language settings'
    78
    79When(/^I switch to Input panel of language settings$/) do
    80	on(PanelPage).panel_side_input_element.click
    81end
  5. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  6. And I use the panel to change my input language to "Finnish"
    features/step_definitions/panel_steps.rb:66
  7. And I close the panel to discard the changes
    features/step_definitions/panel_steps.rb:31
  8. And I switch to Input panel of language settings
    features/step_definitions/panel_steps.rb:79
  9. Then I should see English as the selected input language
    features/step_definitions/panel_steps.rb:87
@login

Feature: Font preferences respected in different languages


If a user has an edit font preferences respect that preference.
If a user has no edit font preference, but the UI language has a monospace defined,
the edit area has monospace font, given there is no ULS webfont preference for the user.
If a user has no edit font preference, but the UI language has no monospace defined,
the edit area has the font according to the ULS webfont preferences.

Background

  1. Given I am logged in
    features/step_definitions/common_steps.rb:8
  2. And I have reset my preferences
    features/step_definitions/textarea_font_steps.rb:1
@commons.wikimedia.beta.wmflabs.orgfeatures/textarea_font.feature:15

Scenario: Edit area fonts should not change on UI language change if the user preferences for edit area font are set

  1. When I set the editing fonts to "monospace"
    features/step_definitions/textarea_font_steps.rb:5
  2. And I set "Hindi" as the interface language
    features/step_definitions/common_steps.rb:12
  3. And I start editing a page
    features/step_definitions/textarea_font_steps.rb:13
  4. Then I should see the edit area text being displayed using "monospace" font
    features/step_definitions/textarea_font_steps.rb:25
features/textarea_font.feature:28

Scenario: Edit area should use the ULS selected fonts when content language has a ULS font selection

  1. When I open "Language" panel of language settings
    features/textarea_font.feature:29
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  2. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  3. And I use the panel to change my interface language to "German"
    features/step_definitions/panel_steps.rb:66
  4. And I open "Fonts" panel of language settings
    features/textarea_font.feature:32
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  5. And I select "OpenDyslexic" font for the content language for the live preview
    features/step_definitions/panel_steps.rb:27
  6. And I apply the changes
    features/step_definitions/panel_steps.rb:35
  7. And I start editing a page
    features/step_definitions/textarea_font_steps.rb:13
  8. Then I should see the edit area text being displayed using "OpenDyslexic" font
    features/step_definitions/textarea_font_steps.rb:25
features/textarea_font.feature:38

Scenario: Edit area should use the system default fonts when content language does not have any ULS font selection

  1. When I open "Language" panel of language settings
    features/textarea_font.feature:39
    When(/^I open "(.*?)" panel of language settings$/) do |arg1|
      pending # express the regexp above with the code you wish you had
    end
  2. And I click the button with the ellipsis
    features/step_definitions/common_steps.rb:29
  3. And I use the panel to change my interface language to "German"
    features/step_definitions/panel_steps.rb:66
  4. And I apply the changes
    features/step_definitions/panel_steps.rb:35
  5. And I start editing a page
    features/step_definitions/textarea_font_steps.rb:13
  6. Then I should see the edit area text being displayed using "monospace" font
    features/step_definitions/textarea_font_steps.rb:25