use of org.jenkinsci.test.acceptance.plugins.maven.MavenBuild in project acceptance-test-harness by jenkinsci.
the class CompressArtifactsPluginTest method archiveMavenProject.
@Test
@Issue("JENKINS-27558")
@WithPlugins("maven-plugin")
public void archiveMavenProject() {
MavenInstallation.installSomeMaven(jenkins);
MavenModuleSet mp = jenkins.jobs.create(MavenModuleSet.class);
mp.configure();
mp.copyDir(resource("/maven_plugin/multimodule/"));
mp.goals.set("clean package -B -DskipTests=true");
mp.addPublisher(ArtifactArchiver.class).includes("module_a/**/*");
mp.save();
MavenBuild raw = mp.startBuild().shouldSucceed().as(MavenBuild.class);
CompressingArtifactManager.setup(jenkins);
MavenBuild compressed = mp.startBuild().shouldSucceed().as(MavenBuild.class);
compareArtifacts(raw, compressed);
compareArtifacts(raw.module("gid$root"), compressed.module("gid$root"));
compareArtifacts(raw.module("gid$module_a"), compressed.module("gid$module_a"));
compareArtifacts(raw.module("gid$module_b"), compressed.module("gid$module_b"));
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenBuild in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method assertHasModule.
private void assertHasModule(MavenModuleSet job, String name) {
assertThat(job.module(name), pageObjectExists());
MavenBuild build = job.getLastBuild();
assertThat(build.module(name), pageObjectExists());
job.visit("modules");
WebElement webElement = find(by.xpath("//a[@href='%s/']", name));
webElement.click();
// clicking a second time fixes it
if (!driver.getCurrentUrl().equals(job.module(name).url.toExternalForm())) {
webElement.click();
}
assertThat(driver.getCurrentUrl(), equalTo(job.module(name).url.toExternalForm()));
build.open();
find(by.xpath("//a[@href='%s/']", name)).click();
assertThat(driver.getCurrentUrl(), equalTo(build.module(name).url.toExternalForm()));
}
Aggregations