Closed jcoyne closed 1 month ago
This is caused by https://github.com/sul-dlss/happy-heron/blob/main/app/javascript/controllers/dropzone_controller.js#L148
It seems like a race condition in which the deposit button is being clicked before the file upload is completed.
But here's what's weird: You'd expect the test to fail (even if the alert is accepted by default) since the form submit should be stopped. (I verified that behavior running locally by adding a delay into the controller.) But the test completes successfully, indicating that the form was submitted. No idea how to account for this.
Unfortunately, I couldn't find anyway in capybara to handle an alert that might occur. The suggested wrappers handle when an alert must occur.
Open to other suggestions, otherwise we should just live with it.
Capybara gives this warning when running the tests: