SCTestRunner


SeasideTesting-TestRunner

Comment:



Hierarchy:

ProtoObject
Object
WAPresenter
WAComponent
SCTestRunner

Summary:

instance variables:

case result

methods:

instance class
as yet unclassified initialization rendering instance creation

Detail:

instance variables:

case
result

instance methods:

as yet unclassified
viewHistoryFor: aTestCase

	self call: (SCBrowserHistoryView forBrowser: aTestCase browser)

initialization
initializeForCase: aTestCase
 
	case := aTestCase.
	result := aTestCase run

rendering
renderBrowserAnchorFor: aTestCase on: html
 
	| browser |
	html
		anchorWithPopupAction: [browser _ WABrowser fullOnClass: aTestCase class.
			browser model selectedMessageName: aTestCase selector.
			self call: browser]
		extent: 825@560
		text: 'Browse'
renderContentOn: html
 
	html heading: case name level: 2.
	html text: result printString.
	html hr.
	self renderFailedOn: html.
	self renderErrorOn: html.
	self renderPassedOn: html.
	html br.
	html
		anchorWithAction: [self answer]
		text: 'close'
renderErrorOn: html
 
	html heading: 'Errors:' level: 3.
	result errors
		do: [:each | 
			html cssClass: 'error-test'.
			html
				span: [html text: each printString].
			html space.
			html
				anchorWithAction: [each debug]
				text: 'Debug'.
			html space.
			self renderBrowserAnchorFor: each on: html.
			html space.
			self renderHistoryAnchorFor: each on: html.
			html br].
	html hr
renderFailedOn: html
 
	html heading: 'Failed:' level: 3.
	result failures
		do: [:each | 
			html cssClass: 'failed-test'.
			html span: each printString.
			html space.
			html
				anchorWithAction: [each debugAsFailure]
				text: 'Debug'.
			html space.
			self renderBrowserAnchorFor: each on: html.
			html space.
			self renderHistoryAnchorFor: each on: html.
			html br].
	html hr
renderHistoryAnchorFor: aCase on: html

	html anchorWithAction: [self viewHistoryFor: aCase] text: 'History'
renderPassedOn: html
 
	html heading: 'Passed:' level: 3.
	result passed
		do: [:each | 
			html cssClass: 'passed-test'.
			html span: each printString.
			html space.
			self renderBrowserAnchorFor: each on: html.
			html space.
			self renderHistoryAnchorFor: each on: html.
			html br].
	html hr

class methods:

instance creation
forCase: aTestCase

	^ self new initializeForCase: aTestCase

^top


- made by Dandelion -