-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(downloads): add a test for Blob downloads (#1936) #1939
Conversation
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: ``` Failures: 1) [CRASHED] Firefox Download should report download path within page.on('download', …) handler for Blobs (download.spec.js:86:3) 2) [TIMEOUT 10000ms] WebKit Download should report download path within page.on('download', …) handler for Blobs (download.spec.js:86:3) ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
(looks like you need to sign CLA unless the bot is lagging)
@yury-s Bot was good :) I hadn't signed it yet. It's now signed! 🎉 |
When contributing some test cases, I was a bit confused about if I should use `skip` and `fail`, the difference between the two, and how they interact with CI/CD tests passing or failing: #1939 (comment). This is my attempt at explaining the difference, but feel free to edit to make it more clear and concise (and correct any inaccuracies).
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