Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions qa/t/lib/QA/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,21 @@ sub go_to_bug {
$sel->click_ok('action-menu-btn', 'Expand action menu');
$sel->click_ok('action-expand-all', 'Expand all modal panels');

# Expanding uses a jQuery slide animation that sets overflow:hidden on the
# module content until it finishes. WebDriver treats the clipped fields as
# not displayed (get_text returns ''), so wait for the animation to end.
my $animating;
for (1 .. 50) {
$animating = $sel->driver->execute_script(
'return window.jQuery ? jQuery(":animated").length : 0');
last unless $animating;
select(undef, undef, undef, 0.1);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we hit the 5 second cap the loop falls through silently and the test fails later with a confusing empty get_text. Could we emit a diag (or ok(0, ...)) when the animation never finishes so the failure points here?

if ($animating) {
ok(0, 'Module expand animation finished within 5s');
diag("$animating element(s) still animating; later get_text calls may return ''");
}

# Remove the blue New Changes link because the sticky banner causes a click interception issue in
# Selenium that cannot be reproduced in real browser environments
$sel->driver->execute_script('document.querySelector(\'.new-changes-link\')?.remove();');
Expand Down
Loading