Skip to content

Bug 2082654 - 2_test_flags2.t picks a component before the bug page has loaded the new product's components - #2788

Merged
dklawren merged 1 commit into
mozilla:masterfrom
Xzzz:bug-2082654
Oct 17, 2026
Merged

dklawren merged 1 commit into
mozilla:masterfrom
Xzzz:bug-2082654

Conversation

@Xzzz

@Xzzz Xzzz commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes an intermittent test_selenium_2 failure in qa/t/2_test_flags2.t, seen on #2785 and #2786.

On the bug page, changing the product disables the component select and reloads its options asynchronously (GET /rest/bug_modal/new_product/<bug_id>). The test selected the component right after the product, so depending on timing it got a stale element reference or a missing option (Set selected: c1).

Changes

  • qa/t/2_test_flags2.t: new change_product helper that selects the product, waits until the component select is enabled again and offers the wanted component, then selects it. Used for the two product changes on the bug page. The product changes on editflagtypes.cgi fill the list synchronously and are left as they are.
  • qa/t/lib/QA/Util.pm: wait_for_js (poll a script for up to 5 seconds) moved here from qa/t/2_test_autocomplete.t, so both tests share it.

Test-only change.

Test plan

  • 2_test_flags2.t and 2_test_autocomplete.t pass locally
  • test_selenium_2 passes in CI on the first run

References

@Xzzz
Xzzz requested a review from dklawren October 15, 2026 21:52

@dklawren dklawren left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM r=dkl

@dklawren
dklawren merged commit 3b77195 into mozilla:master Oct 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants