From a5f1be5879c2160a5071e460e557acd4a007d87a Mon Sep 17 00:00:00 2001 From: Zaoliang Luo Date: Thu, 3 Aug 2023 10:06:48 +0200 Subject: [PATCH] Fix issue with click_lastmatch for test_results of openqa I found out why the test failed. sendkey 'end' is wrong because the next needle match doesn't work reliable because the running test is covered a little bit. So change scroll page direction can help and add timeout as well. See https://progress.opensuse.org/issues/133718 --- tests/openqa/webui/test_results.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/openqa/webui/test_results.pm b/tests/openqa/webui/test_results.pm index 50cfe99b2249..54b1b2cab996 100644 --- a/tests/openqa/webui/test_results.pm +++ b/tests/openqa/webui/test_results.pm @@ -11,7 +11,6 @@ use warnings; use base "x11test"; use testapi; - my $tutorial_disabled; sub upload_autoinst_log { @@ -49,9 +48,9 @@ sub run { # At this point the openQA job might still be running or already finished. # Ensure to show finished results at the bottom of the screen whenever the # page finished loading - send_key_until_needlematch 'openqa-job-minimalx', 'end'; + send_key_until_needlematch 'openqa-job-minimalx', 'up'; click_lastmatch; - assert_and_click 'openqa-job-details'; + assert_and_click('openqa-job-details', timeout => 60); assert_screen 'openqa-testresult', 600; }