-
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.
Merge pull request #1401 from SeasideSt/streaming-uploads-test
File upload testing
- Loading branch information
Showing
11 changed files
with
46 additions
and
22 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
2 changes: 1 addition & 1 deletion
2
repository/BaselineOfSeaside3.package/monticello.meta/categories.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 +1 @@ | ||
SystemOrganization addCategory: #BaselineOfSeaside3! | ||
self packageOrganizer ensurePackage: #BaselineOfSeaside3 withTags: #()! |
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
2 changes: 1 addition & 1 deletion
2
repository/Seaside-Tests-Functional.package/monticello.meta/categories.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 +1 @@ | ||
SystemOrganization addCategory: #'Seaside-Tests-Functional'! | ||
self packageOrganizer ensurePackage: #'Seaside-Tests-Functional' withTags: #()! |
6 changes: 3 additions & 3 deletions
6
...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 | ||
testing | ||
expectedFailures | ||
| todo | | ||
todo := #(testExpiryFunctionalTest testFilterFunctionalTest testUploadFunctionalTest). | ||
todo := #(testExpiryFunctionalTest testFilterFunctionalTest). | ||
^ (GRPlatform current class == (Smalltalk at: #GRGemStonePlatform ifAbsent:[ nil ])) | ||
ifTrue: [ #(testContextFunctionalTest), todo "requires https://github.com/GsDevKit/Grease/pull/17 to be merged" ] | ||
ifTrue: [ #(testUploadFunctionalTestWithStreamingUploads testContextFunctionalTest), todo ] | ||
ifFalse:[ todo ] |
17 changes: 15 additions & 2 deletions
17
...-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/testUploadFunctionalTest.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,5 +1,18 @@ | ||
testing | ||
testUploadFunctionalTest | ||
|
||
| filePathString | | ||
self selectTest: 'WAUploadFunctionalTest'. | ||
|
||
self fail. | ||
|
||
[ | ||
filePathString := GRPlatform current newTemporaryFileNamed: 'testfile.txt'. | ||
GRPlatform current | ||
writeFileStreamOn: filePathString | ||
do: [ :stream | stream nextPutAll: 'blabla' ] | ||
binary: false. | ||
|
||
(driver findElementByCSSSelector: 'input[type=file]') sendKeys: filePathString. | ||
(driver findElementByCSSSelector: 'input[value=Load]') click. | ||
|
||
self assert: (driver findElementByCSSSelector: 'pre') getText equals: 'blabla' | ||
] ensure: [ GRPlatform current deleteFile: filePathString ] |
9 changes: 9 additions & 0 deletions
9
...ebDriverFunctionalTestCase.class/instance/testUploadFunctionalTestWithStreamingUploads.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,9 @@ | ||
testing | ||
testUploadFunctionalTestWithStreamingUploads | ||
|
||
| originalStreamUploadsSetting | | ||
originalStreamUploadsSetting := self zincServer streamUploads. | ||
[ | ||
self zincServer streamUploads: true. | ||
self testUploadFunctionalTest | ||
] ensure: [ self zincServer streamUploads: originalStreamUploadsSetting. ] |
6 changes: 6 additions & 0 deletions
6
.../Seaside-Tests-Parasol.package/WAWebDriverFunctionalTestCase.class/instance/zincServer.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,6 @@ | ||
private | ||
zincServer | ||
|
||
^ (Smalltalk at: #GemServer ifAbsent: [ nil ]) | ||
ifNil: [ WAAdmin serverAdaptors first server ] | ||
ifNotNil: [ ((Smalltalk at: #GemServer) gemServerNamed: 'Seaside') serverInstance ] |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-Tests-Parasol.package/monticello.meta/categories.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 +1 @@ | ||
SystemOrganization addCategory: #'Seaside-Tests-Parasol'! | ||
self packageOrganizer ensurePackage: #'Seaside-Tests-Parasol' withTags: #()! |
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