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

[Bug] Files can be attached to disabled inputs without force:true #321

Open
devnev opened this issue Aug 9, 2021 · 0 comments
Open

[Bug] Files can be attached to disabled inputs without force:true #321

devnev opened this issue Aug 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@devnev
Copy link

devnev commented Aug 9, 2021

Current behavior:

An element <input type=file disabled> can have a file attached to it using this plugin without specifiying force: true.

Desired behavior:

Attaching a file to a disabled input should fail as the user would be unable to do so.

The documentation for cypress-file-upload specifies:

{boolean} force - same as for cy.trigger, it enforces the event triggers on HTML subject element. Usually this is necessary when you use hidden HTML controls for your file upload. Defaults to false

But for cy.trigger and other actions, actionability is documented to exclude disabled elements: https://docs.cypress.io/guides/core-concepts/interacting-with-elements#Actionability

Steps to reproduce: (app code and test code)

devnev/cypress-test-tiny@20859a5

Versions

Using Chrome on Mac, originally encountered in version 3.5.3, reproduced on 5.0.8

@devnev devnev added the bug Something isn't working label Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants