Wait for 'Build Now' link visibility before clicking #2589
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Jenkins core race condition fix hides the 'Build Now' button (display: none) until JavaScript loads. This caused ATH tests to time out because clickLink('Build Now') couldn't find the hidden element.
This fix adds
waitFor(by.link('Build Now'))before clicking, which polls until the element is visible (with ATH's default 120s timeout).Fixes timeouts in:
Testing done
The fix was tested by reviewing the CI failure logs which showed all 3 tests failing at
Job.scheduleBuild(Job.java:368)when callingclickLink("Build Now"). The tests timed out after 120 seconds waiting for an element that was hidden.The
waitFor(by.link("Build Now"))method polls until the element becomes visible, using ATH's existing wait infrastructure. This is the same pattern already used elsewhere in the codebase (e.g., the notification-bar wait on the following line).Related upstream change: jenkinsci/jenkins#26124 (Jenkins core race condition fix)
Submitter checklist
Desired revierwe
@timja @mawinter69 @MarkEWaite