summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-08-31 05:26:07 +0000
committerintrigeri <intrigeri@boum.org>2019-08-31 05:31:45 +0000
commit06d9b3b3645dae440157a511881664b71927f469 (patch)
tree8977f59b49bf7d109178129f5c0ff9aab958e5bb
parentaf6c70758862c1460d75069d677d601b5ca74bd7 (diff)
Test suite: make the "I set an administration password" step more robust.test/16281-misc+force-all-tests
On the devel branch, I've seen this failure mode: the first char of the admin password is lost because we typed it before the corresponding text field was displayed and focused. According to the debug log, we started typing the admin password 170 ms after clicking TailsGreeterAdminPassword.png, so it's not very surprising that occasionally we "win" this race against the Greeter. Let's at least wait for the "Administration Password" dialog to be visible on the screen before we interact with it.
-rw-r--r--features/images/TailsGreeterAdminPasswordDialog.pngbin0 -> 6440 bytes
-rw-r--r--features/step_definitions/common_steps.rb1
2 files changed, 1 insertions, 0 deletions
diff --git a/features/images/TailsGreeterAdminPasswordDialog.png b/features/images/TailsGreeterAdminPasswordDialog.png
new file mode 100644
index 0000000..4944f40
--- /dev/null
+++ b/features/images/TailsGreeterAdminPasswordDialog.png
Binary files differ
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 35704f5..2a6a7f3 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -294,6 +294,7 @@ end
Given /^I set an administration password$/ do
open_greeter_additional_settings()
@screen.wait_and_click("TailsGreeterAdminPassword.png", 20)
+ @screen.wait("TailsGreeterAdminPasswordDialog.png", 10)
@screen.type(@sudo_password)
@screen.type(Sikuli::Key.TAB)
@screen.type(@sudo_password)