Skip to content

Commit

Permalink
added upload test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Jan 31, 2024
1 parent 61d83eb commit f2b3dfb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
running
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" ]
ifFalse:[ todo ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
testing
testUploadFunctionalTest

| file |
self selectTest: 'WAUploadFunctionalTest'.

self fail.

file := GRPlatform current newTemporaryFileReferenceNamed: 'testfile.txt'.
GRPlatform current
writeFileStreamOn: file pathString
do: [ :stream | stream nextPutAll: 'blabla' ]
binary: false.

(driver findElementByCSSSelector: 'input[type=file]') sendKeys: file pathString.
(driver findElementByCSSSelector: 'input[value=Load]') click.

self assert: (driver findElementByCSSSelector: 'pre') getText equals: 'blabla'

0 comments on commit f2b3dfb

Please sign in to comment.