Skip to content

Commit

Permalink
Adapted tests to new encoding used in Seaside for embedded scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabacman committed Jan 1, 2025
1 parent 0cdf737 commit 4a6ff2a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationDisplayingAp
self
assert: html
equals:
'<button id="button-id2" type="button">Ok</button><button id="button-id4" type="button">Cancel</button><script type="text/javascript">$("#button-id2").click(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});$("#button-id4").click(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"3"})});</script>'
'<button id="button-id2" type="button">Ok</button><button id="button-id4" type="button">Cancel</button><script type="text/javascript">$("#button-id2").click(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});$("#button-id4").click(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"3"})});</script>'
]

{ #category : 'tests - Configuring - DOM' }
Expand All @@ -723,7 +723,7 @@ CombinedWebInteractionInterpreterTest >> testShowLoadingNotificationStyledAsAll
self
assert: html
equals:
'<button id="button-id2" type="button">Ok</button><button id="button-id4" type="button">Cancel</button><script type="text/javascript">$("#button-id2").click(function(event){$("#willow-notification-section").html("<div>Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});$("#button-id4").click(function(event){$("#willow-notification-section").html("<div>Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"3"})});</script>'
'<button id="button-id2" type="button">Ok</button><button id="button-id4" type="button">Cancel</button><script type="text/javascript">$("#button-id2").click(function(event){$("#willow-notification-section").html("<div>Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});$("#button-id4").click(function(event){$("#willow-notification-section").html("<div>Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"3"})});</script>'
]

{ #category : 'tests - Configuring - DOM' }
Expand Down
2 changes: 1 addition & 1 deletion source/Willow-Core-Tests/DialogOpeningCommandTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DialogOpeningCommandTest >> testModelLoadingInstructions [
self
assert: html
equals:
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-dialog-section").append("<dialog open><\/dialog>")});</script>'
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-dialog-section").append("<dialog open></dialog>")});</script>'
]

{ #category : 'tests-accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ LoadingNotificationCommandTest >> testPriorityActions [
self
assert: html
equals:
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-notification-section").html("<div>Loading...<\/div>");$.ajax({"complete":function(){$("#willow-notification-section").html("")}})});</script>'
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-notification-section").html("<div>Loading...</div>");$.ajax({"complete":function(){$("#willow-notification-section").html("")}})});</script>'
]

{ #category : 'tests-accessing' }
Expand All @@ -74,7 +74,7 @@ LoadingNotificationCommandTest >> testPriorityActionsWithCustomView [
self
assert: html
equals:
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-notification-section").html("<div class=\"willow-loading\"><span>Processing...<\/span><\/div>");$.ajax({"complete":function(){$("#willow-notification-section").html("")}})});</script>'
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){$("#willow-notification-section").html("<div class=\"willow-loading\"><span>Processing...</span></div>");$.ajax({"complete":function(){$("#willow-notification-section").html("")}})});</script>'
]

{ #category : 'tests-testing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ PeriodicallyRenderedWebViewTest >> testScriptToRefreshAndRenderContentOn [
self
assert: html
equals:
'<div id="id3"></div><script type="text/javascript">$("#id3").html("Count: 2<br/><script type=\"text/javascript\">$.ajax({\"url\":\"/\",\"data\":\"2\"});<\/script>");</script>'
'<div id="id3"></div><script type="text/javascript">$("#id3").html("Count: 2<br/>\x3Cscript type=\"text/javascript\">$.ajax({\"url\":\"/\",\"data\":\"2\"});\x3C/script>");</script>'
]
2 changes: 1 addition & 1 deletion source/Willow-Core-Tests/RenderingCommandTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RenderingCommandTest >> testModelLoadingInstructions [
self
assert: html
equals:
'<a id="id3"></a><script type="text/javascript">$("#id3").click(function(){$("#container-id1").html("<span>Test<\/span>")});</script>'
'<a id="id3"></a><script type="text/javascript">$("#id3").click(function(){$("#container-id1").html("<span>Test</span>")});</script>'
]

{ #category : 'tests-accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TemporarilyDisablingCommandTest >> testPriorityActions [
self
assert: html
equals:
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){if(componentToDisable.attr("data-willow-events-disabled")!=="disabled"){componentToDisable.attr("data-willow-events-disabled","disabled").addClass("willow-disabled-component").attr("data-original-html",componentToDisable.html()).attr("disabled",true).html("<span class=\"willow-loading\"><\/span>");$.ajax({"complete":function(){componentToDisable.removeAttr("data-willow-events-disabled").attr("disabled",false).removeClass("willow-disabled-component").html(componentToDisable.attr("data-original-html"))}})}});</script>'
'<a id="a-id1"></a><script type="text/javascript">$("#a-id1").click(function(){if(componentToDisable.attr("data-willow-events-disabled")!=="disabled"){componentToDisable.attr("data-willow-events-disabled","disabled").addClass("willow-disabled-component").attr("data-original-html",componentToDisable.html()).attr("disabled",true).html("<span class=\"willow-loading\"></span>");$.ajax({"complete":function(){componentToDisable.removeAttr("data-willow-events-disabled").attr("disabled",false).removeClass("willow-disabled-component").html(componentToDisable.attr("data-original-html"))}})}});</script>'
]

{ #category : 'tests-testing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ WebInteractionInterpreterTest >> testShowLoadingNotificationDisplayingApplying [
self
assert: html
equals:
'<input id="input-id2" type="text"/><script type="text/javascript">$("#input-id2").change(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});</script>'
'<input id="input-id2" type="text"/><script type="text/javascript">$("#input-id2").change(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});</script>'
]

{ #category : 'tests - Configuring - DOM' }
Expand All @@ -769,7 +769,7 @@ WebInteractionInterpreterTest >> testShowLoadingNotificationStyledAsAll [
self
assert: html
equals:
'<input id="input-id2" type="text"/><script type="text/javascript">$("#input-id2").change(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...<\/div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});</script>'
'<input id="input-id2" type="text"/><script type="text/javascript">$("#input-id2").change(function(event){$("#willow-notification-section").html("<div class=\"willow\">Loading...</div>");Willow.callServer({"complete":function(){$("#willow-notification-section").html("")},"url":"/","data":"1"})});</script>'
]

{ #category : 'tests - Configuring - DOM' }
Expand Down

0 comments on commit 4a6ff2a

Please sign in to comment.