/* when providing fileContent is possible to ignore filePath but fileName and mime type must be provided */
const special = 'file.spss';
cy.fixture(special, 'binary')
.then(Cypress.Blob.binaryStringToBlob)
.then((fileContent) => {
cy.get('[data-cy="file-input"]').attachFile({ fileContent, fileName: 'special', mimeType: 'application/octet-stream', encoding: 'utf-8' });
})
The example provided states filePath can be ignored, but it is a mandatory parameter according to the index.d.ts.
Current behavior:
According to last example in Readme
The example provided states filePath can be ignored, but it is a mandatory parameter according to the index.d.ts.
Desired behavior:
Update interface to make filePath optional, or add filePath as well, like in the pre-ultimate example
Versions
Cypress 5.0.0, cypress-file-upload 4.1.0