I'd like to create a basic acceptance test in ember that uploads a file.
I can mock the server with Pretender, but I need to know how to fill the input type="file"
field with a file from my filesystem. So the questions are basically:
- How to fill the input file field with ember test helpers, do I use
fillIn
helper? - How to add sample files to a folder and get them from my acceptance test. Is it possible to get the current path of my Ember project from the acceptance test to select a file from the filesystem to be uploaded? In Rails we use to use
Rails.root
for this purpose.
<input type='file' onchange={{action 'parseFile' value="target.files"}} />
– Sclera