Capybara `attach_file` – Turbo response fires but does not append to page
I’ve got a Capybara test (using the Cuprite driver) for a file field with attach_file
that has worked for a year. In the UI, a Stimulus controller catches the click, loads the file, sends a request to a Rails controller action with some of the file’s attributes, retrieves a template as an HTML response, and “manually” appends the template to the page, populating the img src with the attached file’s data URI, and other fields with some file attributes like the name and the size.