Skip to content

Commit

Permalink
and put the html content in an iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
alltonp committed May 18, 2015
1 parent cc02d58 commit e685508
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/im/mange/driveby/report/Reporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ object Reporter {
val htmlFilename = new File(actualPath + "capture/" + uniqueName + ".html")
FileUtils.writeStringToFile(htmlFilename, browser.html)

val content = report(message, screenshotFilename, example, browser.html)
val content = report(message, screenshotFilename, example, htmlFilename)
FileUtils.writeStringToFile(new File(actualPath + uniqueName + ".html"), content.toString())
}

private def report(message: String, screenshot: File, example: Example, html: String) =
private def report(message: String, screenshot: File, example: Example, html: File) =
//TODO: include spec name and example desc in report
<body>
<h3>{example.description}</h3>
<p>{fmt.print(new DateTime)}: <b>{message}</b></p><hr/>
<img src={"screenshot/" + screenshot.getName}/><hr/>
<p>{scala.xml.Unparsed(renderEvents(example.id))}</p><hr/>
<p>{scala.xml.Unparsed(html)}</p>
<iframe frameborder="0" src={s"screenshot/${html.getName}"}></iframe>
</body>

private def renderEvents(exampleId: Long): String = {
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/im/mange/WebSpecificationSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object WebSpecificationSuite {
DriveByConfig.browserInstances = instancesForParallel

//Noise on
DriveByConfig.reportAlways = true
// DriveByConfig.reportAlways = true
// DriveByConfig.trackingFullDump = true
// DriveByConfig.trackingVerbose = true

Expand Down

0 comments on commit e685508

Please sign in to comment.