[Seaside] seaside testing - fileUpload
liliana
liliana at finworks.biz
Wed Feb 20 08:32:46 UTC 2008
Hi David, (or anybody else using the seaside testing framework for these
purposes..)
Is there a way to specify a file content for a fileUpload component and
submitting the form? I'm interested in testing that I upload various file
formats in a correct manner
I'm thinking of something along the lines:
mytestFile := WAFile new.
mytestFile fileName: 'some filename'.
mytestFile contentType: 'some mime type'.
mytestFile contents: 'the upload format I need to test'.
testUpload
self newApplicationWithRootClass: MyUploadClass.
self establishSession.
form := self lastResponse forms first.
form fileHtmlInputWithId: 'upload' value: mytestFile.
self submitForm: form pressingButton: form buttons first.
And then assert that I read the file correctly...
Thanks.
Liliana
Liliana Ivan
liliana at finworks.biz
(27) 12 663 3140
Finworks (www.finworks.biz)
More information about the seaside
mailing list