Closed ErikGrigoriev closed 2 years ago
@abramenal can you please review it?
@abramenal can you please check this?
@all-contributors add @ErikGrigoriev for code
@abramenal
I've put up a pull request to add @ErikGrigoriev! :tada:
@ErikGrigoriev one thing I am a bit unsure of is – whether to allow raw file contents to be passed. With this kind of separation it might make sense to create a separate command for that, so:
attachFixture
attachFile
attachFileRaw
WDYT?
Checklist:
Summary of changes
Added possibility to upload file instead of fixture. Split to 2 different commands. Renamed actual
attachFile
toattachFixture
and reworkedattachFile
to usecy.readFile
instead. Would force existing users to rename all their usages toattachFixture
in order to use it as before, but according to new functionality this naming seems to be more precise.Linked issues
Closes #232
Comment
Main reason for introducing this is bug this bug from cypress itself. Using fixture for upload failed in our project since we were creating files with same name for upload. And even though files were deleted and recreated between tests, cached data was used causing upload inconsistency.