Amire80 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/68934


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.

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, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/34/68934/1

diff --git a/features/step_definitions/uls_ime_steps.rb 
b/features/step_definitions/uls_ime_steps.rb
index a5fdb5d..1747ee1 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
 end
+
+Then(/^I should see the dropdown menu with the a list of keymaps$/) do
+  on(RandomPage).input_method_selector_menu_element.style('display').should 
match /^block$/i
+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..8f60d22 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: ULS 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: newchange
Gerrit-Change-Id: Ib3c1bd0e8a296d6be6fbad4a2e1f35666d471e11
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to