I'm trying to write an integration test for a file upload using AWS S3. The behavior I'm trying to test is that a user is supposed to click the "Choose Files" button, then choose a video, then the user is supposed to see the video and the Video count is supposed to increase by 1. I'm stumbling at the starting gates here, and can't even seem to have the user click the button. I'm using the s3 direct upload gem and the javascript I'm using for the form is
<script id="template-upload" type="text/x-tmpl">
My output HTML looks something like this
<form accept-charset="UTF-8" action="https://bucketname-bucket.s3.amazonaws.com/" data-callback-method="POST" data-callback-param="video[direct_upload_url]" data-callback-url="http://0.0.0.0:3000/videos" enctype="multipart/form-data" id="s3-uploader" method="post">
***some AWS stuff***
<input id="file" multiple="multiple" name="file" type="file">
So if you actually go to the page, there is a button that says "Choose Files." If I click on that, it lets me choose a file to upload. However, when I put in rspec
click_button "Choose Files"
it says it can't find the button. So the obvious question is, how do I have it pretend to click the button?