Skip to content

Commit 5a5fa49

Browse files
authored
fix: fix defineHelper for webkit async stack trace + update playwright 1.59.0 (#10036)
1 parent 89ca0e2 commit 5a5fa49

File tree

12 files changed

+53
-44
lines changed

12 files changed

+53
-44
lines changed

docs/guide/browser/trace-view.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,3 @@ Under the hood, Playwright still records its own low-level action events as usua
126126
Keep in mind that plain assertions like `expect(value).toBe(...)` run in Node, not the browser, so they won't show up in the trace.
127127

128128
For anything not covered automatically, you can use `page.mark()` or `locator.mark()` to add your own trace groups — see [Trace markers](#trace-markers) above.
129-
130-
::: warning
131-
132-
Currently a source view of a trace can be only displayed properly when viewing it on the machine generated a trace with `playwright show-trace` CLI. This is expected to be fixed soon (see https://github.com/microsoft/playwright/pull/39307).
133-
134-
:::

examples/lit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"devDependencies": {
2020
"@vitest/browser-playwright": "latest",
2121
"jsdom": "latest",
22-
"playwright": "^1.58.2",
22+
"playwright": "^1.59.0",
2323
"vite": "latest",
2424
"vitest": "latest"
2525
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"devDependencies": {
4343
"@antfu/eslint-config": "^7.6.1",
4444
"@antfu/ni": "^28.3.0",
45-
"@playwright/test": "^1.58.2",
45+
"@playwright/test": "catalog:",
4646
"@rollup/plugin-commonjs": "^29.0.2",
4747
"@rollup/plugin-json": "^6.1.0",
4848
"@rollup/plugin-node-resolve": "^16.0.3",

packages/browser-playwright/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"tinyrainbow": "catalog:"
6060
},
6161
"devDependencies": {
62-
"playwright": "^1.58.2",
62+
"playwright": "catalog:",
6363
"vitest": "workspace:*"
6464
}
6565
}

packages/utils/src/source-map.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,13 @@ export function parseStacktrace(
233233
: parseV8Stacktrace(stack)
234234

235235
// remove assertion helper's internal stacks
236-
const helperIndex = stacks.findLastIndex(s => s.method === '__VITEST_HELPER__' || s.method === 'async*__VITEST_HELPER__')
236+
const helperIndex = stacks.findLastIndex(s =>
237+
s.method === '__VITEST_HELPER__'
238+
// firefox
239+
|| s.method === 'async*__VITEST_HELPER__'
240+
// webkit
241+
|| s.method === 'async __VITEST_HELPER__',
242+
)
237243
if (helperIndex >= 0) {
238244
stacks = stacks.slice(helperIndex + 1)
239245
}

pnpm-lock.yaml

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ catalog:
5050
'@iconify/vue': ^5.0.0
5151
'@jridgewell/remapping': ^2.3.5
5252
'@jridgewell/trace-mapping': 0.3.31
53+
'@playwright/test': ^1.59.0
5354
'@rolldown/plugin-babel': ^0.2.1
5455
'@types/chai': ^5.2.2
5556
'@types/estree': ^1.0.8
@@ -76,7 +77,7 @@ catalog:
7677
msw: ^2.12.10
7778
obug: ^2.1.1
7879
pathe: ^2.0.3
79-
playwright: ^1.58.2
80+
playwright: ^1.59.0
8081
sinon: ^21.0.3
8182
sinon-chai: ^4.0.1
8283
sirv: ^3.0.2

test/browser/docker-compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
playwright:
3-
image: mcr.microsoft.com/playwright:v1.58.2-noble
4-
command: /bin/sh -c "npx -y playwright@1.58.1 run-server --port 6677 --host 0.0.0.0"
3+
image: mcr.microsoft.com/playwright:v1.59.0-noble
4+
command: /bin/sh -c "npx -y playwright@1.59.0 run-server --port 6677 --host 0.0.0.0"
55
init: true
66
ipc: host
77
user: pwuser
@@ -15,8 +15,8 @@ services:
1515
# Run it by:
1616
# pnpm run docker up playwright-host
1717
playwright-host:
18-
image: mcr.microsoft.com/playwright:v1.58.2-noble
19-
command: /bin/sh -c "npx -y playwright@1.58.1 run-server --port 6677"
18+
image: mcr.microsoft.com/playwright:v1.59.0-noble
19+
command: /bin/sh -c "npx -y playwright@1.59.0 run-server --port 6677"
2020
init: true
2121
ipc: host
2222
user: pwuser

test/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@vitest/browser-webdriverio": "workspace:*",
4040
"@vitest/bundled-lib": "link:./bundled-lib",
4141
"@vitest/cjs-lib": "link:./cjs-lib",
42-
"playwright": "^1.58.2",
42+
"playwright": "catalog:",
4343
"react": "^19.2.4",
4444
"react-dom": "^19.2.4",
4545
"test-dep-error": "file:./deps/test-dep-error",

test/browser/settings.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ export const instances: BrowserInstanceOption[] = process.env.BROWSER
4040
? [
4141
{
4242
browser: process.env.BROWSER as any,
43-
headless: process.env.BROWSER === 'safari' ? false : undefined,
43+
headless:
44+
wsEndpoint
45+
? true
46+
: process.env.BROWSER === 'safari' ? false : undefined,
4447
},
4548
]
4649
: provider.name === 'playwright'

0 commit comments

Comments
 (0)