'selectFiles' Not working when calling twice
raphaelns-developer opened this issue · comments
Raphael Nunes dos Santos commented
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) ...
Raphael Nunes dos Santos commented
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 });
Andrew Kirwin commented
I was also experiencing this with @ember/test-helpers
emberjs/ember-test-helpers#326