Wait for screen change in desktop_terminal before typing pw

Sigh I hate this test. We seem to be typing root pw before the
terminal is ready for us:
https://openqa.fedoraproject.org/tests/745007#step/desktop_terminal/3
Let's try this. Hopefully it'll wait for the Password: prompt
before typing, without us having to actually add a needle...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-12-21 09:27:39 -08:00
parent fba4a82587
commit e7853a56a8

View File

@ -11,7 +11,7 @@ sub run {
wait_still_screen 5; wait_still_screen 5;
# need to be root # need to be root
my $rootpass = get_var("ROOT_PASSWORD", "weakpassword"); my $rootpass = get_var("ROOT_PASSWORD", "weakpassword");
type_string "su\n", 20; wait_screen_change { type_string "su\n", 20; };
wait_still_screen 3; wait_still_screen 3;
# can't use type_safely for now as current implementation relies # can't use type_safely for now as current implementation relies
# on screen change checks, and there is no screen change here # on screen change checks, and there is no screen change here