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', () => {
258
258
method : 'POST' ,
259
259
url : 'https://localhost:9444/v1/download' ,
260
260
form : true ,
261
+ encoding : "binary" ,
261
262
body : {
262
263
apikey : '2MXwA5jGZkIQ3UNEcKsuDNSPMlx' ,
263
264
dbowner : 'default' ,
@@ -269,14 +270,10 @@ describe('api tests', () => {
269
270
270
271
// Save the database to local disk
271
272
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.
276
273
cy . writeFile ( db , response . body , 'binary' )
277
274
278
275
// 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 )
280
277
281
278
// Remove the downloaded file
282
279
cy . task ( 'rmFile' , { path : db } )
You can’t perform that action at this time.
0 commit comments