use of org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher 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"));
}
use of org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher 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")));
}
use of org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher in project acceptance-test-harness by jenkinsci.
the class PlotPluginXmlTest method setupFirstPlot.
private Plot setupFirstPlot() {
job.configure();
job.copyResource(resource("/plot_plugin/plot.xml"));
PlotPublisher pub = job.addPublisher(PlotPublisher.class);
Plot p1 = pub.getPlot(1);
p1.setGroup("G1");
p1.setTitle("XML plot");
p1.setStyle("Line");
XmlDataSeries xmlDataSeries1 = p1.addDataSeries(XmlDataSeries.class);
xmlDataSeries1.setFile("plot.xml");
xmlDataSeries1.setXpath("count(/books/book[price>35.00])");
xmlDataSeries1.setUrl("http://foo.bar");
xmlDataSeries1.selectResultTypNumber();
return p1;
}
Aggregations