Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward compatibility with core version 2.422+ #179

Merged
merged 1 commit into from
Oct 16, 2023
Merged
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
9 changes: 8 additions & 1 deletion src/test/java/hudson/matrix/AxisTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import static org.junit.Assume.assumeTrue;

import hudson.model.JDK;
import hudson.util.VersionNumber;
import jenkins.model.Jenkins;

import org.hamcrest.collection.IsEmptyCollection;
import org.junit.Before;
Expand Down Expand Up @@ -142,7 +144,12 @@ private HtmlForm addAxis(String axis) throws Exception {
HtmlPage page = wc.getPage(p, "configure");
HtmlForm form = page.getFormByName("config");
j.getButtonByCaption(form, "Add axis").click();
page.getAnchorByText(axis).click();
if (Jenkins.getVersion().isOlderThan(new VersionNumber("2.422"))) {
page.getAnchorByText(axis).click();
} else {
HtmlForm config = page.getFormByName("config");
j.getButtonByCaption(config, axis).click();
}
waitForInput(form);
return form;
}
Expand Down
Loading