Skip to content

Commit b8d0429

Browse files
authored
chore: upgrade playwright (#11690)
* chore: upgrade playwright * firefox workaround * clarify * format * try this * this works for now * update
1 parent 961ba2c commit b8d0429

File tree

7 files changed

+71
-56
lines changed

7 files changed

+71
-56
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"eslint-config-prettier": "^9.1.0",
3030
"eslint-plugin-svelte": "^2.35.1",
3131
"eslint-plugin-unicorn": "^50.0.0",
32-
"playwright": "1.30.0"
32+
"playwright": "^1.41.0"
3333
},
3434
"packageManager": "pnpm@8.14.1",
3535
"engines": {

packages/adapter-static/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"test": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test"
3131
},
3232
"devDependencies": {
33-
"@playwright/test": "1.30.0",
33+
"@playwright/test": "^1.41.0",
3434
"@sveltejs/kit": "workspace:^",
3535
"@sveltejs/vite-plugin-svelte": "^3.0.1",
3636
"@types/node": "^18.19.3",

packages/create-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"kleur": "^4.1.5"
1717
},
1818
"devDependencies": {
19-
"@playwright/test": "1.30.0",
19+
"@playwright/test": "^1.41.0",
2020
"@types/gitignore-parser": "^0.0.3",
2121
"gitignore-parser": "^0.0.2",
2222
"prettier": "^3.1.1",

packages/kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"tiny-glob": "^0.2.9"
2626
},
2727
"devDependencies": {
28-
"@playwright/test": "1.30.0",
28+
"@playwright/test": "^1.41.0",
2929
"@sveltejs/vite-plugin-svelte": "^3.0.1",
3030
"@types/connect": "^3.4.38",
3131
"@types/node": "^18.19.3",

packages/kit/test/apps/basics/test/cross-platform/client.test.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,29 @@ test.describe('Scrolling', () => {
417417
await expect(page.locator('input')).toBeFocused();
418418
});
419419

420-
test('scroll positions are recovered on reloading the page', async ({ page, app }) => {
420+
test('scroll positions are recovered on reloading the page', async ({
421+
page,
422+
app,
423+
browserName
424+
}) => {
425+
// No idea why the workaround below works only in dev mode
426+
// A better solution would probably be to set fission.webContentIsolationStrategy: 1
427+
// in the Firefox preferences but the Playwright API to do so is incomprehensible
428+
if (!process.env.DEV && browserName === 'firefox') {
429+
return;
430+
}
431+
421432
await page.goto('/anchor');
422433
await page.evaluate(() => window.scrollTo(0, 1000));
423434
await app.goto('/anchor/anchor');
424435
await page.evaluate(() => window.scrollTo(0, 1000));
425436

426437
await page.reload();
438+
if (browserName === 'firefox') {
439+
// Firefox with Playwright pushed new history entry history after reload
440+
// See https://github.com/microsoft/playwright/issues/22640
441+
await page.goBack();
442+
}
427443
expect(await page.evaluate(() => window.scrollY)).toBe(1000);
428444

429445
await page.goBack();

pnpm-lock.yaml

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

renovate.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
"enabled": false
1111
},
1212
"ignoreDeps": [
13-
"@playwright/test",
1413
"@types/node",
1514
"esbuild",
16-
"playwright",
1715
"rollup",
1816
"typescript"
1917
],

0 commit comments

Comments
 (0)