cypress-file-upload
cypress-file-upload copied to clipboard
[Feature] Allow for mocking file size
Current behavior:
When attaching a file you can provide the description of a file ({ filePath, mimeType, ... }) and even mock its contents via fileContent, but you can't mock its size.
Desired behavior:
I wish I could provide the file size without resorting to mock its content. That would be especially useful for mocking large files.
cy.get("input[type=file]").attachFile({ fileSize: 100 * 1024 * 1024 }); // Just an example, this doesn't work.
Versions
n/a
This feature would be awesome. Is there a way in doing that? I'm willing to help.