diff --git a/tests/browser/features/ime.feature b/tests/browser/features/ime.feature index d8541567..c44cd60b 100644 --- a/tests/browser/features/ime.feature +++ b/tests/browser/features/ime.feature @@ -26,7 +26,6 @@ input method. And I should see a list of available input methods And I should see a list of suggested languages - @commons.wikimedia.beta.wmflabs.org Scenario: Unsupported input language User visits a wiki with content language that does not have have an input @@ -36,6 +35,7 @@ input method. When I open the input method menu Then I should see input methods for Kotava + @commons.wikimedia.beta.wmflabs.org Scenario: Sticky input methods Chosen input method selection persists across page loads. diff --git a/tests/browser/features/step_definitions/ime_steps.rb b/tests/browser/features/step_definitions/ime_steps.rb index 10cc7928..5ea62815 100644 --- a/tests/browser/features/step_definitions/ime_steps.rb +++ b/tests/browser/features/step_definitions/ime_steps.rb @@ -16,9 +16,7 @@ end When(/^I open the input method menu$/) do step 'I click on an input box' - pending('Bug in ULS with unsupported languages like avk') do - on(IMEPage).input_method_element.when_present.click - end + on(IMEPage).input_method_element.when_present.click end Then(/^I should see the input method indicator$/) do @@ -38,7 +36,7 @@ Then(/^I should see a list of suggested languages$/) do end When(/^I choose (.+?) as the input language$/) do |language| - on(RandomPage) do |page| + on(IMEPage) do |page| page.more_languages page.language_filter = language # firefox only works with :return @@ -49,11 +47,11 @@ When(/^I choose (.+?) as the input language$/) do |language| end When(/^I click on the Malayalam InScript 2 menu item$/) do - on(RandomPage).uls_malayalam_inscript2_item_element.click + on(IMEPage).malayalam_inscript2_element.click end -When(/^I press Control\-M$/) do - on(RandomPage).search_input_element.send_keys [:control, 'm'] +When(/^I press Control-M$/) do + on(IMEPage).search_input_element.send_keys [:control, 'm'] end When(/^I go to another random page$/) do @@ -62,7 +60,7 @@ end Then(/^in it there must be an element with Malayalam text$/) do # 'input_method_enabled' alone only returns [] - on(RandomPage).input_method_enabled_element.text.should == 'ഇൻസ്ക്രിപ്റ്റ് 2' + on(IMEPage).input_method_enabled_element.text.should == 'ഇൻസ്ക്രിപ്റ്റ് 2' end When(/^I visit page in Vector skin$/) do diff --git a/tests/browser/features/support/pages/ime_page.rb b/tests/browser/features/support/pages/ime_page.rb index be34e23f..e0619f9c 100644 --- a/tests/browser/features/support/pages/ime_page.rb +++ b/tests/browser/features/support/pages/ime_page.rb @@ -2,8 +2,12 @@ class IMEPage include PageObject div(:input_method, class: 'imeselector imeselector-toggle') + a(:input_method_enabled, class: 'ime-name imeselector-toggle') h3(:input_method_ime_list_title, class: 'ime-list-title') ul(:input_method_language_list, class: 'ime-language-list') div(:input_method_selector_menu, class: 'imeselector-menu') + text_field(:language_filter, id: 'languagefilter') + li(:malayalam_inscript2, data_ime_inputmethod: 'ml-inscript2') + a(:more_languages, class: 'ime-selector-more-languages') text_field(:search_input, id: 'searchInput') end diff --git a/tests/browser/features/support/pages/random_page.rb b/tests/browser/features/support/pages/random_page.rb index edc81811..c6c1ace5 100644 --- a/tests/browser/features/support/pages/random_page.rb +++ b/tests/browser/features/support/pages/random_page.rb @@ -8,14 +8,10 @@ class RandomPage a(:create_a_book, text: 'Create a book') a(:download_as_pdf, text: 'Download as PDF') a(:download_the_file, text: 'Download the file') - a(:input_method_enabled, class: 'ime-name imeselector-toggle') - text_field(:language_filter, id: 'languagefilter') li(:main_page, id: 'n-mainpage-description') a(:malayalam_link, title: 'Malayalam') - a(:more_languages, class: 'ime-selector-more-languages') a(:print_export, text: 'Print/export') a(:printable_version, text: 'Printable version') - li(:uls_malayalam_inscript2_item, data_ime_inputmethod: 'ml-inscript2') button(:search_button, id: 'searchButton') a(:uls_trigger, class: 'uls-trigger') end