Skip to content
Open
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
2 changes: 2 additions & 0 deletions src/main/java/org/jenkinsci/test/acceptance/po/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ public Build scheduleBuild(Map<String, ?> params) {
open();
int nb = getJson().get("nextBuildNumber").intValue();
if (parameters.isEmpty()) {
// Wait for "Build Now" link to become visible (JS shows it after page load)
waitFor(by.link("Build Now"));
Comment on lines +365 to +366
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this fixes the issue, as this is looking for a a element with the text Build Now and IIUC the upstream change does not change that.
In essence I think this is just wasting some CPU such that the timing changes enough that clicking the link works.

Additionally if you do need to wait and then interact with the thing you waited for then use the WebElement returned by waitFor

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that this would work, please test this in your PR in the jenkins repository using an incremental build when the tests here pass

clickLink("Build Now");
// the notification bar can place itslef over other elements
// so wait for it to be added and then disappear
Expand Down