Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/72365
Change subject: WIP: Trying to write a test for bug 50790 ...................................................................... WIP: Trying to write a test for bug 50790 It's just a draft, and it doesn't really run yet. Possible issues: * The scenario may be too long, but I'm not sure how to break it up. * I don't know how to wait until the page reloads. * May the element definitions in random_page.rb should be reused. Change-Id: I94bd779577251d51a20471a6a39ab1ee6cd6927e --- M features/step_definitions/uls_ime_steps.rb M features/support/pages/random_page.rb M features/uls_ime.feature 3 files changed, 49 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/65/72365/1 diff --git a/features/step_definitions/uls_ime_steps.rb b/features/step_definitions/uls_ime_steps.rb index 3068ae5..5265f0b 100644 --- a/features/step_definitions/uls_ime_steps.rb +++ b/features/step_definitions/uls_ime_steps.rb @@ -6,6 +6,30 @@ on(RandomPage).input_method_element.click end +When(/^I click on the ellipsis at the bottom of the list$/) do + on(RandomPage).uls_more_languages_element.click +end + +When(/^I click on the language filter$/) do + on(RandomPage).uls_languagefilter_element.click +end + +#When(/^I type '(.+)'$/) do |write_text| +# TYPE write_text +#end + +When(/^I click on the link to select Malayalam$/) do + on(RandomPage).uls_malayalam_link_element.click +end + +#When(/^I press Ctrl-M$/) do +# SIMULATE KEY PRESS +#end + +When(/^I go to another random page$/) do + on(RandomPage).random_page_sidebar_item_element.click +end + Then(/^I should see the input method keyboard icon at the bottom right$/) do on(RandomPage).input_method_element.should be_visible end @@ -17,3 +41,7 @@ Then(/^I should see names of languages in it$/) do on(RandomPage).input_method_language_list_element.should be_visible end + +#Then(/^in the input method keyboard icon there must be an element that says 'ഇൻസ്ക്രിപ്റ്റ് 2'$/) do +# CHECK THAT THE TEXT IS THERE +#end diff --git a/features/support/pages/random_page.rb b/features/support/pages/random_page.rb index 7e8b030..221b55f 100644 --- a/features/support/pages/random_page.rb +++ b/features/support/pages/random_page.rb @@ -18,4 +18,9 @@ button(:search_button, id: 'searchButton') text_field(:search_input, id: 'searchInput') a(:uls_trigger, class: 'uls-trigger') + a(:uls_more_languages, class: 'ime-selector-more-languages') + input(:uls_languagefilter, id: 'languagefilter') + li(:uls_malayalam_link, lang: 'ml') + li(:uls_malayalam_inscript2_item, data-ime-inputmethod: 'ml-inscript2') + li(:random_page_sidebar_item, id: 'n-randompage') end diff --git a/features/uls_ime.feature b/features/uls_ime.feature index 205d11b..ef17984 100644 --- a/features/uls_ime.feature +++ b/features/uls_ime.feature @@ -12,3 +12,19 @@ And I click on the IME keyboard icon Then I should see the dropdown menu with a list of keymaps And I should see names of languages in it + + Scenario: Input method is preserved after going to a different page + Given I am at random page + When I click on an input box + And I click on the IME keyboard icon + And I click on the ellipsis at the bottom of the list + And I click on the language filter + And I type 'ml' + And I click on the link to select Malayalam + And I click on the IME keyboard icon + And I press Control-M + And I go to another random page + And I click on an input box + And I press Control-M + Then I should see the input method keyboard icon at the bottom right + And in it there must be an element that says 'ഇൻസ്ക്രിപ്റ്റ് 2' -- To view, visit https://gerrit.wikimedia.org/r/72365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94bd779577251d51a20471a6a39ab1ee6cd6927e Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits