Search in sources :

Example 1 with PropertiesDataSeries

use of org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries in project acceptance-test-harness by jenkinsci.

the class PlotPluginPropertiesTest method generate_simple_plot_properties.

@Test
public void generate_simple_plot_properties() {
    job.configure();
    job.copyResource(propertiesFilePath);
    PlotPublisher pub = job.addPublisher(PlotPublisher.class);
    Plot plot = pub.getPlot(1);
    plot.setGroup("Group_1");
    plot.setTitle("PropertiesPlot1");
    PropertiesDataSeries pSeries = plot.addDataSeries(PropertiesDataSeries.class, propertiesFileName);
    pSeries.setLabel("propLabel");
    job.save();
    job.startBuild().shouldSucceed();
    job.visit("plot");
    find(by.xpath("//h1[contains(text(), '%s')]", "Group_1"));
    find(by.xpath("//select[@name='choice']/option[contains(text(), '%s')]", "PropertiesPlot1"));
}
Also used : PropertiesDataSeries(org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries) PlotPublisher(org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher) Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 2 with PropertiesDataSeries

use of org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries in project acceptance-test-harness by jenkinsci.

the class PlotPluginPropertiesTest method test_clickable_data_points.

@Test
public void test_clickable_data_points() throws IOException {
    job.configure();
    job.copyResource(propertiesFilePath);
    PlotPublisher pub = job.addPublisher(PlotPublisher.class);
    final Resource res = resource(propertiesFilePath);
    Properties prop = new Properties();
    prop.load(res.asInputStream());
    Plot plot = pub.getPlot(1);
    plot.setGroup("Group_1");
    plot.setTitle("PropertiesPlot1");
    PropertiesDataSeries pSeries = plot.addDataSeries(PropertiesDataSeries.class, propertiesFileName);
    job.save();
    job.startBuild().shouldSucceed();
    job.visit("plot");
    find(by.xpath("//map/area[contains(@title, '%s')]", prop.getProperty("YVALUE")));
    find(by.xpath("//map/area[contains(@href, '%s')]", prop.getProperty("URL")));
}
Also used : PropertiesDataSeries(org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries) PlotPublisher(org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher) Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) Resource(org.jenkinsci.test.acceptance.junit.Resource) Properties(java.util.Properties) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)2 Plot (org.jenkinsci.test.acceptance.plugins.plot.Plot)2 PlotPublisher (org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher)2 PropertiesDataSeries (org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries)2 Test (org.junit.Test)2 Properties (java.util.Properties)1 Resource (org.jenkinsci.test.acceptance.junit.Resource)1