From f0e94efb16b34ddd520166e9138afed860da34f3 Mon Sep 17 00:00:00 2001 From: Marius Kittler Date: Wed, 31 Jul 2024 16:05:30 +0200 Subject: [PATCH] Fix sporadic failures in test of candidates menu `wait_for_ajax_and_animations` does not fully cover the asynchronous behaviors of the code and also doesn't help with animations. (The relevant animation is already globally disabled via `$.fx.off = true;` but this does not mean code becomes synchronous.) With this change we simply wait for the element to show up instead. Related ticket: https://progress.opensuse.org/issues/164745 --- t/ui/18-tests-details.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/ui/18-tests-details.t b/t/ui/18-tests-details.t index 37f8daa79b5..d544728af6e 100644 --- a/t/ui/18-tests-details.t +++ b/t/ui/18-tests-details.t @@ -610,8 +610,7 @@ subtest 'test candidate list' => sub { \%expected_candidates, 'needles appear twice, each time under different tag'); $driver->get('/tests/99946#step/installer_timezone/1'); - wait_for_ajax_and_animations(msg => 'step preview'); - $driver->find_element_by_id('candidatesMenu')->click(); + wait_for_element(selector => '#candidatesMenu', is_displayed => 1)->click(); wait_for_element(selector => '#needlediff_selector .show-needle-info', is_displayed => 1)->click(); like( $driver->find_element('.needle-info-table')->get_text(),