Merge "Refactor Sticky input methods"
This commit is contained in:
@@ -26,7 +26,6 @@ input method.
|
|||||||
And I should see a list of available input methods
|
And I should see a list of available input methods
|
||||||
And I should see a list of suggested languages
|
And I should see a list of suggested languages
|
||||||
|
|
||||||
@commons.wikimedia.beta.wmflabs.org
|
|
||||||
Scenario: Unsupported input language
|
Scenario: Unsupported input language
|
||||||
|
|
||||||
User visits a wiki with content language that does not have have an input
|
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
|
When I open the input method menu
|
||||||
Then I should see input methods for Kotava
|
Then I should see input methods for Kotava
|
||||||
|
|
||||||
|
@commons.wikimedia.beta.wmflabs.org
|
||||||
Scenario: Sticky input methods
|
Scenario: Sticky input methods
|
||||||
|
|
||||||
Chosen input method selection persists across page loads.
|
Chosen input method selection persists across page loads.
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ end
|
|||||||
|
|
||||||
When(/^I open the input method menu$/) do
|
When(/^I open the input method menu$/) do
|
||||||
step 'I click on an input box'
|
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
|
||||||
on(IMEPage).input_method_element.when_present.click
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Then(/^I should see the input method indicator$/) do
|
Then(/^I should see the input method indicator$/) do
|
||||||
@@ -38,7 +36,7 @@ Then(/^I should see a list of suggested languages$/) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
When(/^I choose (.+?) as the input language$/) do |language|
|
When(/^I choose (.+?) as the input language$/) do |language|
|
||||||
on(RandomPage) do |page|
|
on(IMEPage) do |page|
|
||||||
page.more_languages
|
page.more_languages
|
||||||
page.language_filter = language
|
page.language_filter = language
|
||||||
# firefox only works with :return
|
# firefox only works with :return
|
||||||
@@ -49,11 +47,11 @@ When(/^I choose (.+?) as the input language$/) do |language|
|
|||||||
end
|
end
|
||||||
|
|
||||||
When(/^I click on the Malayalam InScript 2 menu item$/) do
|
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
|
end
|
||||||
|
|
||||||
When(/^I press Control\-M$/) do
|
When(/^I press Control-M$/) do
|
||||||
on(RandomPage).search_input_element.send_keys [:control, 'm']
|
on(IMEPage).search_input_element.send_keys [:control, 'm']
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I go to another random page$/) do
|
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
|
Then(/^in it there must be an element with Malayalam text$/) do
|
||||||
# 'input_method_enabled' alone only returns []
|
# '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
|
end
|
||||||
|
|
||||||
When(/^I visit page in Vector skin$/) do
|
When(/^I visit page in Vector skin$/) do
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ class IMEPage
|
|||||||
include PageObject
|
include PageObject
|
||||||
|
|
||||||
div(:input_method, class: 'imeselector imeselector-toggle')
|
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')
|
h3(:input_method_ime_list_title, class: 'ime-list-title')
|
||||||
ul(:input_method_language_list, class: 'ime-language-list')
|
ul(:input_method_language_list, class: 'ime-language-list')
|
||||||
div(:input_method_selector_menu, class: 'imeselector-menu')
|
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')
|
text_field(:search_input, id: 'searchInput')
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,14 +8,10 @@ class RandomPage
|
|||||||
a(:create_a_book, text: 'Create a book')
|
a(:create_a_book, text: 'Create a book')
|
||||||
a(:download_as_pdf, text: 'Download as PDF')
|
a(:download_as_pdf, text: 'Download as PDF')
|
||||||
a(:download_the_file, text: 'Download the file')
|
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')
|
li(:main_page, id: 'n-mainpage-description')
|
||||||
a(:malayalam_link, title: 'Malayalam')
|
a(:malayalam_link, title: 'Malayalam')
|
||||||
a(:more_languages, class: 'ime-selector-more-languages')
|
|
||||||
a(:print_export, text: 'Print/export')
|
a(:print_export, text: 'Print/export')
|
||||||
a(:printable_version, text: 'Printable version')
|
a(:printable_version, text: 'Printable version')
|
||||||
li(:uls_malayalam_inscript2_item, data_ime_inputmethod: 'ml-inscript2')
|
|
||||||
button(:search_button, id: 'searchButton')
|
button(:search_button, id: 'searchButton')
|
||||||
a(:uls_trigger, class: 'uls-trigger')
|
a(:uls_trigger, class: 'uls-trigger')
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user