Skip to content

Commit

Permalink
#132 added back link (for index page) to Spec reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoathaydes committed Mar 26, 2018
1 parent 0b9b84c commit 4a5af14
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ import org.spockframework.runtime.model.IterationInfo
import org.spockframework.runtime.model.SpecElementInfo
import org.spockframework.runtime.model.Tag
import spock.lang.Ignore
import spock.lang.Issue
import spock.lang.PendingFeature
import spock.lang.See
import spock.lang.Title

import java.lang.annotation.Annotation

/**
*
* User: Renato
Expand Down Expand Up @@ -136,6 +132,9 @@ class HtmlReportCreator extends AbstractHtmlCreator<SpecData>

@Override
void writeSummary( MarkupBuilder builder, SpecData data ) {
builder.div( 'class': 'back-link' ) {
a( href: 'index.html', '<< Back' )
}
builder.div( 'class': 'summary-report' ) {
h3 'Summary:'
builder.div( 'class': 'date-test-ran', whenAndWho.whenAndWhoRanTest( stringFormatter ) )
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/spock-feature-report.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ h3 {
font-weight: 200;
}

.back-link {
font-size: small;
}

table {
margin: 5px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<body>
<h2>Report for ${classOnTest}</h2>
<hr></hr>
<div class='back-link'>
<a href='index.html'>&lt;&lt; Back</a>
</div>
<div class='summary-report'>
<h3>Summary:</h3>
<div class='date-test-ran'>Created on ${dateTestRan} by ${username}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<body>
<h2>Report for ${classOnTest}</h2>
<hr></hr>
<div class='back-link'>
<a href='index.html'>&lt;&lt; Back</a>
</div>
<div class='summary-report'>
<h3>Summary:</h3>
<div class='date-test-ran'>Created on ${dateTestRan} by ${username}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<body>
<h2>Report for com.athaydes.spockframework.report.UnrolledSpec</h2>
<hr></hr>
<div class='back-link'>
<a href='index.html'>&lt;&lt; Back</a>
</div>
<div class='summary-report'>
<h3>Summary:</h3>
<div class='date-test-ran'>Created on ${dateTestRan} by ${username}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<body>
<h2>Report for ${classOnTest}</h2>
<hr></hr>
<div class='back-link'>
<a href='index.html'>&lt;&lt; Back</a>
</div>
<div class='summary-report'>
<h3>Summary:</h3>
<div class='date-test-ran'>Created on ${dateTestRan} by ${username}</div>
Expand Down

0 comments on commit 4a5af14

Please sign in to comment.