Sha256: 3036c7af246d7b36d3702f81d47712ab6c10a14bb71ef292d857ec9e694417c6
Contents?: true
Size: 997 Bytes
Versions: 19
Compression:
Stored size: 997 Bytes
Contents
class Teabag.Reporters.HTML.SuiteView extends Teabag.Reporters.BaseView viewId = 0 constructor: (@suite, @reporter) -> @views = @reporter.views @suite.viewId = viewId += 1 @views.suites[@suite.viewId] = @ @suite = new Teabag.Suite(suite) super build: -> super("suite") @el.innerHTML = """<h1><a href="#{@suite.link}">#{@suite.description}</a></h1>""" @parentView = @buildParent() @parentView.append(@el) buildParent: -> parent = @suite.parent return @reporter unless parent if parent.viewId @views.suites[parent.viewId] else view = new Teabag.Reporters.HTML.SuiteView(parent, @reporter) @views.suites[view.suite.viewId] = view append: (el) -> super(@ol = @createEl("ol")) unless @ol @ol.appendChild(el) updateState: (state) -> return if @state == "failed" @el.className = "#{@el.className.replace(/\s?state-\w+/, "")} state-#{state}" @parentView.updateState?(state) @state = state
Version data entries
19 entries across 19 versions & 1 rubygems