Make more tests pass in sandbox.translatewiki.net

* When ULS is in personal, cancel opens the language selector
  again but apply doesn't.
* Created separate steps for testing the ULS trigger in personal
  position, different behavior with different configuration.

Change-Id: Ifb7f101f2bfacd32c11cba69e7f2c01fe9bd9bb7
This commit is contained in:
Niklas Laxström
2013-09-03 12:13:41 +03:00
parent 172c184615
commit bcb2dd8b82
6 changed files with 40 additions and 8 deletions

View File

@@ -43,7 +43,13 @@ When(/^I select "(.*?)" font for the (.*?) language for the live preview$/) do |
end
When(/^I close the panel to discard the changes$/) do
on(ULSPage).panel_button_close_element.click
on(ULSPage) do |page|
page.panel_button_close_element.click
# Also close the ULS language selection if open
if uls_position() == 'personal'
page.uls_button_close_element.when_visible.click
end
end
end
Then(/^the active (.*?) font must be the same as font prior to the preview$/) do |type|

View File

@@ -2,6 +2,6 @@ When(/^I click language selector trigger element$/) do
on(RandomPage).uls_trigger
end
Then(/^I should see the Language selector$/) do
on(RandomPage).language_settings_dialog_element.should be_visible
Then(/^I should see the language selector$/) do
on(ULSPage).uls_element.should be_visible
end