Skip to content

Commit

Permalink
HTML5 Report: add expansion indicator icon to scenarios and cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Schäfer committed May 4, 2015
1 parent f86e89e commit 07786d6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
15 changes: 14 additions & 1 deletion jgiven-html5-report/src/app/css/jgivenreport.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ h5 {
font-size: 1.1rem;
margin-top: 0.5rem;
margin-bottom: 0;
margin-left: 0.5rem;
}

.header-fixed {
Expand Down Expand Up @@ -79,6 +80,18 @@ ul.tags {
display: none;
}

.scenario-expand-icon, .case-expand-icon {
color: gray;
}

.scenario-expand-icon {
width: 0.8rem;
}

.case-expand-icon {
width: 1rem;
}

.scenario:hover .scenario-link-icon {
display: inline;
position: absolute;
Expand All @@ -90,7 +103,7 @@ ul.tags {
.steps {
list-style-type: none;
padding-top: 0.5rem;
margin-left: 0.5rem;
margin-left: 1.3rem;
}

.has-tip {
Expand Down
8 changes: 8 additions & 0 deletions jgiven-html5-report/src/app/css/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
page-break-after: auto;
}

.scenario-expand-icon, .case-expand-icon {
display: none !important;
}

.steps, h5 {
margin-left: 0;
}

a {
text-decoration: none !important;
}
Expand Down
5 changes: 3 additions & 2 deletions jgiven-html5-report/src/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h4 ng-hide="!currentPage.loading">Loading <i class="fa fa-circle-o-notch fa-spi
<div class="row">
<div class="small-12 large-8 xlarge-6 column">
<a href="#scenario/{{scenario.className}}/{{scenario.testMethodName}}"><i class="fa fa-link scenario-link-icon" title="Direct link to this scenario"></i></a>
<h4 class="toggle" ng-click="toggleScenario(scenario)">{{scenario.description.capitalize()}}
<h4 class="toggle" ng-click="toggleScenario(scenario)"><i class="fa {{scenario.expanded ? 'fa-angle-down' : 'fa-angle-right'}} scenario-expand-icon"></i> {{scenario.description.capitalize()}}
<span ng-if="scenario.scenarioCases.length > 1" class="secondary radius label case-count">{{scenario.scenarioCases.length}}</span>
<i ng-if="scenario.executionStatus === 'SUCCESS'" class="check fa fa-check-square"></i>
<span ng-if="scenario.executionStatus === 'FAILED'" class="failed label radius alert">FAILED</span>
Expand All @@ -226,7 +226,8 @@ <h4 class="toggle" ng-click="toggleScenario(scenario)">{{scenario.description.ca
</h4>
<div ng-if="scenario.expanded || currentPage.print || currentPage.embed" id="scenario-{{$index}}" class="scenario-content">
<div ng-repeat="case in scenario.casesAsTable ? [scenario.scenarioCases[0]] : scenario.scenarioCases">
<h5 class="toggle" ng-click="case.expanded = !case.expanded" ng-if="scenario.scenarioCases.length > 1 && !scenario.casesAsTable">Case {{case.caseNr}}:
<h5 class="toggle" ng-click="case.expanded = !case.expanded" ng-if="scenario.scenarioCases.length > 1 && !scenario.casesAsTable">
<i class="fa {{case.expanded ? 'fa-angle-down' : 'fa-angle-right'}} case-expand-icon"></i>Case {{case.caseNr}}:
<span ng-repeat="param in scenario.explicitParameters">
{{param}} = {{case.explicitArguments[$index]}}<span ng-if="$index != scenario.explicitParameters.length - 1">, </span>
</span>
Expand Down

0 comments on commit 07786d6

Please sign in to comment.