@Test public void getRenderedContentByStepFilterTest() throws CluecumberPluginException { Template template = mock(Template.class); AllScenariosPageCollection allScenariosPageCollection = new AllScenariosPageCollection(""); Step step = new Step(); step.setName("test"); Match match = new Match(); match.setLocation("myLocation"); step.setMatch(match); Report report = new Report(); report.setFeatureIndex(12); List<Element> elements = new ArrayList<>(); Element element = new Element(); report.setElements(elements); Report[] reportList = new Report[]{report}; allScenariosPageCollection.addReports(reportList); allScenariosPageRenderer.getRenderedContentByStepFilter(allScenariosPageCollection, template, step); }
public String getRenderedContentByStepFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Step step) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setStepFilter(step); allScenariosPageCollectionClone.getReports().forEach(report -> { List<Element> elements = report.getElements() .stream() .filter(element -> element.getSteps().contains(step)) .collect(Collectors.toList()); report.setElements(elements); }); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); }
AllScenariosPageRenderer extends PageWithChartRenderer { public String getRenderedContentByStepFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Step step) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setStepFilter(step); allScenariosPageCollectionClone.getReports().forEach(report -> { List<Element> elements = report.getElements() .stream() .filter(element -> element.getSteps().contains(step)) .collect(Collectors.toList()); report.setElements(elements); }); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); } }
AllScenariosPageRenderer extends PageWithChartRenderer { public String getRenderedContentByStepFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Step step) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setStepFilter(step); allScenariosPageCollectionClone.getReports().forEach(report -> { List<Element> elements = report.getElements() .stream() .filter(element -> element.getSteps().contains(step)) .collect(Collectors.toList()); report.setElements(elements); }); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); } @Inject  AllScenariosPageRenderer(
            final ChartJsonConverter chartJsonConverter,
            final ChartConfiguration chartConfiguration,
            final PropertyManager propertyManager
    ); }
AllScenariosPageRenderer extends PageWithChartRenderer { public String getRenderedContentByStepFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Step step) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setStepFilter(step); allScenariosPageCollectionClone.getReports().forEach(report -> { List<Element> elements = report.getElements() .stream() .filter(element -> element.getSteps().contains(step)) .collect(Collectors.toList()); report.setElements(elements); }); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); } @Inject  AllScenariosPageRenderer(
            final ChartJsonConverter chartJsonConverter,
            final ChartConfiguration chartConfiguration,
            final PropertyManager propertyManager
    ); String getRenderedContent(
            final AllScenariosPageCollection allScenariosPageCollection, final Template template); String getRenderedContentByTagFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Tag tag); String getRenderedContentByStepFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Step step); String getRenderedContentByFeatureFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Feature feature); }
AllScenariosPageRenderer extends PageWithChartRenderer { public String getRenderedContentByStepFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Step step) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setStepFilter(step); allScenariosPageCollectionClone.getReports().forEach(report -> { List<Element> elements = report.getElements() .stream() .filter(element -> element.getSteps().contains(step)) .collect(Collectors.toList()); report.setElements(elements); }); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); } @Inject  AllScenariosPageRenderer(
            final ChartJsonConverter chartJsonConverter,
            final ChartConfiguration chartConfiguration,
            final PropertyManager propertyManager
    ); String getRenderedContent(
            final AllScenariosPageCollection allScenariosPageCollection, final Template template); String getRenderedContentByTagFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Tag tag); String getRenderedContentByStepFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Step step); String getRenderedContentByFeatureFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Feature feature);  }