use of org.jenkinsci.test.acceptance.po.Job in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateJobWithBranch.
private Job generateJobWithBranch(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job).branch("recovery");
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.po.Job in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateSimpleJob.
private Job generateSimpleJob(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job);
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.po.Job in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateJobWithLocalDir.
private Job generateJobWithLocalDir(GIT_IMPL type) {
Job job = generateJob(type);
GitScm scm = generateSCM(job).localDir("local_dir");
useJGitIfNeccesary(type, scm);
return job;
}
use of org.jenkinsci.test.acceptance.po.Job in project acceptance-test-harness by jenkinsci.
the class GitPluginNoDockerTest method generateJob.
private Job generateJob(GIT_IMPL type) {
if (type.equals(GIT_IMPL.JGIT)) {
JGitInstallation.addJGit(jenkins);
find(by.button("Save")).click();
}
Job job = jenkins.jobs.create();
return job;
}
use of org.jenkinsci.test.acceptance.po.Job in project acceptance-test-harness by jenkinsci.
the class JobDslPluginTest method should_create_new_job_by_using_template.
/**
* Tests whether a new job with template created by JobDsl exists and includes
* same description like the template job when the seed job is build.
*/
@Test
public void should_create_new_job_by_using_template() {
// Arrange
String testedJobName = "MyJob";
String jobDescription = "My sample despription";
Job templateJob = jenkins.jobs.create(FreeStyleJob.class, "Template");
templateJob.configure();
Control descriptionControl = templateJob.control(by.name("description"));
descriptionControl.set(jobDescription);
templateJob.save();
String jobDslScript = String.format("job('%s') { using('%s') }", testedJobName, templateJob.name);
Job seed = createSeedJobWithJobDsl(jobDslScript);
// Act
seed.scheduleBuild().shouldSucceed();
// Assert
Job job = jenkins.jobs.get(Job.class, testedJobName);
job.open();
assertThat(job.getDescription(), containsString(jobDescription));
}
Aggregations