-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CORS test on github actions (#1400)
- Loading branch information
Showing
20 changed files
with
86 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
...ests-Functional.package/WACORSFilterFunctionalTest.class/instance/errorHandlerFunction.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
javascript | ||
errorHandlerFunction | ||
|
||
^ (JSStream on: 'console.error(arguments[0])') , (JSStream on: | ||
'document.getElementById("result").style.backgroundColor = "red"') | ||
, (JSStream on: | ||
'document.getElementById("result").innerHTML = "<p>Error</p>"') | ||
asFunction: #( 'result' ) | ||
^ (JSStream on: 'document.getElementById("result").style.backgroundColor = "Red"'), | ||
(JSStream on: 'document.getElementById("result").innerHTML = "<p>Error</p>"'), | ||
(JSStream on: 'document.getElementById("result-contents").innerHTML = ""; response.text().then((text) => document.getElementById("result-contents").innerHTML += "<p>"+text+"</p>")') | ||
asFunction: #( 'response' ) |
2 changes: 1 addition & 1 deletion
2
...ests-Functional.package/WACORSFilterFunctionalTest.class/instance/originTextToUrlTable.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
private | ||
originTextToUrlTable | ||
|
||
^ GRSmallDictionary2 new | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
...de-Tests-Functional.package/WACORSFilterFunctionalTest.class/instance/renderContentOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
...ts-Functional.package/WACORSFilterFunctionalTest.class/instance/successHandlerFunction.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
javascript | ||
successHandlerFunction | ||
|
||
^ (JSStream on: 'console.log(arguments[0])') , (JSStream on: | ||
'document.getElementById("result").style.backgroundColor = "darkgreen"') | ||
, (JSStream on: | ||
'document.getElementById("result").innerHTML = "<p>Success</p>"') | ||
asFunction: #( 'result' ) | ||
^ (JSStream on: 'document.getElementById("result").style.backgroundColor = "DarkGreen"'), | ||
(JSStream on: 'document.getElementById("result").innerHTML = "<p>Success</p>"'), | ||
(JSStream on: 'document.getElementById("result-contents").innerHTML = ""; response.text().then((text) => document.getElementById("result-contents").innerHTML += "<p>"+text+"</p>")') | ||
asFunction: #( 'response' ) |
2 changes: 1 addition & 1 deletion
2
...ory/Seaside-Tests-Functional.package/WACORSResourceExample.class/class/corsAdaptorPort.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
corsAdaptorPort | ||
|
||
^ 8084 | ||
^ 8888 |
2 changes: 1 addition & 1 deletion
2
...itory/Seaside-Tests-Functional.package/WACORSResourceExample.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
private | ||
initialization | ||
initialize | ||
|
||
super initialize. | ||
|
2 changes: 1 addition & 1 deletion
2
...ide-Tests-Functional.package/WACORSResourceExample.class/instance/initializeSampleData.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
private | ||
private | ||
initializeSampleData | ||
|
||
^ sampleData := ((1 to: 10) collect: [ :index | | ||
|
2 changes: 1 addition & 1 deletion
2
...itory/Seaside-Tests-Functional.package/WACORSResourceExample.class/instance/sampleData.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
private | ||
private | ||
sampleData | ||
|
||
sampleData ifNil: [ self initializeSampleData ]. | ||
|
7 changes: 7 additions & 0 deletions
7
...easide-Tests-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/clickRestart.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
helpers | ||
clickRestart | ||
|
||
| button | | ||
button := driver findElementByCSSSelector: 'input[type="submit"]'. | ||
self assert: (button getAttribute: 'value') equals: 'Restart'. | ||
button click |
2 changes: 1 addition & 1 deletion
2
...de-Tests-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/expectedFailures.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
running | ||
expectedFailures | ||
| todo | | ||
todo := #(testExpiryFunctionalTest testFilterFunctionalTest testUploadFunctionalTest testCORSFilterFunctionalTest). | ||
todo := #(testExpiryFunctionalTest testFilterFunctionalTest testUploadFunctionalTest). | ||
^ (GRPlatform current class == (Smalltalk at: #GRGemStonePlatform ifAbsent:[ nil ])) | ||
ifTrue: [ #(testContextFunctionalTest), todo "requires https://github.com/GsDevKit/Grease/pull/17 to be merged" ] | ||
ifFalse:[ todo ] |
14 changes: 14 additions & 0 deletions
14
...Seaside-Tests-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/performTest.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
private | ||
performTest | ||
"The code below can be uncommented to take screenshots of failing tests which will be collected by the Github CI action. | ||
It is commented because it breaks Squeak and GemStone builds. Only works for Pharo builds." | ||
|
||
^ super performTest | ||
"^ [ super performTest ] on: TestFailure , Error do: [ :exceptionTest | | ||
[ Transcript show: 'Taking screenshot to ', (FileLocator imageDirectory asFileReference) asString. self takeScreenshot ] on: Error do: [ :errorScreenshot | | ||
Transcript | ||
show: ('Could not take screenshot in {1}: {2}' format: { | ||
self asString. | ||
errorScreenshot messageText }); | ||
cr ]. | ||
exceptionTest pass ]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters