-
Notifications
You must be signed in to change notification settings - Fork 659
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
Enable downloading files to the default directory for Chrome Headless (closes #3127) #4043
Conversation
|
||
return tab; | ||
return tabs.filter(t => t.type === 'page' && t.url.indexOf(browserId) > -1)[0]; |
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.
Instead of string.indexOf(subString) > -1
it's possible to use string.includes(subString)
.
It is a little readable and shorter.
@@ -72,7 +120,7 @@ export async function createClient (runtimeInfo) { | |||
runtimeInfo.client = client; | |||
|
|||
await client.Page.enable(); | |||
await client.Network.enable(); | |||
await client.Network.enable({}); |
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.
Is {}
argument necessary?
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.
It's required by type definitions:
https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol-proxy-api.d.ts#L1944
As you can see params
is not optional.
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.
Ok
❌ Tests for the commit 0eb95c5 have failed. See details: |
✅ Tests for the commit 0eb95c5 have passed. See details: |
test/functional/fixtures/regression/gh-3127/testcafe-fixtures/index-test.js
Show resolved
Hide resolved
❌ Tests for the commit e288d6f have failed. See details: |
✅ Tests for the commit e288d6f have passed. See details: |
Closes #3127.