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

attachFile is not a function when using dropzone.js #353

Open
dschulten opened this issue Dec 27, 2021 · 0 comments
Open

attachFile is not a function when using dropzone.js #353

dschulten opened this issue Dec 27, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dschulten
Copy link

dschulten commented Dec 27, 2021

Current behavior:

On a website that seems to use dropdown.js, I cannot find the element that supports attachFile(). The website is not under my control, so it is not easy to find out how they implemented their dropzone, but I can see that they import dropzone.js in html head using the URL https://dev.service-bw.de/serviceportal-theme/js/dropzone.js?t=1640100138000.
I have put a breakpoint into the dragenter() function in line 730, which gets triggered when I drag a file onto the dropzone, therefore I believe that dropzone.js is in fact used here.

However, apparently they have heavily customized the drop zone, and they seem to activate it programmatically (no dropzone css class in the page).

All attempts to cy.get() the dropzone and call attachFile() on it lead to the error ".attachFile is not a function".

Desired behavior:

The dropzone should be supported

Steps to reproduce: (app code and test code)

Test code:
https://github.com/dschulten/cypress-test-tiny/tree/feature/dropzonejs

The test attempts to determine an object with attachFile() function inside the dropzone on the page, see logs for failed attempts. The test itself does not fail because I wanted to show all the candidates I've tried.

App code: see visited application in test code

Versions

cypress-file-upload 5.0.8
Cypress 9.1.1
Windows
Chrome

@dschulten dschulten added the bug Something isn't working label Dec 27, 2021
@dschulten dschulten changed the title attachFile is not a function attachFile is not a function when using dropzone.js Dec 28, 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