From 32b8e82cfe9d1fdb6bfce0b861733d4e4f2acb2e Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Sun, 24 May 2026 22:53:06 +0900 Subject: [PATCH] update playwright inner-text test --- playwright/README.md | 17 ++++++-- playwright/inner-text.test.ts | 2 +- playwright/package-lock.json | 75 ----------------------------------- playwright/pnpm-lock.yaml | 52 ++++++++++++++++++++++++ playwright/test.html | 4 +- 5 files changed, 69 insertions(+), 81 deletions(-) delete mode 100644 playwright/package-lock.json create mode 100644 playwright/pnpm-lock.yaml diff --git a/playwright/README.md b/playwright/README.md index 582e012..9a5de6c 100644 --- a/playwright/README.md +++ b/playwright/README.md @@ -11,6 +11,17 @@ End-to-end testing setup using Playwright framework. ## Usage ```bash -npm install -npx playwright test -``` \ No newline at end of file +pnpm install +# Ubuntu 26.04 LTS +PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64 pnpm exec playwright install +# Others +pnpm exec playwright install +pnpm test +``` + +WebKit のコミットを追っていると互換性を高めるための修正進んでいるみたい +https://github.com/WebKit/WebKit/commits/main/Source/WebCore/editing/TextIterator.cpp +WPT: https://wpt.fyi/results/html/dom/elements/the-innertext-and-outertext-properties +Bugs: [289597 – (innerText) ☂️ `innerText` interop issues and related bugs](https://bugs.webkit.org/show_bug.cgi?id=289597) + +一部のケースはパスするようになっていた diff --git a/playwright/inner-text.test.ts b/playwright/inner-text.test.ts index 7121899..9fc23ee 100644 --- a/playwright/inner-text.test.ts +++ b/playwright/inner-text.test.ts @@ -6,7 +6,7 @@ test("first", async ({ page }) => { // playwright test --browser=chromium : pass // playwright test --browser=firefox : pass - // playwright test --browser=webkit : fail (return `1\n`) + // playwright test --browser=webkit : pass expect(await page.innerText("first-test")).toBe(`1`); }); diff --git a/playwright/package-lock.json b/playwright/package-lock.json deleted file mode 100644 index 877a14f..0000000 --- a/playwright/package-lock.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "playwright", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "devDependencies": { - "@playwright/test": "^1.48.1" - } - }, - "node_modules/@playwright/test": { - "version": "1.48.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.1.tgz", - "integrity": "sha512-s9RtWoxkOLmRJdw3oFvhFbs9OJS0BzrLUc8Hf6l2UdCNd1rqeEyD4BhCJkvzeEoD1FsK4mirsWwGerhVmYKtZg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright": "1.48.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/playwright": { - "version": "1.48.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.1.tgz", - "integrity": "sha512-j8CiHW/V6HxmbntOfyB4+T/uk08tBy6ph0MpBXwuoofkSnLmlfdYNNkFTYD6ofzzlSqLA1fwH4vwvVFvJgLN0w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.48.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.48.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.1.tgz", - "integrity": "sha512-Yw/t4VAFX/bBr1OzwCuOMZkY1Cnb4z/doAFSwf4huqAGWmf9eMNjmK7NiOljCdLmxeRYcGPPmcDgU0zOlzP0YA==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - } - } -} diff --git a/playwright/pnpm-lock.yaml b/playwright/pnpm-lock.yaml new file mode 100644 index 0000000..86036dd --- /dev/null +++ b/playwright/pnpm-lock.yaml @@ -0,0 +1,52 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@playwright/test': + specifier: ^1.48.1 + version: 1.60.0 + +packages: + + '@playwright/test@1.60.0': + resolution: {integrity: sha512-O71yZIbAh/PxDMNGns37GHBIfrVkEVyn+AXyIa5dOTfb4/xNvRWV+Vv/NMbNCtODB/pO7vLlF2OTmMVLhmr7Ag==} + engines: {node: '>=18'} + hasBin: true + + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + playwright-core@1.60.0: + resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.60.0: + resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==} + engines: {node: '>=18'} + hasBin: true + +snapshots: + + '@playwright/test@1.60.0': + dependencies: + playwright: 1.60.0 + + fsevents@2.3.2: + optional: true + + playwright-core@1.60.0: {} + + playwright@1.60.0: + dependencies: + playwright-core: 1.60.0 + optionalDependencies: + fsevents: 2.3.2 diff --git a/playwright/test.html b/playwright/test.html index aa4cc53..81f1415 100644 --- a/playwright/test.html +++ b/playwright/test.html @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@
1
2
-
+
-- knotmirror 0.0.1