Skip to content

Commit 6933d8d

Browse files
authored
svelte: Disable paths.relative for Playwright tests (#13521)
1 parent afc1c38 commit 6933d8d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

svelte/svelte.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const config = {
1818
// to be able to serve it alongside the Ember.js app at `/`.
1919
// Use empty base path for tests (Vitest unit tests and Playwright e2e tests).
2020
base: process.env.VITEST || process.env.PLAYWRIGHT ? '' : '/svelte',
21+
// Force absolute asset URLs under Playwright so that Percy's DOM
22+
// serializer captures hrefs that still resolve when the snapshot is
23+
// rendered at a different URL.
24+
...(process.env.PLAYWRIGHT && { relative: false }),
2125
},
2226
prerender: {
2327
origin: `https://${process.env.DOMAIN_NAME ?? 'crates.io'}`,

0 commit comments

Comments
 (0)