use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory in project acceptance-test-harness by jenkinsci.
the class JobConfigHistoryPluginTest method show_difference_in_config_history.
@Test
public void show_difference_in_config_history() {
FreeStyleJob job = jenkins.jobs.create();
job.configure();
ShellBuildStep step = job.addShellStep(LS_COMMAND);
job.save();
job.configure();
step.command(LS_LH_COMMAND);
job.save();
JobConfigHistory action = job.action(JobConfigHistory.class);
action.open();
assertThat(driver, Matchers.hasContent(CREATED));
assertThat(driver, Matchers.hasContent("Changed"));
action.showLastChange();
assertThat(driver, Matchers.hasElement(by.xpath("//td[@class='diff_original' and contains(string(.), '" + String.format(COMMAND_NODE, LS_COMMAND) + "')]")));
assertThat(driver, Matchers.hasElement(by.xpath("//td[@class='diff_revised' and contains(string(.), '" + String.format(COMMAND_NODE, LS_LH_COMMAND) + "')]")));
}
use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory in project acceptance-test-harness by jenkinsci.
the class JobConfigHistoryPluginTest method track_change_in_matrix_project.
@Test
@Issue("JENKINS-24410")
@WithPlugins("matrix-project")
public void track_change_in_matrix_project() {
MatrixProject job = jenkins.jobs.create(MatrixProject.class);
JobConfigHistory history = job.action(JobConfigHistory.class);
List<Change> original = history.getChanges();
job.configure();
job.runSequentially.check();
job.save();
List<Change> newOnes = history.getChanges();
assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory in project acceptance-test-harness by jenkinsci.
the class PrioritySorterPluginTest method saving_global_config_should_not_create_job_change.
// Reproduce regression fixed in https://github.com/jenkinsci/priority-sorter-plugin/commit/e46b2b1fbc4396f441c69692eb328fb982325572
@Test
@WithPlugins("jobConfigHistory")
public void saving_global_config_should_not_create_job_change() {
FreeStyleJob job = jenkins.jobs.create();
job.save();
JobConfigHistory action = job.action(JobConfigHistory.class);
final int expected = action.getChanges().size();
final JenkinsConfig global = jenkins.getConfigPage();
global.configure();
global.numExecutors.set(42);
global.save();
assertThat(action.getChanges().size(), equalTo(expected));
}
use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory in project acceptance-test-harness by jenkinsci.
the class JobConfigHistoryPluginTest method track_change_in_maven_project.
@Test
@Issue("JENKINS-24410")
@WithPlugins("maven-plugin")
public void track_change_in_maven_project() {
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
JobConfigHistory history = job.action(JobConfigHistory.class);
List<Change> original = history.getChanges();
job.configure();
job.goals.set("clean");
job.save();
List<Change> newOnes = history.getChanges();
assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
Aggregations