Visually separate core and package specs in reporter

This commit is contained in:
Kevin Sawicki
2013-08-07 09:31:26 -07:00
parent 4ef3f39a7b
commit def07344e9
3 changed files with 25 additions and 2 deletions

View File

@@ -21,7 +21,10 @@ class AtomReporter extends View
@div id: 'HTMLReporter', class: 'jasmine_reporter', =>
@div outlet: 'specPopup', class: "spec-popup"
@div outlet: "suites"
@ul outlet: "symbolSummary", class: 'symbolSummary list-unstyled'
@div outlet: 'coreHeader', class: 'symbolHeader'
@ul outlet: 'coreSummary', class: 'symbolSummary list-unstyled'
@div outlet: 'packagesHeader', class: 'symbolHeader'
@ul outlet: 'packagesSummary', class: 'symbolSummary list-unstyled'
@div outlet: "status", class: 'status', =>
@div outlet: "time", class: 'time'
@div outlet: "specCount", class: 'spec-count'
@@ -118,9 +121,19 @@ class AtomReporter extends View
@time.text "#{time[0...-2]}.#{time[-2..]}s"
addSpecs: (specs) ->
coreSpecs = 0
packageSpecs = 0
for spec in specs
symbol = $$ -> @li class: "spec-summary pending spec-summary-#{spec.id}"
@symbolSummary.append symbol
if spec.coreSpec
coreSpecs++
@coreSummary.append symbol
else
packageSpecs++
@packagesSummary.append symbol
@coreHeader.text("Core Specs (#{coreSpecs}):")
@packagesHeader.text("Package Specs (#{packageSpecs}):")
specStarted: (spec) ->
@runningSpecCount++

View File

@@ -9,6 +9,8 @@ measure 'spec suite require time', ->
for specPath in fsUtils.listTreeSync(fsUtils.resolveOnLoadPath("spec")) when /-spec\.coffee$/.test specPath
require specPath
spec.coreSpec = true for spec in jasmine.getEnv().currentRunner().specs()
# Run extension specs
for packageDirPath in config.packageDirPaths
for packagePath in fsUtils.listSync(packageDirPath)

View File

@@ -22,6 +22,14 @@ body {
#HTMLReporter { font-size: 11px; font-family: Monaco, monospace; line-height: 1.6em; color: #333333; }
#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
#HTMLReporter .symbolHeader {
background-color: #222;
color: #c2c2c2;
font-size: 12px;
margin: 0;
padding: 5px 2px 2px 2px;
}
#HTMLReporter .symbolSummary {
background-color: #222;
overflow: hidden;