diff options
author | Philip Hands <phil@hands.com> | 2016-05-26 23:52:59 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2016-05-29 19:06:07 +0200 |
commit | 4cedc6058bb274a582477c295117f0826e9fd9c3 (patch) | |
tree | 2ff8bf3dcb14aff9ab70b4b63c91358bc0df5ac0 /cucumber | |
parent | 7451e2071278ccc74d8459e637bcdfc0b54b2525 (diff) | |
download | jenkins.debian.net-4cedc6058bb274a582477c295117f0826e9fd9c3.tar.xz |
lvc: duplicate the waitAny to deal with race condition
Diffstat (limited to 'cucumber')
-rw-r--r-- | cucumber/features/step_definitions/common_steps.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index 6894b83f..c45459dd 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -306,6 +306,7 @@ end Given /^in ([a-z]*) mode I set the root password to "([^"]*)"$/ do |ui_mode, rootpw| # Root Password, twice on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword",ui_mode),diui_png("RootPassword",ui_mode)], 30 * PATIENCE) + on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword",ui_mode),diui_png("RootPassword",ui_mode)], 30 * PATIENCE) @screen.type(rootpw) if "gui" == ui_mode @screen.type(Sikuli::Key.TAB) @@ -324,6 +325,7 @@ Given /^in ([a-z]*) mode I set the password for "([^"]*)" to be "([^"]*)"$/ do | @screen.waitVanish(diui_png("NameOfUser",ui_mode), 10 * PATIENCE) @screen.type(Sikuli::Key.ENTER) on_screen, _ = @screen.waitAny([diui_png("ShowUserPassword",ui_mode),diui_png("UserPassword",ui_mode)], 10 * PATIENCE) + on_screen, _ = @screen.waitAny([diui_png("ShowUserPassword",ui_mode),diui_png("UserPassword",ui_mode)], 10 * PATIENCE) @screen.type(password) if "gui" == ui_mode @screen.type(Sikuli::Key.TAB) |