Skip to content

Commit

Permalink
Forward compatibility for use Jenkins modal for 'Apply' button failur…
Browse files Browse the repository at this point in the history
…es (#1446)
  • Loading branch information
timja committed Dec 17, 2023
1 parent 39f10d9 commit 81b784f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/test/java/core/FreestyleJobTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,24 @@ public void showErrorSavingConfig() {
By error = by.css(errorElementCSS);

assertThat(waitFor(error).getText(), containsString("Invalid input: \"not_a_time\""));
clickLink("Close");
closeDialog();

j.configure();
j.addTrigger(TimerTrigger.class);
trigger.spec.set("not_a_time_either");
clickButton("Apply");

assertThat(waitFor(error).getText(), containsString("Invalid input: \"not_a_time_either\""));
clickLink("Close");
closeDialog();
}

private void closeDialog() {
try {
clickButton("Close");
} catch (NoSuchElementException x) {
// before https://github.com/jenkinsci/jenkins/pull/8394
clickLink("Close");
}
}

@Test
Expand Down
1 change: 1 addition & 0 deletions src/test/java/plugins/ScriptSecurityPluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void scriptNeedsApproval() throws Exception {

@Test
@WithPlugins("groovy-postbuild")
@Ignore("https://github.com/jenkinsci/acceptance-test-harness/issues/1444")
public void signatureNeedsApproval() throws Exception {
final FreeStyleJob job = createFailedJobWithGroovyPostBuild("def h = java.lang.System.getProperties()", true);
login(ADMIN);
Expand Down

0 comments on commit 81b784f

Please sign in to comment.