Fix for IME menu integration tests

Make sure to click only when Input Method indicator is available.

Change-Id: Ieff61d74a8ea5b8bcb7aafdc94865dee4927dc97
This commit is contained in:
Kartik Mistry
2013-09-30 21:39:08 +05:30
parent b4f794f9fe
commit 2461d57220

View File

@@ -16,7 +16,7 @@ When(/^I click on an input box$/) do
end end
When(/^I click on the input method indicator$/) do When(/^I click on the input method indicator$/) do
on(RandomPage).input_method_element.click on(RandomPage).input_method_element.when_present.click
end end
When(/^I open the input method menu$/) do When(/^I open the input method menu$/) do
@@ -28,7 +28,7 @@ When(/^I open the input method menu$/) do
end end
Then(/^I should see the input method indicator$/) do Then(/^I should see the input method indicator$/) do
on(RandomPage).input_method_element.should be_visible on(RandomPage).input_method_element.when_present.should be_visible
end end
Then(/^I should see input methods for (.+)/) do |language| Then(/^I should see input methods for (.+)/) do |language|