Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/guide/browser/trace-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,3 @@ Under the hood, Playwright still records its own low-level action events as usua
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.

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.

::: warning

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).

:::
Comment on lines -129 to -134

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 changes: 1 addition & 1 deletion examples/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"devDependencies": {
"@vitest/browser-playwright": "latest",
"jsdom": "latest",
"playwright": "^1.58.2",
"playwright": "^1.59.0",
"vite": "latest",
"vitest": "latest"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"devDependencies": {
"@antfu/eslint-config": "^7.6.1",
"@antfu/ni": "^28.3.0",
"@playwright/test": "^1.58.2",
"@playwright/test": "catalog:",
"@rollup/plugin-commonjs": "^29.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"tinyrainbow": "catalog:"
},
"devDependencies": {
"playwright": "^1.58.2",
"playwright": "catalog:",
"vitest": "workspace:*"
}
}
8 changes: 7 additions & 1 deletion packages/utils/src/source-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ export function parseStacktrace(
: parseV8Stacktrace(stack)

// remove assertion helper's internal stacks
const helperIndex = stacks.findLastIndex(s => s.method === '__VITEST_HELPER__' || s.method === 'async*__VITEST_HELPER__')
const helperIndex = stacks.findLastIndex(s =>
s.method === '__VITEST_HELPER__'
// firefox
|| s.method === 'async*__VITEST_HELPER__'
// webkit
|| s.method === 'async __VITEST_HELPER__',
)
if (helperIndex >= 0) {
stacks = stacks.slice(helperIndex + 1)
}
Expand Down
47 changes: 25 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ catalog:
'@iconify/vue': ^5.0.0
'@jridgewell/remapping': ^2.3.5
'@jridgewell/trace-mapping': 0.3.31
'@playwright/test': ^1.59.0
'@rolldown/plugin-babel': ^0.2.1
'@types/chai': ^5.2.2
'@types/estree': ^1.0.8
Expand All @@ -76,7 +77,7 @@ catalog:
msw: ^2.12.10
obug: ^2.1.1
pathe: ^2.0.3
playwright: ^1.58.2
playwright: ^1.59.0
sinon: ^21.0.3
sinon-chai: ^4.0.1
sirv: ^3.0.2
Expand Down
8 changes: 4 additions & 4 deletions test/browser/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
playwright:
image: mcr.microsoft.com/playwright:v1.58.2-noble
command: /bin/sh -c "npx -y playwright@1.58.1 run-server --port 6677 --host 0.0.0.0"
image: mcr.microsoft.com/playwright:v1.59.0-noble
command: /bin/sh -c "npx -y playwright@1.59.0 run-server --port 6677 --host 0.0.0.0"
init: true
ipc: host
user: pwuser
Expand All @@ -15,8 +15,8 @@ services:
# Run it by:
# pnpm run docker up playwright-host
playwright-host:
image: mcr.microsoft.com/playwright:v1.58.2-noble
command: /bin/sh -c "npx -y playwright@1.58.1 run-server --port 6677"
image: mcr.microsoft.com/playwright:v1.59.0-noble
command: /bin/sh -c "npx -y playwright@1.59.0 run-server --port 6677"
init: true
ipc: host
user: pwuser
Expand Down
2 changes: 1 addition & 1 deletion test/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@vitest/browser-webdriverio": "workspace:*",
"@vitest/bundled-lib": "link:./bundled-lib",
"@vitest/cjs-lib": "link:./cjs-lib",
"playwright": "^1.58.2",
"playwright": "catalog:",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"test-dep-error": "file:./deps/test-dep-error",
Expand Down
5 changes: 4 additions & 1 deletion test/browser/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const instances: BrowserInstanceOption[] = process.env.BROWSER
? [
{
browser: process.env.BROWSER as any,
headless: process.env.BROWSER === 'safari' ? false : undefined,
headless:
wsEndpoint
? true
: process.env.BROWSER === 'safari' ? false : undefined,
},
]
: provider.name === 'playwright'
Expand Down
7 changes: 2 additions & 5 deletions test/browser/specs/assertion-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,20 @@ test('vi.defineHelper hides internal stack traces', async () => {
`)
}
else if (name === 'webkit') {
// async stack trace is incomplete on webkit
// waiting for https://github.com/WebKit/WebKit/pull/57832 to land on playwright
// bun has already landed https://github.com/oven-sh/bun/pull/22517
expect.soft(tree).toMatchInlineSnapshot(`
{
"basic.test.ts": {
"async": [
"expected 'async' to deeply equal 'x'
at basic.test.ts:9:20",
at basic.test.ts:26:21",
],
"soft": [
"expected 'soft' to deeply equal 'x'
at basic.test.ts:30:14",
],
"soft async": [
"expected 'soft async' to deeply equal 'x'
at basic.test.ts:18:25",
at basic.test.ts:34:25",
],
"sync": [
"expected 'sync' to deeply equal 'x'
Expand Down
5 changes: 5 additions & 0 deletions test/browser/test/userEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ describe.each(inputLike)('userEvent.fill', async (getInput) => {
}

await userEvent.fill(input, 'Hello')
if (input.tagName === 'DIV' && server.provider === 'playwright' && server.browser === 'webkit') {
// broken since playwright 1.59.0 https://github.com/microsoft/playwright/issues/39983
expect(value()).toBe('')
return
}
expect(value()).toBe('Hello')
})
})
Expand Down
Loading