File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -161,18 +161,19 @@ Set `output` to where the generated report is to be stored. Default is the outpu
161161### AWS Support
162162AWS S3 support to upload and download various images is also provided.
163163It can be used by adding the * aws* code inside ` "ResembleHelper" ` in the ` "helpers" ` section in config file. The final result should look like:
164- ``` json
164+ ``` js
165165{
166166 " helpers" : {
167- "ResembleHelper" : {
167+ " ResembleHelper" : {
168168 " require" : " codeceptjs-resemblehelper" ,
169169 " baseFolder" : " <location of base folder>" ,
170170 " diffFolder" : " <location of diff folder>" ,
171171 " aws" : {
172172 " accessKeyId" : " <Your AccessKeyId>" ,
173173 " secretAccessKey" : " <Your secretAccessKey>" ,
174174 " region" : " <Region of Bucket>" ,
175- "bucketName" : " <Bucket Name>"
175+ " bucketName" : " <Bucket Name>" ,
176+ " skipS3Upload" : true ,
176177 }
177178 }
178179 }
@@ -183,6 +184,7 @@ This base image has to be located inside a folder named "*base*".
183184The resultant output image will be uploaded in a folder named "* output* " and diff image will be uploaded to a folder named "* diff* " in the S3 bucket.
184185If the ` prepareBaseImage ` option is marked ` true ` , then the generated base image will be uploaded to a folder named "* base* " in the S3 bucket.
185186> Note: The tests may take a bit longer to run when the AWS configuration is provided as determined by the internet speed to upload/download images.
187+ > Note: if you want to skip the s3 upload, set skipS3Upload to true.
186188
187189### Other S3 Providers
188190The same configuration as above, but with * endpoint* field:
Original file line number Diff line number Diff line change @@ -441,15 +441,19 @@ class ResembleHelper extends Helper {
441441 await this . _addAttachment ( baseImage , misMatch , options ) ;
442442 await this . _addMochaContext ( baseImage , misMatch , options ) ;
443443 if ( awsC !== undefined ) {
444- await this . _upload (
445- awsC . accessKeyId ,
446- awsC . secretAccessKey ,
447- awsC . region ,
448- awsC . bucketName ,
449- baseImage ,
450- options ,
451- awsC . endpoint ,
452- ) ;
444+ if ( awsC . skipS3Upload ) {
445+ this . debug ( `Uploading to S3 is skipped due to skipS3Upload is set` ) ;
446+ } else {
447+ await this . _upload (
448+ awsC . accessKeyId ,
449+ awsC . secretAccessKey ,
450+ awsC . region ,
451+ awsC . bucketName ,
452+ baseImage ,
453+ options ,
454+ awsC . endpoint ,
455+ ) ;
456+ }
453457 }
454458
455459 this . debug ( `MisMatch Percentage Calculated is ${ misMatch } for baseline ${ baseImage } ` ) ;
You can’t perform that action at this time.
0 commit comments