Support for testing downloads? (assert_download) #703
Replies: 1 comment
-
I gave this a quick try with:
But it turned out to be very flaky. Sometimes the file is there sometimes it isn't. I tried another attempt where I would make sure the directory exists / or else create it, + remove the download directory in the Also tried to use Finally I tried to use the So, didn't get to make this work 🤷♀️ I think the flakiness comes from "ChromeDriver does not automatically wait for download to complete. If you call driver.quit() too soon, Chrome might terminate before the download has finished." (https://chromedriver.chromium.org/capabilities) and I don't know how to go around this - would even think there's nothing to do about this. Alternatively in our other e2e tests, when the download is served by the controller, we read the Another solution I'd think of is to leave the link with blob URL on the page (in our case we append it / remove it on the fly) and parse the data in the |
Beta Was this translation helpful? Give feedback.
-
I'm building an app that has file sharing with end-to-end encryption. The files get decrypted in the frontend and are then downloaded via a blob URL.
I looked at the docs and there doesn't seem to be a way to test file downloads. I thought it would be cool to be able to test file downloads using something like
assert_download
?Beta Was this translation helpful? Give feedback.
All reactions