Skip to content

Commit

Permalink
Click the "Rebuild" button to rebuild in the test
Browse files Browse the repository at this point in the history
jenkinsci/rebuild-plugin#155 uses the "Rebuild"
button to rebuild the job.  Use the same technique here.
  • Loading branch information
MarkEWaite committed Aug 28, 2024
1 parent 7def1af commit 43e7046
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ public void testRebuild() throws Exception {
Assert.assertEquals(b1.getNumber(), pbpv1.getRun().getNumber());

// rebuild it
FreeStyleBuild b3 = j.assertBuildStatusSuccess(p2.scheduleBuild2(0));
JenkinsRule.WebClient wc = j.createWebClient();
HtmlPage buildPage = wc.getPage(b2);
HtmlPage rebuildConfigPage = buildPage.getAnchorByText("Rebuild").click();
j.submit(rebuildConfigPage.getFormByName("config"));
j.waitUntilNoActivity();

// validate presence of parameter
FreeStyleBuild rebuild = p2.getLastBuild();
Expand Down

0 comments on commit 43e7046

Please sign in to comment.