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

'selectFiles' Not working when calling twice #141

Open
raphaelns-developer opened this issue Jan 31, 2018 · 2 comments
Open

'selectFiles' Not working when calling twice #141

raphaelns-developer opened this issue Jan 31, 2018 · 2 comments

Comments

@raphaelns-developer
Copy link

When i try to use the selectFiles helper twice in the same input this erro ocour:
TypeError: Cannot redefine property: files at Function.defineProperty (<anonymous>) at buildFileEvent (fire-event.js:190) at fireEvent (fire-event.js:50) ...

@raphaelns-developer
Copy link
Author

I was able to fix the problem just addin the files attribute before calling the selectFiles helper, but adding the configurable option to allow the attribute to be changed.
Object.defineProperty(find(${selector} [data-test-input-file]), 'files', { value: {}, configurable: true });

@amk221
Copy link

amk221 commented Feb 15, 2018

I was also experiencing this with @ember/test-helpers
emberjs/ember-test-helpers#326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants