Cmcmahon has submitted this change and it was merged.
Change subject: Add a test to check the appearance of the IME menu
......................................................................
Add a test to check the appearance of the IME menu
This is my first Cucumber Ruby code. It's probably naive,
but it seems to work. I'd love to hear your comments.
CM: using Amir's approach removes a deprecation warning
Use be_visible instead
Change-Id: Ib3c1bd0e8a296d6be6fbad4a2e1f35666d471e11
---
M features/step_definitions/uls_ime_steps.rb
M features/support/pages/random_page.rb
M features/uls_ime.feature
3 files changed, 16 insertions(+), 1 deletion(-)
Approvals:
Cmcmahon: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/features/step_definitions/uls_ime_steps.rb
b/features/step_definitions/uls_ime_steps.rb
index a5fdb5d..3f09d8b 100644
--- a/features/step_definitions/uls_ime_steps.rb
+++ b/features/step_definitions/uls_ime_steps.rb
@@ -2,6 +2,14 @@
on(RandomPage).search_input_element.click
end
+When(/^I click on the IME keyboard icon$/) do
+ on(RandomPage).input_method_element.click
+end
+
Then(/^I should see the input method keyboard icon at the bottom right$/) do
- on(RandomPage).input_method_element.attribute_value('style').should match
/display: block/i
+ on(RandomPage).input_method_element.should be_visible
+end
+
+Then(/^I should see the dropdown menu with the a list of keymaps$/) do
+ on(RandomPage).input_method_selector_menu_element.should be_visible
end
diff --git a/features/support/pages/random_page.rb
b/features/support/pages/random_page.rb
index 4f97b45..88a1a53 100644
--- a/features/support/pages/random_page.rb
+++ b/features/support/pages/random_page.rb
@@ -16,4 +16,5 @@
text_field(:search_input, id: 'searchInput')
button(:search_button, id: 'searchButton')
div(:input_method, class: 'imeselector imeselector-toggle')
+ div(:input_method_selector_menu, class: 'imeselector-menu')
end
diff --git a/features/uls_ime.feature b/features/uls_ime.feature
index c3d5b3e..4c87ce3 100644
--- a/features/uls_ime.feature
+++ b/features/uls_ime.feature
@@ -5,3 +5,9 @@
Given I am at random page
When I click on an input box
Then I should see the input method keyboard icon at the bottom right
+
+ Scenario: User can see dropdown menu when they click on the IME icon
+ Given I am at random page
+ When I click on an input box
+ And I click on the IME keyboard icon
+ Then I should see the dropdown menu with the a list of keymaps
--
To view, visit https://gerrit.wikimedia.org/r/68934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3c1bd0e8a296d6be6fbad4a2e1f35666d471e11
Gerrit-PatchSet: 4
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Arrbee <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits