Skip to content

Commit

Permalink
3.6.2 (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
bischoffdev authored Mar 25, 2024
1 parent c6fe164 commit 1fac4ce
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 41 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cluecumber-core</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<packaging>jar</packaging>

<parent>
<artifactId>cluecumber-parent</artifactId>
<groupId>com.trivago.rta</groupId>
<version>3.6.1</version>
<version>3.6.2</version>
</parent>

<name>Cluecumber Core</name>
Expand Down
4 changes: 2 additions & 2 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<parent>
<artifactId>cluecumber-parent</artifactId>
<groupId>com.trivago.rta</groupId>
<version>3.6.1</version>
<version>3.6.2</version>
</parent>

<artifactId>cluecumber-engine</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<packaging>jar</packaging>

<name>Cluecumber Engine</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/**
Expand All @@ -288,7 +289,7 @@ public boolean equals(final Object o) {
*/
@Override
public int hashCode() {
return Objects.hash(getGlueMethodName());
return Objects.hash(getUniqueName());
}

/**
Expand Down Expand Up @@ -344,4 +345,8 @@ public boolean hasSubSections() {
public void setHasSubSections(boolean hasSubSections) {
this.hasSubSections = hasSubSections;
}

public String getUniqueName() {
return getGlueMethodName() + "_" + returnNameWithArgumentPlaceholders();
}
}
22 changes: 11 additions & 11 deletions engine/src/main/resources/template/scenario-detail.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
<li class="list-group-item"><span
class="small">Start:</span> ${element.startDateString} ${element.startTimeString}</li>
</#if>
<#if element.startTimestamp?has_content>
<li class="list-group-item"><span
class="small">End:</span> ${element.endDateString} ${element.endTimeString}</li>
</#if>
<li class="list-group-item"><span class="small">Total:</span> ${element.returnTotalDurationString()}</li>
<li class="list-group-item">
<#if element.startTimestamp?has_content>
<b>Start</b><br>${element.startDateString} ${element.startTimeString}<br>
</#if>
<#if element.startTimestamp?has_content>
<b>End</b><br>${element.endDateString} ${element.endTimeString}<br>
</#if>
<b>Total</b><br>${element.returnTotalDurationString()}
</li>
<#if groupPreviousScenarioRuns && element.getIsLastOfMultipleScenarioRuns()>
<hr>
<div class="alert alert-info" role="alert">
Expand Down Expand Up @@ -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>
<div style="margin-left: 2em;" id="section_${step?counter}"
<div style="padding-left: 2em;" id="section_${step?counter}"
class="scenarioSubSection collapse ${expandSubSections?then("show", "")}">
</#list>
<#elseif (sectionChange < 0) >
Expand Down Expand Up @@ -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>
<div style="margin-left: 2em;" id="section_${step?counter}"
<div style="padding-left: 2em;" id="section_${step?counter}"
class="scenarioSubSection collapse ${expandSubSections?then("show", "")}">
</#list>
<#elseif (sectionChange < 0) >
Expand Down
24 changes: 10 additions & 14 deletions engine/src/main/resources/template/scenario-summary.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,24 @@ preheadlineLink=preheadlineLink>
</ul>
<#if isGroupPreviousScenarioRuns() && hasNotLastRunScenarios() && !(scenarioSequence??)>
<hr>
(${totalNumberOfNotLastScenariosRuns} ${common.pluralizeFn("Scenario", totalNumberOfNotLastScenariosRuns)}
were previous runs)
<button class="btn w-75 m-2 collapsed" type="button" data-toggle="collapse"
aria-expanded="true" data-cluecumber-item="show-not-last-runs-button"
data-target=".notLastRun">Toggle Previous Test Runs
data-target=".notLastRun">Toggle ${totalNumberOfNotLastScenariosRuns} Previous Test Runs
</button>
</#if>
</@page.card>
<@page.card width="3" title="Test Suite Info" subtitle="" classes="">
<ul class="list-group list-group-flush">
<#assign startDateTimeString = returnStartDateTimeString()>
<#if startDateTimeString?has_content>
<li class="list-group-item" data-cluecumber-item="total-start">
<span class="small">Start</span> ${startDateTimeString}</li>
</#if>
<#assign endDateTimeString = returnEndDateTimeString()>
<#if endDateTimeString?has_content>
<li class="list-group-item" data-cluecumber-item="total-end">
<span class="small">End</span> ${endDateTimeString}</li>
</#if>
<li class="list-group-item" data-cluecumber-item="total-runtime">
<span class="small">Total:</span> ${totalDurationString}
<li class="list-group-item" data-cluecumber-item="total-start">
<#if startDateTimeString?has_content>
<b>Start</b><br>${startDateTimeString}<br>
</#if>
<#assign endDateTimeString = returnEndDateTimeString()>
<#if endDateTimeString?has_content>
<b>End</b><br>${endDateTimeString}<br>
</#if>
<b>Total</b><br>${totalDurationString}
</li>
</ul>
</@page.card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void getEmptyStepStatsTest() {
public void getStepStatsTest() {
allStepsPageCollection = new AllStepsPageCollection(getTestReports(), "");
Map<Step, ResultCount> stepStats = allStepsPageCollection.getStepResultCounts();
assertEquals(stepStats.size(), 2);
assertEquals(stepStats.size(), 3);

Step step1 = new Step();
step1.setName("step1");
Expand All @@ -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);
Expand All @@ -73,7 +73,7 @@ public void getTotalNumberOfStepScenariosTest() {
@Test
public void getTotalNumberOfStepsTest() {
allStepsPageCollection = new AllStepsPageCollection(getTestReports(), "");
assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 2);
assertEquals(allStepsPageCollection.getTotalNumberOfSteps(), 3);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
2 changes: 1 addition & 1 deletion examples/maven-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>blog.softwaretester</groupId>
<artifactId>maven-example</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<packaging>pom</packaging>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<artifactId>cluecumber-maven</artifactId>
<packaging>maven-plugin</packaging>
<version>3.6.1</version>
<version>3.6.2</version>

<parent>
<artifactId>cluecumber-parent</artifactId>
<groupId>com.trivago.rta</groupId>
<version>3.6.1</version>
<version>3.6.2</version>
</parent>

<name>Cluecumber Maven</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.trivago.rta</groupId>
<artifactId>cluecumber-parent</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<packaging>pom</packaging>

<name>Cluecumber Parent</name>
Expand Down

0 comments on commit 1fac4ce

Please sign in to comment.