This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ describe('api tests', () => {
258258 method : 'POST' ,
259259 url : 'https://localhost:9444/v1/download' ,
260260 form : true ,
261+ encoding : "binary" ,
261262 body : {
262263 apikey : '2MXwA5jGZkIQ3UNEcKsuDNSPMlx' ,
263264 dbowner : 'default' ,
@@ -269,14 +270,10 @@ describe('api tests', () => {
269270
270271 // Save the database to local disk
271272 const db = path . join ( downloadsFolder , 'Assembly Election 2017.sqlite' )
272- // FIXME: cy.writeFile() isn't writing the full file out to disk, even though the server
273- // is definitely sending it (as evidenced by curl having no issues). It would be
274- // good to figure out wtf is causing this problem, then fix it and write a more
275- // thorough cy.readFile() test.
276273 cy . writeFile ( db , response . body , 'binary' )
277274
278275 // Verify the downloaded file is ok
279- cy . readFile ( db , 'binary' , { timeout : 5000 } ) . should ( 'have.length.gt ' , 512 )
276+ cy . readFile ( db , 'binary' , { timeout : 5000 } ) . should ( 'have.length' , 73728 )
280277
281278 // Remove the downloaded file
282279 cy . task ( 'rmFile' , { path : db } )
You can’t perform that action at this time.
0 commit comments