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
feat: cy.selectFile() (#19332) #19524
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@cowboy - Added cypress-services PR to add on.cypress link to new docs page: https://github.com/cypress-io/cypress-services/pull/4195 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BlueWinds looks like theres an issue adding the type BufferModule = import("buffer/")
to the declaration file. Is that right?
Ah, I thought I'd fixed that. Pushed a new change that should address it for real this time. |
A heads up that the changelog link to the blog about the new functionality is broken: https://cypress.io/blog/2022/01/18/uploading-files-with-selectfile/ |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
We released the code late in the evening and didn't publish the blog post until the following day. Fixed now, thanks for the report. |
User facing changelog
Adds
Cypress.Buffer
, exposing the Buffer polyfill for working with binary data.Adds native support for
.selectFile()
, allowing interaction with file input elements as well as simulating a user drag-dropping files over the document.The API is similar to cypress-file-upload, and we have provided a migration guide for previous users of that plugin.
For full details, see the
.selectFile()
documentation.Additional details
The documentation and migration guide contain extensive information about all the options and features of this new command.
PR Tasks
cypress-documentation
? TODO - waiting on cy.selectFile docs cypress-documentation#4241 to merge intounification
, will then make a docs PR againstmaster
.type definitions
?cypress.schema.json
?