| as yet unclassified |
| testAnswer
|
self newApplicationWithRootClass: SCTestComponent4.
self establishSession.
self followAnchor: (self lastResponse anchorWithLabel: 'third link').
self assert: (self componentAnswered: 1234)
|
| testBack
|
self newApplicationWithRootClass: SCTestComponent4.
self establishSession.
self followAnchor: (self lastResponse anchorWithLabel: 'first link').
self assert: self component firstSent.
self deny: self component secondSent.
self followAnchor: (self lastResponse anchorWithLabel: 'second link').
self backAndRefresh.
self assert: self component firstSent.
self deny: self component secondSent
|
| testComponent1
|
self newApplicationWithRootClass: SCTestComponent1.
self establishSession.
self assert: (self lastResponse stringTaggedWithId: 'main') = 'hello'
|
| testComponent2
|
self newApplicationWithRootClass: SCTestComponent2.
self establishSession.
self followAnchor: (self lastResponse anchorWithId: 'first').
self assert: self component firstSent.
self deny: self component secondSent.
self followAnchor: (self lastResponse anchorWithLabel: 'second link').
self assert: self component firstSent.
self assert: self component secondSent
|
| testComponent3
|
| form |
self newApplicationWithRootClass: SCTestComponent3.
self establishSession.
form := self lastResponse forms first.
form textInputWithId: 'field1' value: 'bob'.
form textInputWithId: 'field2' value: 'jane'.
self submitForm: form pressingButton: form buttons first.
self assert: self component field1 = 'bob'.
self assert: self component field2 = 'jane'
|
| testFrontMost
|
self newApplicationWithRootClass: SCTestComponent5.
self establishSession.
self assert: (self frontMostComponent isKindOf: SCTestComponent5).
self followAnchor: self lastResponse anchors first.
self assert: (self frontMostComponent isKindOf: SCTestComponent4).
self followAnchor: (self lastResponse anchorWithLabel: 'third link').
self assert: (self frontMostComponent isKindOf: SCTestComponent5)
|