title: Testing file upload with Capybara - not a form but button and javascript function
body: <p>I am struggling to get that test working, tested several approaches and nothing works so far. 
  I have a button </p>
  
  <pre><code>&lt;div &gt;
    &lt;a href class="btn btn-default btn-block btn-lg btn-shadowed ut-upload-button"
      ng-file-select
      ng-file-change="uplFile($event, $file)"&gt;
      &lt;i class="icon"&gt;i&lt;/i&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>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')</p>
  
  <p>Once uploaded the page should display a toast Success</p>
  
  <pre><code>expect(page).to have_toast('Success')
  </code></pre>
  
  <p>Sorry if it is a basic mistake or silly question, I am just starting using rspec and capybara and got lost completely </p>