Refactor two live preview scenarios

Change-Id: I8e0dc62e24f9f86232af6b68dc4809e858aa2367
This commit is contained in:
Niklas Laxström
2013-12-04 11:59:43 +02:00
parent d7d43e1dbb
commit cdb21c9c49
4 changed files with 16 additions and 13 deletions

View File

@@ -27,20 +27,12 @@ Given(/^I navigate to the Language Settings panel$/) do
step "I see the logged in language settings panel"
end
When(/^I click Cancel$/) do
on(PanelPage).panel_button_cancel_element.click
end
When(/^I click the cog icon by Languages in the sidebar$/) do
on(NoInterlanguagePage).cog_element.when_present.click
# Wait for the panel to open
on(PanelPage).panel_display_element.when_visible
end
When(/^I click X$/) do
on(InterlanguagePage).x_element.click
end
Then(/^I can navigate back to Input Settings$/) do
on(InterlanguagePage) do |page|
page.back_to_input

View File

@@ -33,3 +33,11 @@ end
When(/^in the language filter I type (.+)$/) do |language_abbreviation|
on(IMEPage).language_filter = language_abbreviation
end
When(/^I click Cancel$/) do
on(PanelPage).panel_button_cancel_element.click
end
When(/^I click X$/) do
on(InterlanguagePage).x_element.click
end