From ba71e135fb54276eb695360c029230b043f3bd86 Mon Sep 17 00:00:00 2001
From: Benjamin Bischoff <5775857+bischoffdev@users.noreply.github.com>
Date: Thu, 14 Mar 2024 16:19:58 +0100
Subject: [PATCH] Karate support (#330)
* nested elements in steps, toggling of docstrings
* docstring specific toggles
* section margins work
* collapse
* updates, step hook buttons
* scenario sub section button
* rename
* shadows
* rerun
* updates
* individual step hook expansion
* moved cards
* layout cleanup
* fixed background step behavior
* changelog
---
CHANGELOG.md | 183 ++++++++++++--
core/README.md | 6 +-
core/pom.xml | 4 +-
.../cluecumber/core/CluecumberCore.java | 26 ++
engine/pom.xml | 12 +-
.../cluecumber/engine/CluecumberEngine.java | 36 ++-
.../cluecumber/engine/json/pojo/Argument.java | 2 +-
.../cluecumber/engine/json/pojo/Element.java | 77 +++++-
.../engine/json/pojo/ResultMatch.java | 4 +-
.../cluecumber/engine/json/pojo/Step.java | 66 +++++
.../processors/ElementIndexPreProcessor.java | 46 +++-
.../engine/properties/PropertyManager.java | 54 +++-
.../pojos/pagecollections/PageCollection.java | 47 +++-
.../ScenarioDetailsPageRenderer.java | 2 +
.../resources/template/css/cluecumber.css | 27 +-
.../template/macros/custom-parameters.ftl | 2 +-
.../resources/template/macros/navigation.ftl | 2 +-
.../main/resources/template/macros/page.ftl | 17 +-
.../resources/template/macros/scenario.ftl | 27 +-
.../resources/template/scenario-detail.ftl | 233 +++++++++++++++---
.../resources/template/scenario-summary.ftl | 50 ++--
.../main/resources/template/snippets/js.ftl | 109 ++++----
.../src/main/resources/template/tree-view.ftl | 9 +-
.../ElementIndexPreProcessorTest.java | 4 +-
.../ElementMultipleRunsPreProcessorTest.java | 14 +-
.../properties/PropertyManagerTest.java | 4 +-
.../json/karate_background_docstrings.json | 1 +
.../json/karate_embedded_feature.json | 141 +++++++++++
examples/maven-example/pom.xml | 21 +-
makefile | 2 +-
maven/README.md | 8 +-
maven/pom.xml | 18 +-
.../cluecumber/maven/CluecumberMaven.java | 14 ++
pom.xml | 6 +-
34 files changed, 1034 insertions(+), 240 deletions(-)
create mode 100644 examples/maven-example/json/karate_background_docstrings.json
create mode 100644 examples/maven-example/json/karate_embedded_feature.json
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb01dd82..3a6b4348 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,98 +7,140 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Back to [Readme](README.md).
+## [3.6.0] - 2024-03-14
+
+### Fixed
+
+* Long tag names broke the layout
+* Reruns should not be displayed in the tree view
+
+### Added
+
+* Support for multiple sub sections (e.g. in Karate scenarios with feature files in feature files)
+* Attachments, outputs and docStrings are now collapsible individually
+* Step outputs are now toggleable
+* New configuration options for toggling step output (`expandStepOutput`)
+* New configuration options for toggling sub sections (`expandSubSections`)
+
+### Changed
+
+* Tweaked data table header layout
+* Tweaked look of all item cards
+* Re-arranged summary and timing information
+* Updated dependencies
+
## [3.5.1] - 2023-11-13
### Changed
+
* Improved display of scenario groups
* Updated dependencies
* Added missing Javadoc
### Fixed
+
* Grouping scenarios crashed Cluecumber when no start time existed
## [3.5.0] - 2023-11-02
### Added
+
* `groupPreviousScenarioRuns` mode for a compact view when there are multiple runs of the same scenario [#245]
* `expandPreviousScenarioRuns` to set default state of expanded or collapsed of the previous runs of the same scenario
## [3.4.0] - 2023-08-10
### Fixed
+
* Background steps were not considered in the overall scenario outcome [#319]
* Background steps were not shown in the bar charts
### Changed
-* Skipped scenarios are now determined to the official Cucumber guidelines
+
+* Skipped scenarios are now determined to the official Cucumber guidelines
* Charts show small bars for steps with a time of 0 instead of none at all
* Before and after hooks are not shown in the step charts anymore
## [3.3.1] - 2023-08-08
### Fixed
+
* Wrong relative links from bar charts to detail pages
## [3.3.0] - 2023-08-07
### Fixed
-* Scenarios having skipped steps after a passed step are now considered skipped (used to be passed) (#314)
+
+* Scenarios having skipped steps after a passed step are now considered skipped (used to be passed) (#314)
* `skip` parameter in Cluecumber Maven was not recognized anymore (#316)
### Added
+
* Charts in "All Tags", "All Features" and "All Steps" can now be clicked and redirect to the according detail page
## [3.2.2] - 2023-05-12
### Fixed
+
* Pie chart always showing results from all features [#311]
### Changed
+
* Updated dependencies
## [3.2.1] - 2023-03-21
### Fixed
+
* `expandDocStrings` option did not have an effect [#308]
### Changed
+
* Code clean-up
## [3.2.0] - 2023-03-10
### Changed
+
* Updated dependencies
* Small visual tweaks
* Code clean-up
### Added
+
* Full javadoc coverage
## [3.1.0] - 2023-01-17
### Added
+
* Added new test overview tree view page
### Fixed
+
* Aligned counts and use of plurals in headlines
* Fixed misaligned numbers in tag, step and feature overview page tables
* Various small design adjustments and fixes
### Changed
+
* Clearer custom parameters box
* Tags are now displayed as buttons
## [3.0.2] - 2022-12-22
### Fixed
+
* Exception message for non-given step was not shown in overview (#302)
## [3.0.1] - 2022-12-15
### Fixed
+
* Exception messages for skipped scenarios were not displayed (#299)
### Changed
+
* Separators between scenarios on the overview page
* Changed alignment to top for tables
* Changed error message display to dark red
@@ -107,51 +149,61 @@ Back to [Readme](README.md).
This marks a new chapter in Cluecumber development.
-From now on it will be possible to develop separate versions with different invocations and for different platforms since
+From now on it will be possible to develop separate versions with different invocations and for different platforms
+since
the core component is now the reporting engine that is the base for other forms of Cluecumber.
### Changed
+
* Separated functionality of Cluecumber Maven into three components:
- * Cluecumber Engine (_reporting engine_)
- * Cluecumber Core (_JVM code version_)
- * Cluecumber Maven (_Maven version_)
+ * Cluecumber Engine (_reporting engine_)
+ * Cluecumber Core (_JVM code version_)
+ * Cluecumber Maven (_Maven version_)
* Overhauled documentation
### Added
+
* New example projects for Cluecumber Core and Cluecumber Maven.
## [2.9.4] - 2022-10-19
### Changed
+
* Using new JQuery because of appsec vulnerability (#294)
## [2.9.3] - 2022-09-29
### Added
+
* Custom parameter values starting with `./`, `../` or `#` are now interpreted as relative URLs
* Custom navigation links without values are now hidden
## [2.9.2] - 2022-09-27
### Fixed
+
* #293 - unescaped html in exception messages
## [2.9.1] - 2022-09-26
### Added
+
* Display error messages on scenario overview pages
## [2.9.0] - 2022-09-24
### Added
+
* Ability to add custom external links to the navigation bar via `customNavigationLinks` property
* #281 - enable Cluecumber to be invoked without a POM project
* Display error classes on scenario overview pages
### Fixed
+
* #278 - Chart bars of steps with low times did not render at all
### Changed
+
* Dependency updates
* Design adjustments
* Reworked navigation for future improvements
@@ -160,38 +212,47 @@ the core component is now the reporting engine that is the base for other forms
## [2.8.0] - 2022-01-18
### Added
-* New `customParametersDisplayMode` option to display custom parameters on scenario pages or all pages (#273, base implementation contributed by zutshiy)
+
+* New `customParametersDisplayMode` option to display custom parameters on scenario pages or all pages (#273, base
+ implementation contributed by zutshiy)
* New `expandAttachments` option to expand or collapse attachments by default
* Attachments are collapsed by default and can be expanded (#279, base implementation contributed by beirtipol)
## [2.7.1] - 2021-11-05
### Changed
+
* Updated dependencies
## [2.7.0] - 2021-05-11
### Added
+
* More css classes for report customization (#270, contributed by GregJohnStewart)
### Changed
+
* Updated dependencies
## [2.6.1] - 2020-11-27
### Fixed
+
* After hooks with content were not displayed anymore
## [2.6.0] - 2020-11-27
### Fixed
+
* Fixed HTML encoding for attachments (#263)
### Added
+
* Background steps are now displayed in a separate section of the report
### Changed
-* Only hooks with outputs are considered and displayed in the scenario detail pages (#211)
+
+* Only hooks with outputs are considered and displayed in the scenario detail pages (#211)
* Various design cleanups
## [2.5.0] - 2020-05-11
@@ -225,7 +286,8 @@ the core component is now the reporting engine that is the base for other forms
### Fixed
-* Unknown steps are now reported as skipped by default (unless `failScenariosOnPendingOrUndefinedSteps` is set to true) (#236)
+* Unknown steps are now reported as skipped by default (unless `failScenariosOnPendingOrUndefinedSteps` is set to
+ true) (#236)
## [2.3.3] - 2020-01-27
@@ -316,7 +378,8 @@ the core component is now the reporting engine that is the base for other forms
### Added
-* Ability to set custom parameters via a properties file through the `customParametersFile` property (#167, contributed by gazler22)
+* Ability to set custom parameters via a properties file through the `customParametersFile` property (#167, contributed
+ by gazler22)
### Fixed
@@ -372,7 +435,8 @@ the core component is now the reporting engine that is the base for other forms
* Additional parallel run time on `All Scenarios` and `Scenario Sequence` pages
* Support of Cucumber 4.3.0's new scenario start timestamps
-* Start time and date, end time and date and duration is displayed on each scenario in `All Scenarios`, `Scenario Sequence` and `Scenario Detail` pages (Cucumber >= 4.3.0)
+* Start time and date, end time and date and duration is displayed on each scenario
+ in `All Scenarios`, `Scenario Sequence` and `Scenario Detail` pages (Cucumber >= 4.3.0)
### Changed
@@ -385,7 +449,7 @@ the core component is now the reporting engine that is the base for other forms
* Minimum and maximum step times on `All Steps` page links to the enclosing scenario (#152)
* New `failScenariosOnPendingOrUndefinedSteps` configuration property for marking scenarios as failed when they contain
-steps with status `pending` or `undefined` (default value is `false`) (#74)
+ steps with status `pending` or `undefined` (default value is `false`) (#74)
### Changed
@@ -406,7 +470,7 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
### Changed
-* Usage of symbols instead of text in tables for `passed`, `failed` and `skipped`
+* Usage of symbols instead of text in tables for `passed`, `failed` and `skipped`
## [1.7.3] - 2019-03-05
@@ -436,7 +500,9 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
* Feature name link is now shown on scenario detail pages (#125)
* three new options to expand or collapse hooks and docstrings on scenario detail pages (default: false) (#117)
+
```xml
+
true|falsetrue|false
@@ -444,7 +510,8 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
```
-* Added data attributes for common elements (`data-cluecumber-item`) to simplify custom css configurations (related to #129)
+* Added data attributes for common elements (`data-cluecumber-item`) to simplify custom css configurations (related to
+ #129)
### Fixed
@@ -525,7 +592,8 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
### Added
-* Option to hide/show step hooks on the "Scenario Details" page (only present if the scenario has step hooks in at least one step)
+* Option to hide/show step hooks on the "Scenario Details" page (only present if the scenario has step hooks in at least
+ one step)
## [1.4.1] - 2018-10-09
@@ -547,8 +615,10 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
### Added
-* Scenario Sequence page that shows the order of scenario executions and their states without deviding them into separate `passed`, `failed` and `skipped` sections
-* Option to show/hide docstrings on the "Scenario Details" page (only present if the scenario has docstrings in at least one step)
+* Scenario Sequence page that shows the order of scenario executions and their states without deviding them into
+ separate `passed`, `failed` and `skipped` sections
+* Option to show/hide docstrings on the "Scenario Details" page (only present if the scenario has docstrings in at least
+ one step)
### Fixed
@@ -582,7 +652,8 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
### Fixed
* Support for parameter highlighting in [Karate](https://github.com/intuit/karate/) tests
-* Hiding skipped steps from the scenario detail chart now also hides steps that are _considered_ skipped but have a status other than `skipped`
+* Hiding skipped steps from the scenario detail chart now also hides steps that are _considered_ skipped but have a
+ status other than `skipped`
### Added
@@ -778,78 +849,154 @@ steps with status `pending` or `undefined` (default value is `false`) (#74)
Initial project version on GitHub and Maven Central.
+[3.6.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.6.0
+
[3.5.1]: https://github.com/trivago/cluecumber-report-plugin/tree/3.5.1
+
[3.5.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.5.0
+
[3.4.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.4.0
+
[3.3.1]: https://github.com/trivago/cluecumber-report-plugin/tree/3.3.1
+
[3.3.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.3.0
+
[3.2.2]: https://github.com/trivago/cluecumber-report-plugin/tree/3.2.2
+
[3.2.1]: https://github.com/trivago/cluecumber-report-plugin/tree/3.2.1
+
[3.2.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.2.0
+
[3.1.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.1.0
+
[3.0.2]: https://github.com/trivago/cluecumber-report-plugin/tree/3.0.2
+
[3.0.1]: https://github.com/trivago/cluecumber-report-plugin/tree/3.0.1
+
[3.0.0]: https://github.com/trivago/cluecumber-report-plugin/tree/3.0.0
+
[2.9.4]: https://github.com/trivago/cluecumber-report-plugin/tree/2.9.4
+
[2.9.3]: https://github.com/trivago/cluecumber-report-plugin/tree/2.9.3
+
[2.9.2]: https://github.com/trivago/cluecumber-report-plugin/tree/2.9.2
+
[2.9.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.9.1
+
[2.9.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.9.0
+
[2.8.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.8.0
+
[2.7.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.7.1
+
[2.7.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.7.0
+
[2.6.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.6.1
+
[2.6.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.6.0
+
[2.5.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.5.0
+
[2.4.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.4.0
+
[2.3.4]: https://github.com/trivago/cluecumber-report-plugin/tree/2.3.4
+
[2.3.3]: https://github.com/trivago/cluecumber-report-plugin/tree/2.3.3
+
[2.3.2]: https://github.com/trivago/cluecumber-report-plugin/tree/2.3.2
+
[2.3.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.3.1
+
[2.3.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.3.0
+
[2.2.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.2.0
+
[2.1.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.1.1
+
[2.1.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.1.0
+
[2.0.1]: https://github.com/trivago/cluecumber-report-plugin/tree/2.0.1
+
[2.0.0]: https://github.com/trivago/cluecumber-report-plugin/tree/2.0.0
+
[1.11.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.11.0
+
[1.10.2]: https://github.com/trivago/cluecumber-report-plugin/tree/1.10.2
+
[1.10.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.10.1
+
[1.10.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.10.0
+
[1.9.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.9.0
+
[1.8.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.8.1
+
[1.8.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.8.0
+
[1.7.3]: https://github.com/trivago/cluecumber-report-plugin/tree/1.7.3
+
[1.7.2]: https://github.com/trivago/cluecumber-report-plugin/tree/1.7.2
+
[1.7.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.7.1
+
[1.7.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.7.0
+
[1.6.5]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.5
+
[1.6.4]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.4
+
[1.6.3]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.3
+
[1.6.2]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.2
+
[1.6.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.1
+
[1.6.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.6.0
+
[1.5.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.5.0
+
[1.4.2]: https://github.com/trivago/cluecumber-report-plugin/tree/1.4.2
+
[1.4.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.4.1
+
[1.4.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.4.0
+
[1.3.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.3.0
+
[1.2.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.2.1
+
[1.2.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.2.0
+
[1.1.1]: https://github.com/trivago/cluecumber-report-plugin/tree/1.1.1
+
[1.1.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.1.0
+
[1.0.0]: https://github.com/trivago/cluecumber-report-plugin/tree/1.0.0
+
[0.8.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.8.0
+
[0.7.1]: https://github.com/trivago/cluecumber-report-plugin/tree/0.7.1
+
[0.6.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.6.0
+
[0.5.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.5.0
+
[0.3.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.3.0
+
[0.2.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.2.0
+
[0.1.1]: https://github.com/trivago/cluecumber-report-plugin/tree/0.1.1
+
[0.1.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.1.0
+
[0.7.0]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.7
+
[0.0.6]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.6
+
[0.0.5]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.5
+
[0.0.4]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.4
+
[0.0.3]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.3
+
[0.0.2]: https://github.com/trivago/cluecumber-report-plugin/tree/0.0.2
diff --git a/core/README.md b/core/README.md
index b365298c..29151f66 100644
--- a/core/README.md
+++ b/core/README.md
@@ -229,8 +229,8 @@ new CluecumberCore.Builder()
## Auto-expand Certain Report Sections
-The `expandBeforeAfterHooks`, `expandStepHooks` and `expandDocStrings` options can be set to `true` to expand or
-collapse before/after hooks, step hooks or docstrings respectively on scenario detail pages.
+The `expandBeforeAfterHooks`, `expandStepHooks`, `expandDocStrings`, `expandOutputs` and `expandSubSections` options can be set to `true` to expand or
+collapse before/after hooks, step hooks, docstrings, step outputs and sub sections respectively on scenario detail pages.
If they are not set, they default to false. This means that the report user has to use the buttons on a scenario detail
page to expand those sections on demand.
@@ -240,6 +240,8 @@ new CluecumberCore.Builder()
.setExpandBeforeAfterHooks(true)
.setExpandStepHooks(true)
.setExpandDocStrings(true)
+ .setExpandOutputs(true)
+ .expandSubSections(true)
.build().generateReports(jsonDirectory, reportDirectory);
```
diff --git a/core/pom.xml b/core/pom.xml
index 62492ffe..489f6fae 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -6,13 +6,13 @@
4.0.0cluecumber-core
- 3.5.1
+ 3.6.0jarcluecumber-parentcom.trivago.rta
- 3.5.1
+ 3.6.0Cluecumber Core
diff --git a/core/src/main/java/com/trivago/cluecumber/core/CluecumberCore.java b/core/src/main/java/com/trivago/cluecumber/core/CluecumberCore.java
index 5427f360..e2c8b9c9 100644
--- a/core/src/main/java/com/trivago/cluecumber/core/CluecumberCore.java
+++ b/core/src/main/java/com/trivago/cluecumber/core/CluecumberCore.java
@@ -41,9 +41,11 @@ private CluecumberCore(Builder builder) throws CluecumberException {
cluecumberEngine.setCustomStatusColorFailed(builder.customStatusColorFailed);
cluecumberEngine.setCustomStatusColorPassed(builder.customStatusColorPassed);
cluecumberEngine.setCustomStatusColorSkipped(builder.customStatusColorSkipped);
+ cluecumberEngine.setExpandSubSections(builder.expandSubSections);
cluecumberEngine.setExpandAttachments(builder.expandAttachments);
cluecumberEngine.setExpandBeforeAfterHooks(builder.expandBeforeAfterHooks);
cluecumberEngine.setExpandDocStrings(builder.expandDocStrings);
+ cluecumberEngine.setExpandOutputs(builder.expandOutputs);
cluecumberEngine.setExpandStepHooks(builder.expandStepHooks);
cluecumberEngine.setGroupPreviousScenarioRuns(builder.groupPreviousScenarioRuns);
cluecumberEngine.setExpandPreviousScenarioRuns(builder.expandPreviousScenarioRuns);
@@ -76,6 +78,7 @@ public static class Builder {
private String customStatusColorFailed;
private String customStatusColorPassed;
private String customStatusColorSkipped;
+ private boolean expandSubSections;
private boolean expandAttachments;
private boolean expandBeforeAfterHooks;
private boolean expandDocStrings;
@@ -85,6 +88,7 @@ public static class Builder {
private String logLevel;
private String startPage;
private boolean failScenariosOnPendingOrUndefinedSteps;
+ private boolean expandOutputs;
/**
* Finalize the {@link CluecumberCore} builder.
@@ -186,6 +190,17 @@ public Builder setCustomStatusColorSkipped(final String customStatusColorSkipped
return this;
}
+ /**
+ * Whether to expand sub sections or not.
+ *
+ * @param expandSubSections If true, sub sections will be expanded.
+ * @return The {@link Builder}.
+ */
+ public Builder setExpandSubSections(final boolean expandSubSections) {
+ this.expandSubSections = expandSubSections;
+ return this;
+ }
+
/**
* Whether to expand attachments or not.
*
@@ -197,6 +212,17 @@ public Builder setExpandAttachments(final boolean expandAttachments) {
return this;
}
+ /**
+ * Whether to expand stepoutputs or not.
+ *
+ * @param expandOutputs If true, outputs will be expanded.
+ * @return The {@link Builder}.
+ */
+ public Builder setExpandOutputs(final boolean expandOutputs) {
+ this.expandOutputs = expandOutputs;
+ return this;
+ }
+
/**
* Whether to expand before and after hooks or not.
*
diff --git a/engine/pom.xml b/engine/pom.xml
index e0564e4d..2c95b0a5 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -8,11 +8,11 @@
cluecumber-parentcom.trivago.rta
- 3.5.1
+ 3.6.0cluecumber-engine
- 3.5.1
+ 3.6.0jarCluecumber Engine
@@ -29,11 +29,11 @@
11UTF-83.10.1
- 2.6.2
- 2.3.31
- 1.9.0-alpha2
+ 2.7.0
+ 2.3.32
+ 1.9.02.10.1
- 2.45
+ 2.511.5.01.1.00.9.1
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/CluecumberEngine.java b/engine/src/main/java/com/trivago/cluecumber/engine/CluecumberEngine.java
index ef3874a9..a6e95172 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/CluecumberEngine.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/CluecumberEngine.java
@@ -63,14 +63,14 @@ public final class CluecumberEngine {
/**
* Constructor for dependency injection.
*
- * @param elementIndexPreProcessor The {@link ElementIndexPreProcessor} instance.
+ * @param elementIndexPreProcessor The {@link ElementIndexPreProcessor} instance.
* @param elementMultipleRunsPreProcessor The {@link ElementMultipleRunsPreProcessor} instance.
- * @param fileIO The {@link FileIO} instance.
- * @param fileSystemManager The {@link FileSystemManager} instance.
- * @param jsonPojoConverter The {@link JsonPojoConverter} instance.
- * @param logger The {@link CluecumberLogger} instance.
- * @param propertyManager The {@link PropertyManager} instance.
- * @param reportGenerator The {@link ReportGenerator} instance.
+ * @param fileIO The {@link FileIO} instance.
+ * @param fileSystemManager The {@link FileSystemManager} instance.
+ * @param jsonPojoConverter The {@link JsonPojoConverter} instance.
+ * @param logger The {@link CluecumberLogger} instance.
+ * @param propertyManager The {@link PropertyManager} instance.
+ * @param reportGenerator The {@link ReportGenerator} instance.
*/
@Inject
public CluecumberEngine(
@@ -133,14 +133,14 @@ public void build(
logger.warn("Could not parse JSON in file '" + jsonFilePath + "': " + e.getMessage());
}
}
- elementIndexPreProcessor.addScenarioIndices(allScenariosPageCollection.getReports());
+ elementIndexPreProcessor.process(allScenariosPageCollection.getReports());
if (propertyManager.isGroupPreviousScenarioRuns()) {
elementMultipleRunsPreProcessor.addMultipleRunsInformationToScenarios(allScenariosPageCollection.getReports());
}
reportGenerator.generateReport(allScenariosPageCollection);
logger.info(
"=> Cluecumber Report: " + propertyManager.getGeneratedHtmlReportDirectory() + "/" +
- Settings.START_PAGE + Settings.HTML_FILE_EXTENSION,
+ Settings.START_PAGE + Settings.HTML_FILE_EXTENSION,
DEFAULT,
COMPACT,
MINIMAL
@@ -199,6 +199,15 @@ public void setFailScenariosOnPendingOrUndefinedSteps(final boolean failScenario
propertyManager.setFailScenariosOnPendingOrUndefinedSteps(failScenariosOnPendingOrUndefinedSteps);
}
+ /**
+ * Set if sub sections should be expanded by default.
+ *
+ * @param expandSubSections If true, sub sections will be expanded by default.
+ */
+ public void setExpandSubSections(final boolean expandSubSections) {
+ propertyManager.setExpandSubSections(expandSubSections);
+ }
+
/**
* Whether to expand before and after hooks or not.
*
@@ -235,6 +244,15 @@ public void setExpandAttachments(final boolean expandAttachments) {
propertyManager.setExpandAttachments(expandAttachments);
}
+ /**
+ * Whether to expand step outputs or not.
+ *
+ * @param expandOutputs If true, outputs will be expanded.
+ */
+ public void setExpandOutputs(final boolean expandOutputs) {
+ propertyManager.setExpandOutputs(expandOutputs);
+ }
+
/**
* Whether to show the scenarios run multiple times should be grouped and the show not last run toggle should be shown.
*
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Argument.java b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Argument.java
index 78ef3c7d..92fd5b88 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Argument.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Argument.java
@@ -15,7 +15,7 @@
*/
package com.trivago.cluecumber.engine.json.pojo;
-class Argument {
+public class Argument {
private String val;
private int offset;
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Element.java b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Element.java
index 9ae583c8..a5a09b01 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Element.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Element.java
@@ -47,7 +47,8 @@ public class Element {
private List tags = new ArrayList<>();
@SerializedName("start_timestamp")
private String startTimestamp = "";
- private List childrenElements = new ArrayList<>();;
+ private List childrenElements = new ArrayList<>();
+ ;
private transient int featureIndex = 0;
private transient int scenarioIndex = 0;
@@ -374,7 +375,7 @@ public Status getStatus() {
return Status.SKIPPED;
}
if (failOnPendingOrUndefined && allStates.size() == 1
- && allStates.iterator().next().basicStatus() == Status.SKIPPED) {
+ && allStates.iterator().next().basicStatus() == Status.SKIPPED) {
return Status.FAILED;
}
@@ -587,6 +588,54 @@ public boolean hasDocStrings() {
return false;
}
+ /**
+ * Check if this scenario contains outputs.
+ *
+ * @return true if there are outputs.
+ */
+ public boolean hasOutputs() {
+ for (Step step : backgroundSteps) {
+ if (step.hasOutputs()) {
+ return true;
+ }
+ }
+ for (Step step : steps) {
+ if (step.hasOutputs()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if this scenario contains attachments.
+ *
+ * @return true if there are attachments.
+ */
+ public boolean hasAttachments() {
+ for (ResultMatch resultMatch : before) {
+ if (!resultMatch.getEmbeddings().isEmpty()) {
+ return true;
+ }
+ }
+ for (Step step : backgroundSteps) {
+ if (step.hasEmbeddings()) {
+ return true;
+ }
+ }
+ for (Step step : steps) {
+ if (step.hasEmbeddings()) {
+ return true;
+ }
+ }
+ for (ResultMatch resultMatch : after) {
+ if (!resultMatch.getEmbeddings().isEmpty()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Check if this scenario contains hooks.
*
@@ -612,6 +661,25 @@ public boolean hasStepHooks() {
return false;
}
+ /**
+ * Check if this scenario contains sub-sections.
+ *
+ * @return true if there are sub-sections.
+ */
+ public boolean hasSubSections() {
+ for (Step step : backgroundSteps) {
+ if (step.hasSubSections()) {
+ return true;
+ }
+ }
+ for (Step step : steps) {
+ if (step.hasSubSections()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Check if any step hooks have content.
*
@@ -727,6 +795,7 @@ public boolean getIsLastOfMultipleScenarioRuns() {
/**
* Set to true if this scenario is the last of multiple runs.
+ *
* @param isLastOfMultipleScenarioRuns true if this scenario is the last of multiple runs.
*/
public void setIsLastOfMultipleScenarioRuns(final boolean isLastOfMultipleScenarioRuns) {
@@ -744,6 +813,7 @@ public boolean getIsNotLastOfMultipleScenarioRuns() {
/**
* Set to true if this scenario was run multiple times and it's not the last run.
+ *
* @param isNotLastOfMultipleScenarioRuns true if this scenario was run multiple times and it's not the last run.
*/
public void setIsNotLastOfMultipleScenarioRuns(final boolean isNotLastOfMultipleScenarioRuns) {
@@ -752,6 +822,7 @@ public void setIsNotLastOfMultipleScenarioRuns(final boolean isNotLastOfMultiple
/**
* Get the children elements of this scenario.
+ *
* @return The children elements.
*/
public List getChildrenElements() {
@@ -760,6 +831,7 @@ public List getChildrenElements() {
/**
* Set the children elements of this scenario.
+ *
* @param childrenElements The children elements.
*/
public void setChildrenElements(final List childrenElements) {
@@ -777,6 +849,7 @@ public void setFeatureUri(String featureUri) {
/**
* Get all steps including background steps.
+ *
* @return The list of steps.
*/
public List getAllStepsIncludingBackgroundSteps() {
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/ResultMatch.java b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/ResultMatch.java
index c288a23e..43f1cd2c 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/ResultMatch.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/ResultMatch.java
@@ -92,7 +92,7 @@ public void setEmbeddings(final List embeddings) {
* @return true if attachments exist.
*/
public boolean hasEmbeddings() {
- return embeddings.size() > 0;
+ return !embeddings.isEmpty();
}
/**
@@ -119,7 +119,7 @@ public void setOutput(final List output) {
* @return true if outputs exist.
*/
public boolean hasOutputs() {
- return output.size() > 0;
+ return !output.isEmpty();
}
/**
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Step.java b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Step.java
index fb47a341..a57e7f9a 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Step.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/json/pojo/Step.java
@@ -36,6 +36,9 @@ public class Step extends ResultMatch {
private List after = new ArrayList<>();
@SerializedName("doc_string")
private DocString docString;
+ private int collapseLevel = 0;
+ private int index = 0;
+ private boolean hasSubSections = false;
/**
* Check if there are before or after step hooks with content.
@@ -56,6 +59,15 @@ public boolean hasHooksWithContent() {
return false;
}
+ /**
+ * Check if the step has hooks.
+ *
+ * @return true if the step has hooks.
+ */
+ public boolean hasHooks() {
+ return !before.isEmpty() || !after.isEmpty();
+ }
+
/**
* Get the before hooks.
*
@@ -278,4 +290,58 @@ public boolean equals(final Object o) {
public int hashCode() {
return Objects.hash(getGlueMethodName());
}
+
+ /**
+ * Get the collapse level of the step.
+ *
+ * @return The collapse level of the step.
+ */
+ public int getCollapseLevel() {
+ return collapseLevel;
+ }
+
+ /**
+ * Set the collapse level of the step.
+ *
+ * @param collapseLevel The collapse level of the step.
+ */
+ public void setCollapseLevel(int collapseLevel) {
+ this.collapseLevel = collapseLevel;
+ }
+
+ /**
+ * Get the internal index of the step.
+ *
+ * @return The index of the step.
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Set the internal index of the step.
+ *
+ * @param index The index of the step.
+ */
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ /**
+ * Check if the step has sub sections.
+ *
+ * @return true if the step has sub sections.
+ */
+ public boolean hasSubSections() {
+ return hasSubSections;
+ }
+
+ /**
+ * Set if the step has sub sections.
+ *
+ * @param hasSubSections true if the step has sub sections.
+ */
+ public void setHasSubSections(boolean hasSubSections) {
+ this.hasSubSections = hasSubSections;
+ }
}
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/json/processors/ElementIndexPreProcessor.java b/engine/src/main/java/com/trivago/cluecumber/engine/json/processors/ElementIndexPreProcessor.java
index 8d10a443..9cfb7e28 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/json/processors/ElementIndexPreProcessor.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/json/processors/ElementIndexPreProcessor.java
@@ -17,6 +17,7 @@
import com.trivago.cluecumber.engine.json.pojo.Element;
import com.trivago.cluecumber.engine.json.pojo.Report;
+import com.trivago.cluecumber.engine.json.pojo.Step;
import javax.inject.Inject;
import javax.inject.Singleton;
@@ -44,7 +45,7 @@ public ElementIndexPreProcessor() {
*
* @param reports The list of reports to cycle through.
*/
- public void addScenarioIndices(final List reports) {
+ public void process(final List reports) {
List elements = new ArrayList<>();
for (Report report : reports) {
elements.addAll(report.getElements());
@@ -60,6 +61,49 @@ public void addScenarioIndices(final List reports) {
if (element.isScenario()) {
scenarioIndex++;
element.setScenarioIndex(scenarioIndex);
+ int stepIndex = 0;
+ Step oldStep = null;
+ for (Step step : element.getBackgroundSteps()) {
+ int count = 0;
+ step.setIndex(stepIndex);
+ for (int i = 0; i < step.getKeyword().length(); i++) {
+ if (step.getKeyword().charAt(i) == '>') {
+ count++;
+ } else {
+ break;
+ }
+ }
+ if (count > 0) {
+ step.setCollapseLevel(count);
+ step.setKeyword(step.getKeyword().substring(count).trim());
+ }
+ if (oldStep != null && oldStep.getCollapseLevel() < step.getCollapseLevel()) {
+ oldStep.setHasSubSections(true);
+ }
+ oldStep = step;
+ stepIndex++;
+ }
+ oldStep = null;
+ for (Step step : element.getSteps()) {
+ int count = 0;
+ step.setIndex(stepIndex);
+ for (int i = 0; i < step.getKeyword().length(); i++) {
+ if (step.getKeyword().charAt(i) == '>') {
+ count++;
+ } else {
+ break;
+ }
+ }
+ if (count > 0) {
+ step.setCollapseLevel(count);
+ step.setKeyword(step.getKeyword().substring(count).trim());
+ }
+ if (oldStep != null && oldStep.getCollapseLevel() < step.getCollapseLevel()) {
+ oldStep.setHasSubSections(true);
+ }
+ oldStep = step;
+ stepIndex++;
+ }
}
}
}
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/properties/PropertyManager.java b/engine/src/main/java/com/trivago/cluecumber/engine/properties/PropertyManager.java
index 1e8a74f4..0b4fe8e8 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/properties/PropertyManager.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/properties/PropertyManager.java
@@ -53,12 +53,14 @@ public class PropertyManager {
private String sourceJsonReportDirectory;
private String generatedHtmlReportDirectory;
private boolean failScenariosOnPendingOrUndefinedSteps = false;
+ private boolean expandSubSections = false;
private boolean expandBeforeAfterHooks = false;
private boolean expandStepHooks = false;
private boolean expandDocStrings = false;
private boolean expandAttachments = true;
+ private boolean expandOutputs = false;
private boolean groupPreviousScenarioRuns = false;
- private boolean expandPreviousScenarioRuns = true;
+ private boolean expandPreviousScenarioRuns = false;
private String customCssFile;
private String customParametersFile;
private Settings.CustomParamDisplayMode customParametersDisplayMode =
@@ -198,7 +200,7 @@ public void setCustomParametersDisplayMode(String customParametersDisplayMode) {
this.customParametersDisplayMode = Settings.CustomParamDisplayMode.valueOf(customParametersDisplayMode.toUpperCase());
} catch (IllegalArgumentException e) {
logger.warn("Unknown setting for custom parameter page(s): '" + customParametersDisplayMode +
- "'. Must be one of " + Arrays.toString(Settings.CustomParamDisplayMode.values()));
+ "'. Must be one of " + Arrays.toString(Settings.CustomParamDisplayMode.values()));
this.customParametersDisplayMode = Settings.CustomParamDisplayMode.SCENARIO_PAGES;
}
}
@@ -251,6 +253,24 @@ public void setFailScenariosOnPendingOrUndefinedSteps(final boolean failScenario
this.failScenariosOnPendingOrUndefinedSteps = failScenariosOnPendingOrUndefinedSteps;
}
+ /**
+ * This determines whether sub sections should be expanded by default.
+ *
+ * @return true means they should be expanded.
+ */
+ public boolean isExpandSubSections() {
+ return expandSubSections;
+ }
+
+ /**
+ * Set whether sub sections should be expanded by default.
+ *
+ * @param expandSubSections true means they should be expanded.
+ */
+ public void setExpandSubSections(final boolean expandSubSections) {
+ this.expandSubSections = expandSubSections;
+ }
+
/**
* This determines whether before and after hooks should be expanded by default.
*
@@ -314,6 +334,15 @@ public boolean isExpandAttachments() {
return expandAttachments;
}
+ /**
+ * This determines whether step outputs should be expanded by default.
+ *
+ * @return true means they should be expanded.
+ */
+ public boolean isExpandOutputs() {
+ return expandOutputs;
+ }
+
/**
* Set whether attachments should be expanded by default.
*
@@ -323,6 +352,15 @@ public void setExpandAttachments(final boolean expandAttachments) {
this.expandAttachments = expandAttachments;
}
+ /**
+ * Set whether step outputs should be expanded by default.
+ *
+ * @param expandOutputs true means they should be expanded.
+ */
+ public void setExpandOutputs(final boolean expandOutputs) {
+ this.expandOutputs = expandOutputs;
+ }
+
/**
* This determines whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.
*
@@ -485,15 +523,17 @@ public void logProperties() {
logger.logInfoSeparator();
}
customParameters.entrySet().stream().map(entry -> "- custom parameter : " +
- entry.getKey() + " -> " + entry.getValue()).forEach(logString -> logger.info(logString, DEFAULT));
+ entry.getKey() + " -> " + entry.getValue()).forEach(logString -> logger.info(logString, DEFAULT));
}
logger.logInfoSeparator(DEFAULT);
logger.info("- fail pending/undefined scenarios : " + failScenariosOnPendingOrUndefinedSteps, DEFAULT);
+ logger.info("- expand sub sections : " + expandSubSections, DEFAULT);
logger.info("- expand before/after hooks : " + expandBeforeAfterHooks, DEFAULT);
logger.info("- expand step hooks : " + expandStepHooks, DEFAULT);
logger.info("- expand doc strings : " + expandDocStrings, DEFAULT);
+ logger.info("- expand step outputs : " + expandOutputs, DEFAULT);
logger.info("- expand attachments : " + expandAttachments, DEFAULT);
logger.info("- page title : " + customPageTitle, DEFAULT);
logger.info("- start page : " + startPage, DEFAULT);
@@ -502,8 +542,10 @@ public void logProperties() {
logger.info("- expand previous scenario runs : " + expandPreviousScenarioRuns, DEFAULT);
if (!customNavigationLinks.isEmpty()) {
- customNavigationLinks.entrySet().stream().map(entry -> "- custom navigation link : " +
- entry.getKey() + " -> " + entry.getValue()).forEach(logString -> logger.info(logString, DEFAULT));
+ customNavigationLinks.entrySet().stream().map(
+ entry -> "- custom navigation link : " +
+ entry.getKey() + " -> " + entry.getValue()).forEach(
+ logString -> logger.info(logString, DEFAULT));
}
@@ -512,7 +554,7 @@ public void logProperties() {
}
logger.info("- colors (passed, failed, skipped) : " +
- customStatusColorPassed + ", " + customStatusColorFailed + ", " + customStatusColorSkipped, DEFAULT);
+ customStatusColorPassed + ", " + customStatusColorFailed + ", " + customStatusColorSkipped, DEFAULT);
logger.logInfoSeparator(DEFAULT);
}
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/PageCollection.java b/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/PageCollection.java
index c257f7d5..6e39a05d 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/PageCollection.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/PageCollection.java
@@ -31,6 +31,8 @@ public class PageCollection implements Cloneable {
private boolean expandStepHooks;
private boolean expandDocStrings;
private boolean expandAttachments;
+ private boolean expandOutputs;
+ private boolean expandSubSections;
private boolean groupPreviousScenarioRuns;
private boolean expandPreviousScenarioRuns;
private List customParameters;
@@ -119,6 +121,15 @@ public boolean isExpandAttachments() {
return expandAttachments;
}
+ /**
+ * Check if step outputs should be expanded.
+ *
+ * @return true if they should be expanded.
+ */
+ public boolean isExpandOutputs() {
+ return expandOutputs;
+ }
+
/**
* Set if attachments should be expanded.
*
@@ -128,6 +139,33 @@ public void setExpandAttachments(final boolean expandAttachments) {
this.expandAttachments = expandAttachments;
}
+ /**
+ * Set if step outputs should be expanded.
+ *
+ * @param expandOutputs true if they should be expanded.
+ */
+ public void setExpandOutputs(final boolean expandOutputs) {
+ this.expandOutputs = expandOutputs;
+ }
+
+ /**
+ * Set if sub sections should be expanded.
+ *
+ * @param expandSubSections true if they should be expanded.
+ */
+ public void setExpandSubSections(final boolean expandSubSections) {
+ this.expandSubSections = expandSubSections;
+ }
+
+ /**
+ * Check if sub sections should be expanded.
+ *
+ * @return true if they should be expanded.
+ */
+ public boolean isExpandSubSections() {
+ return expandSubSections;
+ }
+
/**
* This determines whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.
*
@@ -184,6 +222,7 @@ public List getCustomParameters() {
/**
* Set custom parameters.
+ *
* @param customParameters The {@link CustomParameter} list.
*/
public void setCustomParameters(final List customParameters) {
@@ -192,6 +231,7 @@ public void setCustomParameters(final List customParameters) {
/**
* Check if there are custom parameters.
+ *
* @return true if there are custom parameters.
*/
public boolean hasCustomParameters() {
@@ -200,6 +240,7 @@ public boolean hasCustomParameters() {
/**
* Get the display mode for custom parameters.
+ *
* @return The {@link CustomParamDisplayMode} enum.
*/
public CustomParamDisplayMode getDisplayMode() {
@@ -208,6 +249,7 @@ public CustomParamDisplayMode getDisplayMode() {
/**
* Set the display mode for custom parameters.
+ *
* @param displayMode The {@link CustomParamDisplayMode} enum.
*/
public void setDisplayMode(CustomParamDisplayMode displayMode) {
@@ -216,6 +258,7 @@ public void setDisplayMode(CustomParamDisplayMode displayMode) {
/**
* Get custom navigation links.
+ *
* @return The {@link Link} list.
*/
public List getNavigationLinks() {
@@ -224,6 +267,7 @@ public List getNavigationLinks() {
/**
* Set custom navigation links.
+ *
* @param links The {@link Link} list.
*/
public void setNavigationLinks(List links) {
@@ -239,8 +283,7 @@ public void setNavigationLinks(List links) {
@Override
public PageCollection clone() throws CloneNotSupportedException {
try {
- PageCollection clone = (PageCollection) super.clone();
- return clone;
+ return (PageCollection) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
diff --git a/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/renderering/ScenarioDetailsPageRenderer.java b/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/renderering/ScenarioDetailsPageRenderer.java
index 7ad81912..dbaef9ac 100644
--- a/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/renderering/ScenarioDetailsPageRenderer.java
+++ b/engine/src/main/java/com/trivago/cluecumber/engine/rendering/pages/renderering/ScenarioDetailsPageRenderer.java
@@ -76,6 +76,8 @@ public String getRenderedContent(
scenarioDetailsPageCollection.setExpandStepHooks(propertyManager.isExpandStepHooks());
scenarioDetailsPageCollection.setExpandDocStrings(propertyManager.isExpandDocStrings());
scenarioDetailsPageCollection.setExpandAttachments(propertyManager.isExpandAttachments());
+ scenarioDetailsPageCollection.setExpandOutputs(propertyManager.isExpandOutputs());
+ scenarioDetailsPageCollection.setExpandSubSections(propertyManager.isExpandSubSections());
scenarioDetailsPageCollection.setExpandPreviousScenarioRuns(propertyManager.isExpandPreviousScenarioRuns());
scenarioDetailsPageCollection.setGroupPreviousScenarioRuns(propertyManager.isGroupPreviousScenarioRuns());
diff --git a/engine/src/main/resources/template/css/cluecumber.css b/engine/src/main/resources/template/css/cluecumber.css
index 6a4f4bd9..accb5942 100644
--- a/engine/src/main/resources/template/css/cluecumber.css
+++ b/engine/src/main/resources/template/css/cluecumber.css
@@ -95,15 +95,10 @@ a {
.navbar, .card {
margin: 0 0 .5rem 0;
- border: 1px solid darkgray;
-}
-
-.scenarioAttachment > div, .scenarioOutput > div {
- border: 1px solid rgb(149, 189, 197);
}
-.scenarioOutput {
- white-space: pre-line;
+.card {
+ border: 1px solid darkgray;
}
pre {
@@ -112,7 +107,7 @@ pre {
}
.row {
- padding: 1rem;
+ padding: .85rem;
}
.list-group {
@@ -235,12 +230,10 @@ button.btn {
box-shadow: none;
}
-button.btn.collapsed:before {
- content: 'Show ';
-}
-
-button.btn:before {
- content: 'Hide ';
+.btn-clipboard {
+ border: none;
+ font-size: small;
+ color: #676767;
}
div.collapse {
@@ -257,7 +250,7 @@ i {
}
.customParameters .card-header {
- background-color: lightgray;
+ background-color: darkgray;
color: black;
}
@@ -296,4 +289,8 @@ p.firstException {
tr.even td, tr.odd td {
border-bottom: #ebebeb 1px solid;
+}
+
+.dataTables_length {
+ text-align: left;
}
\ No newline at end of file
diff --git a/engine/src/main/resources/template/macros/custom-parameters.ftl b/engine/src/main/resources/template/macros/custom-parameters.ftl
index 768fc14e..c16b6a9b 100644
--- a/engine/src/main/resources/template/macros/custom-parameters.ftl
+++ b/engine/src/main/resources/template/macros/custom-parameters.ftl
@@ -18,7 +18,7 @@ limitations under the License.
<#macro card customParams>
<#list customParams as customParameter>
diff --git a/engine/src/main/resources/template/macros/navigation.ftl b/engine/src/main/resources/template/macros/navigation.ftl
index 1c4b5075..f4f20c9c 100644
--- a/engine/src/main/resources/template/macros/navigation.ftl
+++ b/engine/src/main/resources/template/macros/navigation.ftl
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<#macro build highlight>
-