Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The .selectFile command does not work from an aliased fixture #19803

Closed
wlsf82 opened this issue Jan 20, 2022 · 3 comments · Fixed by #19820
Closed

The .selectFile command does not work from an aliased fixture #19803

wlsf82 opened this issue Jan 20, 2022 · 3 comments · Fixed by #19820
Assignees

Comments

@wlsf82
Copy link

wlsf82 commented Jan 20, 2022

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.

cy handsOn( selectFile) -- selects a file for upload using an aliased fixture (failed)

@BlueWinds
Copy link
Contributor

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.

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: to do labels Jan 21, 2022
wlsf82 pushed a commit to wlsf82/cy-hands-on-select-file that referenced this issue Jan 22, 2022
The new test is a work around for the test that depends on issue
cypress-io/cypress#19803 to be fixed.
wlsf82 pushed a commit to wlsf82/cy-hands-on-select-file that referenced this issue Jan 23, 2022
The new test is a work around for the test that depends on issue
cypress-io/cypress#19803 to be fixed.
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 25, 2022

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.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jan 25, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 31, 2022

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.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants