Skip to content

Commit

Permalink
Show all scenarios when sequence is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
gdonati78 committed Nov 2, 2023
1 parent 1eddaf8 commit b629bd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions engine/src/main/resources/template/macros/scenario.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ limitations under the License.
<#if (skippedRequested && element.skipped) || (failedRequested && element.failed) || (passedRequested && element.passed) || allRequested>
<#assign isLastOfMultipleScenarioRuns = element.getIsLastOfMultipleScenarioRuns()>
<#assign isNotLastOfMultipleScenarioRuns = element.getIsNotLastOfMultipleScenarioRuns()>
<#if !isShowOnlyLastRuns() || (isShowOnlyLastRuns() && !isNotLastOfMultipleScenarioRuns)>
<#if !isShowOnlyLastRuns() || (isShowOnlyLastRuns() && !isNotLastOfMultipleScenarioRuns) || allRequested>
<tr class="table-row-${element.status.statusString}">
<#if allRequested>
<td class="text-right">${element.scenarioIndex}</td>
Expand All @@ -110,14 +110,16 @@ limitations under the License.
<#if element.firstExceptionClass != "">
<p class="firstException text-left small text-gray" style="word-break: break-word">${element.firstExceptionClass}</p>
</#if>
<#list element.getChildrenElements() as childElement>
<div class="notLastRun collapse">
/-- <a href="pages/scenario-detail/scenario_${childElement.scenarioIndex?c}.html" style="word-break: break-all">Previous run - started at: ${childElement.startDateString} - ${childElement.startTimeString} <@common.status status=childElement.status.statusString/></a>
<#if childElement.firstExceptionClass != "">
<p class="firstException text-left small text-gray" style="word-break: break-word">${childElement.firstExceptionClass}</p>
</#if>
</div>
</#list>
<#if isShowOnlyLastRuns() && isLastOfMultipleScenarioRuns && !allRequested>
<#list element.getChildrenElements() as childElement>
<div class="notLastRun collapse">
/-- <a href="pages/scenario-detail/scenario_${childElement.scenarioIndex?c}.html" style="word-break: break-all">Previous run - started at: ${childElement.startDateString} - ${childElement.startTimeString} <@common.status status=childElement.status.statusString/></a>
<#if childElement.firstExceptionClass != "">
<p class="firstException text-left small text-gray" style="word-break: break-word">${childElement.firstExceptionClass}</p>
</#if>
</div>
</#list>
</#if>
</td>
<td class="text-center small" data-order="${element.startTimestamp}">
${element.startDateString}<br>${element.startTimeString}
Expand All @@ -132,7 +134,7 @@ limitations under the License.
</#if>
</#if>
</#list>
</#list>
</#list>
</tbody>
</table>
</div>
Expand Down
4 changes: 2 additions & 2 deletions engine/src/main/resources/template/scenario-summary.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ preheadlineLink=preheadlineLink>
skipped</a> <@common.status status="skipped"/>
</#if>
</li>
<#if isShowOnlyLastRuns() && hasNotLastRunScenarios()>
<#if isShowOnlyLastRuns() && hasNotLastRunScenarios() && !(scenarioSequence??)>
<li class="list-group-item" data-cluecumber-item="scenario-summary">
Of which:
<br>
${totalNumberOfNotLastScenariosRuns} ${common.pluralizeFn("Scenario", totalNumberOfNotLastScenariosRuns)} were not first runs
</li>
</#if>
</ul>
<#if isShowOnlyLastRuns() && hasNotLastRunScenarios()>
<#if isShowOnlyLastRuns() && hasNotLastRunScenarios() && !(scenarioSequence??)>
<button class="btn btn-outline-secondary btn-block collapsed" type="button" data-toggle="collapse"
aria-expanded="true" data-cluecumber-item="show-not-last-runs-button"
data-target=".notLastRun">not last runs
Expand Down

0 comments on commit b629bd6

Please sign in to comment.