tests(downloads): add a test for Blob downloads (#1936) #1939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds test cases for Blob downloads which appear to have
differing behavior on the different browsers.
NB: For each of the browsers, I manually tried going to a page that
looked like the newly added test asset page (
download-blob.html
)and performing the steps that the test does. In each of the cases
I ended up with the target file; however, Firefox and Safari both had an
additional prompt. (I'm not sure if that prompt was a default prompt
that should be disabled when running via Playwright or if additional
handling logic is needed.)
For Chrome, this test passes (and manual replication yields a file
download).
For Firefox, this test crashes the browser (but manual replication
yields a file but requires dealing with one extra download prompt in
Firefox).
For Webkit, this test will timeout (but manual replication yields a file
but requires dealing with one extra download prompt in Webkit.)
Test Output:
References: #1936