I am struggling to get that test working, tested several approaches and nothing works so far. I have a button
<div >
<a href class="btn btn-default btn-block btn-lg btn-shadowed ut-upload-button"
ng-file-select
ng-file-change="uplFile($event, $file)">
<i class="icon">i</i>
</a>
</div>
this is a button that when clicked opens OS file browser, anyone knows how to get that to work as I tried attach_file, page.attach_file, find(".ut-upload-button").set(Rails.root + 'spec/files/file.txt')
Once uploaded the page should display a toast Success
expect(page).to have_toast('Success')
Sorry if it is a basic mistake or silly question, I am just starting using rspec and capybara and got lost completely
ng-file-selectdirective is not a core AngularJS directive. Hard to help without the code for that directive.<input type='file'>element somewhere to the page in order to make file upload work - that's what you need to attach the file to. I've also updated my answer with code you can try if there is only one file uploader on the page.