Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
d3021b64
Commit
d3021b64
authored
Aug 23, 2024
by
Janka Uryga
Committed by
Zack Tanner
Aug 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update playwright interface
partial cherry-pick from #64604, needed for #67734
parent
5e6f511e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
base.ts
test/lib/browsers/base.ts
+1
-1
playwright.ts
test/lib/browsers/playwright.ts
+4
-0
No files found.
test/lib/browsers/base.ts
View file @
d3021b64
export
type
Event
=
'request'
export
type
Event
=
'request'
|
'response'
/**
* This is the base Browser interface all browser
...
...
test/lib/browsers/playwright.ts
View file @
d3021b64
...
...
@@ -49,6 +49,7 @@ export class Playwright extends BrowserInterface {
private
activeTrace
?:
string
private
eventCallbacks
:
Record
<
Event
,
Set
<
(...
args
:
any
[])
=>
void
>>
=
{
request
:
new
Set
(),
response
:
new
Set
(),
}
private
async
initContextTracing
(
url
:
string
,
context
:
BrowserContext
)
{
if
(
!
tracePlaywright
)
{
...
...
@@ -233,6 +234,9 @@ export class Playwright extends BrowserInterface {
page
.
on
(
'request'
,
(
req
)
=>
{
this
.
eventCallbacks
.
request
.
forEach
((
cb
)
=>
cb
(
req
))
})
page
.
on
(
'response'
,
(
res
)
=>
{
this
.
eventCallbacks
.
response
.
forEach
((
cb
)
=>
cb
(
res
))
})
if
(
opts
?.
disableCache
)
{
// TODO: this doesn't seem to work (dev tools does not check the box as expected)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment