Closed wlsf82 closed 2 years ago
The current implementation stores the fixture file contents, but does not persist the file name when you alias it - which your test is asserting on.
This isn't a great experience, and we'll be resolving it in 9.4.0 - the fixture filename will be preserved through an alias. I'll have a PR up in a few minutes here.
The code for this is done in cypress-io/cypress#19820, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Released in 9.4.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v9.4.0, please open a new issue.
Current behavior
The file is not selected when using an aliased fixture, as follows on the docs of the new
.selectFile
command (on the From a fixture section.)Desired behavior
The file should correctly be selected from an aliased fixture.
Test code to reproduce
https://github.com/wlsf82/cy-hands-on-select-file/blob/main/cypress/integration/selectFile.spec.js#L21
Note: To test it out, change the test from
.skip()
to.only()
.Cypress Version
9.3.1
Other
Here is a screenshot of the failure.