Skip to content

Commit

Permalink
Added identifier facilities to image web views
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabacman committed Jul 1, 2024
1 parent 174be5a commit 91d317b
Show file tree
Hide file tree
Showing 248 changed files with 2,746 additions and 2,230 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #AddTimestampToSourceCommandTest,
#superclass : #BWRenderingTest,
#category : #'Willow-Core-Tests-Frontend'
#name : 'AddTimestampToSourceCommandTest',
#superclass : 'BWRenderingTest',
#category : 'Willow-Core-Tests-Frontend',
#package : 'Willow-Core-Tests',
#tag : 'Frontend'
}

{ #category : #'tests-processing' }
{ #category : 'tests-processing' }
AddTimestampToSourceCommandTest >> testApplyToOn [

| html upToTime afterTime |
Expand Down
24 changes: 13 additions & 11 deletions source/Willow-Core-Tests/AjaxAwareErrorHandlerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
An AjaxAwareErrorHandlerTest is a test class for testing the behavior of AjaxAwareErrorHandler
"
Class {
#name : #AjaxAwareErrorHandlerTest,
#superclass : #WAErrorHandlerTest,
#category : #'Willow-Core-Tests-Applications'
#name : 'AjaxAwareErrorHandlerTest',
#superclass : 'WAErrorHandlerTest',
#category : 'Willow-Core-Tests-Applications',
#package : 'Willow-Core-Tests',
#tag : 'Applications'
}

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> createHttpXmlRequestContext [

| request |
Expand All @@ -21,7 +23,7 @@ AjaxAwareErrorHandlerTest >> createHttpXmlRequestContext [
^ WARequestContext request: request response: WABufferedResponse new
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> handlerClass [

^ AjaxAwareErrorHandlerFactory new
Expand All @@ -30,7 +32,7 @@ AjaxAwareErrorHandlerTest >> handlerClass [
yourself
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testAssertionFailed [

| context reportingActionWasEvaluated updateRootBlockWasEvaluated renderingBlockWasEvaluated |
Expand Down Expand Up @@ -60,7 +62,7 @@ AjaxAwareErrorHandlerTest >> testAssertionFailed [
self fail
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testHandleErrorInAjaxCall [

| context |
Expand All @@ -76,7 +78,7 @@ AjaxAwareErrorHandlerTest >> testHandleErrorInAjaxCall [
self fail
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testHandlerErrorInAjaxCallReferencingHandler [

| context ajaxHandlerWasEvaluated |
Expand All @@ -93,7 +95,7 @@ AjaxAwareErrorHandlerTest >> testHandlerErrorInAjaxCallReferencingHandler [
self assert: ajaxHandlerWasEvaluated
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testReportingActionArgumentsAreOptional [

| context reportingActionWasEvaluated |
Expand All @@ -117,7 +119,7 @@ AjaxAwareErrorHandlerTest >> testReportingActionArgumentsAreOptional [
self fail
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testXmlHttpRequest [

| context |
Expand All @@ -131,7 +133,7 @@ AjaxAwareErrorHandlerTest >> testXmlHttpRequest [
do: [ :n | self fail ]
]

{ #category : #accessing }
{ #category : 'accessing' }
AjaxAwareErrorHandlerTest >> testXmlHttpRequestWithResumable [

| context handlerWasEvaluated |
Expand Down
18 changes: 10 additions & 8 deletions source/Willow-Core-Tests/AlertingCommandTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,42 @@
An AlertingCommandTest is a test class for testing the behavior of AlertingCommand
"
Class {
#name : #AlertingCommandTest,
#superclass : #BWRenderingTest,
#name : 'AlertingCommandTest',
#superclass : 'BWRenderingTest',
#instVars : [
'command'
],
#category : #'Willow-Core-Tests-WebInteraction'
#category : 'Willow-Core-Tests-WebInteraction',
#package : 'Willow-Core-Tests',
#tag : 'WebInteraction'
}

{ #category : #initialization }
{ #category : 'initialization' }
AlertingCommandTest >> setUp [

super setUp.
command := AlertingCommand stating: 'Great!'
]

{ #category : #'tests-accessing' }
{ #category : 'tests-accessing' }
AlertingCommandTest >> testModelLoadingInstructions [

self assert: command modelLoadingInstructions isEmpty
]

{ #category : #'tests-accessing' }
{ #category : 'tests-accessing' }
AlertingCommandTest >> testPriorityActions [

self assert: command priorityActions isEmpty
]

{ #category : #'tests-testing' }
{ #category : 'tests-testing' }
AlertingCommandTest >> testRequiresSerialization [

self deny: command requiresSerialization
]

{ #category : #'tests-accessing' }
{ #category : 'tests-accessing' }
AlertingCommandTest >> testServerIndependentInstructions [

| html |
Expand Down
16 changes: 9 additions & 7 deletions source/Willow-Core-Tests/AsynchronicButtonWebViewTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
An AsynchronicButtonWebViewTest is a test class for testing the behavior of AsynchronicButtonWebView
"
Class {
#name : #AsynchronicButtonWebViewTest,
#superclass : #BWRenderingTest,
#category : #'Willow-Core-Tests-WebViews'
#name : 'AsynchronicButtonWebViewTest',
#superclass : 'BWRenderingTest',
#category : 'Willow-Core-Tests-WebViews',
#package : 'Willow-Core-Tests',
#tag : 'WebViews'
}

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
AsynchronicButtonWebViewTest >> testBeIdentifiable [

| button html |
Expand All @@ -18,7 +20,7 @@ AsynchronicButtonWebViewTest >> testBeIdentifiable [
self assert: html equals: '<button id="button-id1" type="button">Click me!</button>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
AsynchronicButtonWebViewTest >> testIdentifierOn [

| button html |
Expand All @@ -34,7 +36,7 @@ AsynchronicButtonWebViewTest >> testIdentifierOn [
self assert: html equals: '<button id="button-id1" type="button">Click me!</button>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
AsynchronicButtonWebViewTest >> testOn [

| button html |
Expand All @@ -48,7 +50,7 @@ AsynchronicButtonWebViewTest >> testOn [
'<button id="button-id1" type="button">Click me!</button><script type="text/javascript">$("#button-id1").click(function(event){$(this).prop("disabled",true)});</script>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
AsynchronicButtonWebViewTest >> testRenderContentOn [

| button html |
Expand Down
10 changes: 6 additions & 4 deletions source/Willow-Core-Tests/AutoFocusComponentCommandTest.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #AutoFocusComponentCommandTest,
#superclass : #BWRenderingTest,
#category : #'Willow-Core-Tests-Frontend'
#name : 'AutoFocusComponentCommandTest',
#superclass : 'BWRenderingTest',
#category : 'Willow-Core-Tests-Frontend',
#package : 'Willow-Core-Tests',
#tag : 'Frontend'
}

{ #category : #'tests-processing' }
{ #category : 'tests-processing' }
AutoFocusComponentCommandTest >> testApplyToOn [

| html |
Expand Down
22 changes: 12 additions & 10 deletions source/Willow-Core-Tests/BinaryChoiceWebViewTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,35 @@
I'm an abstract test case for views implementing the binary choice API
"
Class {
#name : #BinaryChoiceWebViewTest,
#superclass : #BWRenderingTest,
#name : 'BinaryChoiceWebViewTest',
#superclass : 'BWRenderingTest',
#instVars : [
'notificationWasReceived'
],
#category : #'Willow-Core-Tests-WebViews'
#category : 'Willow-Core-Tests-WebViews',
#package : 'Willow-Core-Tests',
#tag : 'WebViews'
}

{ #category : #testing }
{ #category : 'testing' }
BinaryChoiceWebViewTest class >> isAbstract [

^self name = #BinaryChoiceWebViewTest
]

{ #category : #support }
{ #category : 'support' }
BinaryChoiceWebViewTest >> changeNotifiedBy: aCheckboxWebView [

notificationWasReceived := true
]

{ #category : #support }
{ #category : 'support' }
BinaryChoiceWebViewTest >> newBinaryChoiceView [

^self subclassResponsibility
]

{ #category : #'tests-Binary Choice-API' }
{ #category : 'tests-Binary Choice-API' }
BinaryChoiceWebViewTest >> testAllows [

| binaryChoiceView |
Expand All @@ -41,7 +43,7 @@ BinaryChoiceWebViewTest >> testAllows [
deny: (binaryChoiceView allows: 1)
]

{ #category : #'tests-Binary Choice-API' }
{ #category : 'tests-Binary Choice-API' }
BinaryChoiceWebViewTest >> testControlSelection [

| binaryChoiceView |
Expand All @@ -58,7 +60,7 @@ BinaryChoiceWebViewTest >> testControlSelection [
self deny: binaryChoiceView currentSelection
]

{ #category : #'tests-Binary Choice-API' }
{ #category : 'tests-Binary Choice-API' }
BinaryChoiceWebViewTest >> testCurrentSelection [

| binaryChoiceView |
Expand All @@ -74,7 +76,7 @@ BinaryChoiceWebViewTest >> testCurrentSelection [
self assert: binaryChoiceView currentSelection
]

{ #category : #'tests-Binary Choice-API' }
{ #category : 'tests-Binary Choice-API' }
BinaryChoiceWebViewTest >> testNotifyChangesWhenSelectionChanged [

| binaryChoiceView |
Expand Down
22 changes: 12 additions & 10 deletions source/Willow-Core-Tests/CheckboxWebViewTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
A CheckboxWebViewTest is a test class for testing the behavior of CheckboxWebView
"
Class {
#name : #CheckboxWebViewTest,
#superclass : #BinaryChoiceWebViewTest,
#category : #'Willow-Core-Tests-WebViews'
#name : 'CheckboxWebViewTest',
#superclass : 'BinaryChoiceWebViewTest',
#category : 'Willow-Core-Tests-WebViews',
#package : 'Willow-Core-Tests',
#tag : 'WebViews'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
CheckboxWebViewTest >> newBinaryChoiceView [

^ CheckboxWebView onModel: true offModel: false
]

{ #category : #'tests-configuring' }
{ #category : 'tests-configuring' }
CheckboxWebViewTest >> testBeIdentifiable [

| html binaryChoiceView |
Expand All @@ -27,7 +29,7 @@ CheckboxWebViewTest >> testBeIdentifiable [
equals: '<input checked name="1" id="checkbox-id2" type="checkbox"/><input name="3" type="hidden"/>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
CheckboxWebViewTest >> testIdentifierOn [

| html checkbox |
Expand All @@ -44,7 +46,7 @@ CheckboxWebViewTest >> testIdentifierOn [
equals: '<input checked name="2" id="checkbox-id1" type="checkbox"/><input name="4" type="hidden"/>'
]

{ #category : #'tests-configuring' }
{ #category : 'tests-configuring' }
CheckboxWebViewTest >> testOn [

| html binaryChoiceView |
Expand All @@ -59,7 +61,7 @@ CheckboxWebViewTest >> testOn [
'<input checked name="1" id="input-id2" type="checkbox"/><input name="3" type="hidden"/><script type="text/javascript">$("#input-id2").click(function(event){$(this).prop("disabled",true)});</script>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
CheckboxWebViewTest >> testRenderingAfterUpdatingModel [

| html checkbox |
Expand All @@ -75,7 +77,7 @@ CheckboxWebViewTest >> testRenderingAfterUpdatingModel [
self assert: html equals: '<input class="willow" checked name="1" type="checkbox"/><input name="2" type="hidden"/>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
CheckboxWebViewTest >> testRenderingWithLabel [

| html checkbox |
Expand All @@ -91,7 +93,7 @@ CheckboxWebViewTest >> testRenderingWithLabel [
self assert: html equals: '<input class="willow" checked name="1" id="checkbox-id2" type="checkbox"/><input name="3" type="hidden"/><label for="checkbox-id2">Enable network</label>'
]

{ #category : #'tests-rendering' }
{ #category : 'tests-rendering' }
CheckboxWebViewTest >> testWithNonBooleanModels [

| html checkbox |
Expand Down
Loading

0 comments on commit 91d317b

Please sign in to comment.