From 1fac4ceab47649783a42b131e1fdf22f4abe2d4d Mon Sep 17 00:00:00 2001
From: Benjamin Bischoff <5775857+bischoffdev@users.noreply.github.com>
Date: Mon, 25 Mar 2024 11:17:08 +0100
Subject: [PATCH] 3.6.2 (#338)
---
CHANGELOG.md | 14 +++++++++++
core/pom.xml | 4 ++--
engine/pom.xml | 4 ++--
.../cluecumber/engine/json/pojo/Step.java | 9 +++++--
.../resources/template/scenario-detail.ftl | 22 ++++++++---------
.../resources/template/scenario-summary.ftl | 24 ++++++++-----------
.../AllStepsPageCollectionTest.java | 10 ++++----
.../pages/visitors/StepVisitorTest.java | 2 +-
examples/maven-example/pom.xml | 2 +-
maven/pom.xml | 4 ++--
pom.xml | 2 +-
11 files changed, 56 insertions(+), 41 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c416fa5..7e8526b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Back to [Readme](README.md).
+## [3.6.2] - 2024-03-25
+
+### Fixed
+
+* Sub sections can break the layout (#337)
+* Separate Karate steps were shown as one in the step summary (#331)
+
+### Changed
+
+* More pleasant layout of scenario times and previous test runs
+
## [3.6.1] - 2024-03-15
### Fixed
@@ -15,6 +26,7 @@ Back to [Readme](README.md).
* Html attachments could have a height of 0 on first load
### Changed
+
* Toggle buttons for all steps, hooks, attachments, outputs and sub sections have now specific "Hide" and "Show" labels
## [3.6.0] - 2024-03-14
@@ -859,6 +871,8 @@ the core component is now the reporting engine that is the base for other forms
Initial project version on GitHub and Maven Central.
+[3.6.2]: https://github.com/trivago/cluecumber-report-plugin/tree/v3.6.2ss
+
[3.6.1]: https://github.com/trivago/cluecumber-report-plugin/tree/v3.6.1
[3.6.0]: https://github.com/trivago/cluecumber-report-plugin/tree/v3.6.0
diff --git a/core/pom.xml b/core/pom.xml
index b05cd32e..b3a9aa38 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -6,13 +6,13 @@
4.0.0
cluecumber-core
- 3.6.1
+ 3.6.2
jar
cluecumber-parent
com.trivago.rta
- 3.6.1
+ 3.6.2
Cluecumber Core
diff --git a/engine/pom.xml b/engine/pom.xml
index 4e0215bc..a4f48f49 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -8,11 +8,11 @@
cluecumber-parent
com.trivago.rta
- 3.6.1
+ 3.6.2
cluecumber-engine
- 3.6.1
+ 3.6.2
jar
Cluecumber Engine
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 a57e7f9a..1af10882 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
@@ -278,7 +278,8 @@ public boolean equals(final Object o) {
return false;
}
Step step = (Step) o;
- return Objects.equals(getGlueMethodName(), step.getGlueMethodName());
+
+ return Objects.equals(getUniqueName(), step.getUniqueName());
}
/**
@@ -288,7 +289,7 @@ public boolean equals(final Object o) {
*/
@Override
public int hashCode() {
- return Objects.hash(getGlueMethodName());
+ return Objects.hash(getUniqueName());
}
/**
@@ -344,4 +345,8 @@ public boolean hasSubSections() {
public void setHasSubSections(boolean hasSubSections) {
this.hasSubSections = hasSubSections;
}
+
+ public String getUniqueName() {
+ return getGlueMethodName() + "_" + returnNameWithArgumentPlaceholders();
+ }
}
diff --git a/engine/src/main/resources/template/scenario-detail.ftl b/engine/src/main/resources/template/scenario-detail.ftl
index 991e05ed..39a01e0c 100644
--- a/engine/src/main/resources/template/scenario-detail.ftl
+++ b/engine/src/main/resources/template/scenario-detail.ftl
@@ -62,15 +62,15 @@ preheadlineLink="pages/feature-scenarios/feature_${element.featureIndex?c}.html"
@page.card>
<@page.card width="3" title="Scenario Info" subtitle="" classes="">
- <#if element.startTimestamp?has_content>
-
Start: ${element.startDateString} ${element.startTimeString}
- #if>
- <#if element.startTimestamp?has_content>
- End: ${element.endDateString} ${element.endTimeString}
- #if>
- Total: ${element.returnTotalDurationString()}
+
+ <#if element.startTimestamp?has_content>
+ Start
${element.startDateString} ${element.startTimeString}
+ #if>
+ <#if element.startTimestamp?has_content>
+ End
${element.endDateString} ${element.endTimeString}
+ #if>
+ Total
${element.returnTotalDurationString()}
+
<#if groupPreviousScenarioRuns && element.getIsLastOfMultipleScenarioRuns()>
@@ -172,7 +172,7 @@ preheadlineLink="pages/feature-scenarios/feature_${element.featureIndex?c}.html"
<#if (sectionChange > 0) >
<#list 1..sectionChange as n>
<#assign openDivs = openDivs + 1>
-
#list>
<#elseif (sectionChange < 0) >
@@ -270,7 +270,7 @@ preheadlineLink="pages/feature-scenarios/feature_${element.featureIndex?c}.html"
<#if (sectionChange > 0) >
<#list 1..sectionChange as n>
<#assign openDivs = openDivs + 1>
-
#list>
<#elseif (sectionChange < 0) >
diff --git a/engine/src/main/resources/template/scenario-summary.ftl b/engine/src/main/resources/template/scenario-summary.ftl
index aac49841..c03a264e 100644
--- a/engine/src/main/resources/template/scenario-summary.ftl
+++ b/engine/src/main/resources/template/scenario-summary.ftl
@@ -114,28 +114,24 @@ preheadlineLink=preheadlineLink>
<#if isGroupPreviousScenarioRuns() && hasNotLastRunScenarios() && !(scenarioSequence??)>
- (${totalNumberOfNotLastScenariosRuns} ${common.pluralizeFn("Scenario", totalNumberOfNotLastScenariosRuns)}
- were previous runs)
#if>
@page.card>
<@page.card width="3" title="Test Suite Info" subtitle="" classes="">
<#assign startDateTimeString = returnStartDateTimeString()>
- <#if startDateTimeString?has_content>
- -
- Start ${startDateTimeString}
- #if>
- <#assign endDateTimeString = returnEndDateTimeString()>
- <#if endDateTimeString?has_content>
- -
- End ${endDateTimeString}
- #if>
- -
- Total: ${totalDurationString}
+
-
+ <#if startDateTimeString?has_content>
+ Start
${startDateTimeString}
+ #if>
+ <#assign endDateTimeString = returnEndDateTimeString()>
+ <#if endDateTimeString?has_content>
+ End
${endDateTimeString}
+ #if>
+ Total
${totalDurationString}
@page.card>
diff --git a/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/AllStepsPageCollectionTest.java b/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/AllStepsPageCollectionTest.java
index 1234cacf..29e66050 100644
--- a/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/AllStepsPageCollectionTest.java
+++ b/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/pojos/pagecollections/AllStepsPageCollectionTest.java
@@ -30,7 +30,7 @@ public void getEmptyStepStatsTest() {
public void getStepStatsTest() {
allStepsPageCollection = new AllStepsPageCollection(getTestReports(), "");
Map
stepStats = allStepsPageCollection.getStepResultCounts();
- assertEquals(stepStats.size(), 2);
+ assertEquals(stepStats.size(), 3);
Step step1 = new Step();
step1.setName("step1");
@@ -49,16 +49,16 @@ public void getStepStatsTest() {
match2.setLocation("location2");
step2.setMatch(match2);
ResultCount step2Stats = stepStats.get(step2);
- assertEquals(step2Stats.getTotal(), 2);
+ assertEquals(step2Stats.getTotal(), 1);
assertEquals(step2Stats.getPassed(), 1);
assertEquals(step2Stats.getFailed(), 0);
- assertEquals(step2Stats.getSkipped(), 1);
+ assertEquals(step2Stats.getSkipped(), 0);
}
@Test
public void getStepResultsTest() {
allStepsPageCollection = new AllStepsPageCollection(getTestReports(), "");
- assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 2);
+ assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 3);
assertEquals(allStepsPageCollection.getTotalNumberOfFailed(), 1);
assertEquals(allStepsPageCollection.getTotalNumberOfPassed(), 1);
assertEquals(allStepsPageCollection.getTotalNumberOfSkipped(), 1);
@@ -73,7 +73,7 @@ public void getTotalNumberOfStepScenariosTest() {
@Test
public void getTotalNumberOfStepsTest() {
allStepsPageCollection = new AllStepsPageCollection(getTestReports(), "");
- assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 2);
+ assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 3);
}
@Test
diff --git a/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/visitors/StepVisitorTest.java b/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/visitors/StepVisitorTest.java
index 7e99b4ec..2eebbabf 100644
--- a/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/visitors/StepVisitorTest.java
+++ b/engine/src/test/java/com/trivago/cluecumber/engine/rendering/pages/visitors/StepVisitorTest.java
@@ -37,6 +37,6 @@ public void visitTest() throws CluecumberException {
verify(fileIo, times(1))
.writeContentToFile("MyRenderedSteps", "dummyPath/pages/step-summary.html");
verify(fileIo, times(1))
- .writeContentToFile("MyRenderedScenarios", "dummyPath/pages/step-scenarios/step_31.html");
+ .writeContentToFile("MyRenderedScenarios", "dummyPath/pages/step-scenarios/step_732281846.html");
}
}
\ No newline at end of file
diff --git a/examples/maven-example/pom.xml b/examples/maven-example/pom.xml
index fe323233..8ac4269b 100644
--- a/examples/maven-example/pom.xml
+++ b/examples/maven-example/pom.xml
@@ -6,7 +6,7 @@
blog.softwaretester
maven-example
- 3.6.1
+ 3.6.2
pom
diff --git a/maven/pom.xml b/maven/pom.xml
index 5ec7e210..d0483b0c 100644
--- a/maven/pom.xml
+++ b/maven/pom.xml
@@ -7,12 +7,12 @@
cluecumber-maven
maven-plugin
- 3.6.1
+ 3.6.2
cluecumber-parent
com.trivago.rta
- 3.6.1
+ 3.6.2
Cluecumber Maven
diff --git a/pom.xml b/pom.xml
index a66acb4a..75dd3e33 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
com.trivago.rta
cluecumber-parent
- 3.6.1
+ 3.6.2
pom
Cluecumber Parent