Skip to content

Commit 699bf80

Browse files
authored
docs: fix visualn regression example (#8681)
### Description <!-- Please insert your description here and provide especially info about the "what" this PR is solving --> <!-- You can also add additional context here --> ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed. - [ ] Ideally, include a test that fails without this PR but passes with it. - [ ] Please, don't make changes to `pnpm-lock.yaml` unless you introduce a new test example. - [ ] Please check [Allow edits by maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to make review process faster. Note that this option is not available for repositories that are owned by Github organizations. ### Tests - [ ] Run the tests with `pnpm test:ci`. ### Documentation - [ ] If you introduce new functionality, document it. You can run documentation with `pnpm run docs` command. ### Changesets - [ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with `feat:`, `fix:`, `perf:`, `docs:`, or `chore:`.
1 parent 948016d commit 699bf80

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

docs/guide/browser/visual-regression-testing.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -615,27 +615,26 @@ export default defineConfig({
615615
include: ['visual-regression-tests/**/*.test.ts?(x)'],
616616
browser: {
617617
enabled: true,
618-
provider: playwright(),
618+
provider: playwright({
619+
connectOptions: {
620+
wsEndpoint: `${env.PLAYWRIGHT_SERVICE_URL}?${new URLSearchParams({
621+
'api-version': '2025-09-01',
622+
os: 'linux', // always use Linux for consistency
623+
// helps identifying runs in the service's dashboard
624+
runName: `Vitest ${env.CI ? 'CI' : 'local'} run @${new Date().toISOString()}`,
625+
})}`,
626+
exposeNetwork: '<loopback>',
627+
headers: {
628+
Authorization: `Bearer ${env.PLAYWRIGHT_SERVICE_ACCESS_TOKEN}`,
629+
},
630+
timeout: 30_000,
631+
}
632+
}),
619633
headless: true,
620634
instances: [
621635
{
622636
browser: 'chromium',
623637
viewport: { width: 2560, height: 1440 },
624-
connect: {
625-
wsEndpoint: `${env.PLAYWRIGHT_SERVICE_URL}?${new URLSearchParams({
626-
'api-version': '2025-09-01',
627-
os: 'linux', // always use Linux for consistency
628-
// helps identifying runs in the service's dashboard
629-
runName: `Vitest ${env.CI ? 'CI' : 'local'} run @${new Date().toISOString()}`,
630-
})}`,
631-
options: {
632-
exposeNetwork: '<loopback>',
633-
headers: {
634-
Authorization: `Bearer ${env.PLAYWRIGHT_SERVICE_ACCESS_TOKEN}`,
635-
},
636-
timeout: 30_000,
637-
},
638-
},
639638
},
640639
],
641640
},

0 commit comments

Comments
 (0)