Search in sources :

Example 1 with StringParameter

use of org.jenkinsci.test.acceptance.po.StringParameter in project acceptance-test-harness by jenkinsci.

the class FreestyleJobTest method scheduleFromView.

@Test
public void scheduleFromView() throws Exception {
    FreeStyleJob j = jenkins.jobs.create(FreeStyleJob.class);
    ListView view = jenkins.views.create(ListView.class, "AView");
    view.configure();
    view.addJob(j);
    view.save();
    view.scheduleJob(j.name);
    j.build(1).waitUntilStarted().shouldSucceed();
    j.configure();
    StringParameter p = j.addParameter(StringParameter.class);
    p.setName("foo");
    j.save();
    view.scheduleJob(j.name);
    BuildWithParameters paramPage = new BuildWithParameters(j, new URL(driver.getCurrentUrl()));
    paramPage.enter(Collections.singletonList(p), Collections.singletonMap("foo", "bar"));
    paramPage.start();
    j.build(2).waitUntilStarted().shouldSucceed();
}
Also used : StringParameter(org.jenkinsci.test.acceptance.po.StringParameter) ListView(org.jenkinsci.test.acceptance.po.ListView) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) BuildWithParameters(org.jenkinsci.test.acceptance.po.BuildWithParameters) URL(java.net.URL) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) SmokeTest(org.jenkinsci.test.acceptance.junit.SmokeTest) Test(org.junit.Test)

Aggregations

URL (java.net.URL)1 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 SmokeTest (org.jenkinsci.test.acceptance.junit.SmokeTest)1 BuildWithParameters (org.jenkinsci.test.acceptance.po.BuildWithParameters)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 ListView (org.jenkinsci.test.acceptance.po.ListView)1 StringParameter (org.jenkinsci.test.acceptance.po.StringParameter)1 Test (org.junit.Test)1