2019-11-19 05:18:28 +03:00
{
2020-05-21 23:18:15 +03:00
"name" : "playwright-internal" ,
"private" : true ,
2024-09-30 14:24:57 +03:00
"version" : "1.49.0-next" ,
2020-01-07 22:51:22 +03:00
"description" : "A high-level API to automate web browsers" ,
2023-10-06 02:18:22 +03:00
"repository" : {
"type" : "git" ,
2023-10-06 02:42:27 +03:00
"url" : "git+https://github.com/microsoft/playwright.git"
2023-10-06 02:18:22 +03:00
} ,
2020-05-07 22:31:59 +03:00
"homepage" : "https://playwright.dev" ,
2019-11-19 05:18:28 +03:00
"engines" : {
2024-05-08 19:41:27 +03:00
"node" : ">=18"
2019-11-19 05:18:28 +03:00
} ,
2021-10-11 17:52:17 +03:00
"author" : {
"name" : "Microsoft Corporation"
} ,
"license" : "Apache-2.0" ,
2019-11-19 05:18:28 +03:00
"scripts" : {
2024-03-02 08:44:08 +03:00
"ctest" : "playwright test --config=tests/library/playwright.config.ts --project=chromium-*" ,
"ftest" : "playwright test --config=tests/library/playwright.config.ts --project=firefox-*" ,
"wtest" : "playwright test --config=tests/library/playwright.config.ts --project=webkit-*" ,
2022-03-26 09:09:02 +03:00
"atest" : "playwright test --config=tests/android/playwright.config.ts" ,
"etest" : "playwright test --config=tests/electron/playwright.config.ts" ,
2022-09-07 21:09:22 +03:00
"webview2test" : "playwright test --config=tests/webview2/playwright.config.ts" ,
2022-04-25 19:30:14 +03:00
"itest" : "playwright test --config=tests/installation/playwright.config.ts" ,
2022-05-18 19:50:58 +03:00
"stest" : "playwright test --config=tests/stress/playwright.config.ts" ,
2024-09-04 21:36:52 +03:00
"biditest" : "playwright test --config=tests/bidi/playwright.config.ts" ,
2022-03-29 23:27:37 +03:00
"test-html-reporter" : "playwright test --config=packages/html-reporter" ,
"test-web" : "playwright test --config=packages/web" ,
2022-03-26 09:09:02 +03:00
"ttest" : "node ./tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli test --config=tests/playwright-test/playwright.config.ts" ,
"ct" : "playwright test tests/components/test-all.spec.js --reporter=list" ,
"test" : "playwright test --config=tests/library/playwright.config.ts" ,
2024-02-26 20:39:21 +03:00
"eslint" : "eslint --cache --report-unused-disable-directives --ext ts,tsx,js,jsx,mjs ." ,
2024-07-10 23:32:08 +03:00
"tsc" : "tsc -p . && tsc -p packages/html-reporter/" ,
2021-10-11 17:52:17 +03:00
"build-installer" : "babel -s --extensions \".ts\" --out-dir packages/playwright-core/lib/utils/ packages/playwright-core/src/utils" ,
2020-03-08 04:09:38 +03:00
"doc" : "node utils/doclint/cli.js" ,
2024-01-18 22:33:23 +03:00
"lint" : "npm run eslint && npm run tsc && npm run doc && npm run check-deps && node utils/generate_channels.js && node utils/generate_types/ && npm run lint-tests && npm run test-types && npm run lint-packages" ,
2022-02-08 21:35:00 +03:00
"lint-packages" : "node utils/workspace.js --ensure-consistent" ,
2021-11-12 00:27:50 +03:00
"lint-tests" : "node utils/lint_tests.js" ,
2024-01-18 22:33:23 +03:00
"flint" : "concurrently \"npm run eslint\" \"npm run tsc\" \"npm run doc\" \"npm run check-deps\" \"node utils/generate_channels.js\" \"node utils/generate_types/\" \"npm run lint-tests\" \"npm run test-types\" \"npm run lint-packages\"" ,
2022-04-18 21:31:58 +03:00
"clean" : "node utils/build/clean.js" ,
2021-01-06 23:41:17 +03:00
"build" : "node utils/build/build.js" ,
2021-06-24 04:01:48 +03:00
"watch" : "node utils/build/build.js --watch --lint" ,
2023-02-17 22:19:53 +03:00
"test-types" : "node utils/generate_types/ && tsc -p utils/generate_types/test/tsconfig.json && tsc -p ./tests/" ,
2021-04-23 19:23:01 +03:00
"roll" : "node utils/roll_browser.js" ,
2020-12-12 10:35:25 +03:00
"check-deps" : "node utils/check_deps.js" ,
2022-07-15 20:36:36 +03:00
"build-android-driver" : "./utils/build_android_driver.sh" ,
2022-08-01 00:31:17 +03:00
"innerloop" : "playwright run-server --reuse-browser"
2019-11-19 05:18:28 +03:00
} ,
2021-10-11 17:52:17 +03:00
"workspaces" : [
"packages/*"
] ,
2019-11-19 05:18:28 +03:00
"devDependencies" : {
2023-07-24 23:27:44 +03:00
"@actions/core" : "^1.10.0" ,
2024-01-19 04:50:52 +03:00
"@babel/cli" : "^7.23.4" ,
"@babel/code-frame" : "^7.23.5" ,
"@babel/plugin-transform-class-properties" : "^7.23.3" ,
"@babel/plugin-transform-export-namespace-from" : "^7.23.4" ,
"@babel/plugin-transform-logical-assignment-operators" : "^7.23.4" ,
"@babel/plugin-transform-modules-commonjs" : "^7.23.3" ,
"@babel/plugin-transform-nullish-coalescing-operator" : "^7.23.4" ,
"@babel/plugin-transform-optional-chaining" : "^7.23.4" ,
"@babel/plugin-transform-typescript" : "^7.23.6" ,
"@babel/preset-react" : "^7.23.3" ,
2023-10-17 21:52:41 +03:00
"@types/babel__core" : "^7.20.2" ,
2023-03-30 03:13:09 +03:00
"@types/codemirror" : "^5.60.7" ,
2022-02-01 19:12:11 +03:00
"@types/formidable" : "^2.0.4" ,
2024-09-09 23:12:20 +03:00
"@types/immutable" : "^3.8.7" ,
2024-07-03 10:40:37 +03:00
"@types/node" : "^18.19.39" ,
2022-06-07 07:05:47 +03:00
"@types/react" : "^18.0.12" ,
2022-06-07 03:14:01 +03:00
"@types/react-dom" : "^18.0.5" ,
2022-09-29 03:01:13 +03:00
"@types/ws" : "^8.5.3" ,
2022-02-01 19:12:11 +03:00
"@types/xml2js" : "^0.4.9" ,
2024-07-05 17:31:08 +03:00
"@typescript-eslint/eslint-plugin" : "^7.15.0" ,
"@typescript-eslint/parser" : "^7.15.0" ,
"@typescript-eslint/utils" : "^7.15.0" ,
2024-01-19 22:13:03 +03:00
"@vitejs/plugin-basic-ssl" : "^1.1.0" ,
"@vitejs/plugin-react" : "^4.2.1" ,
2023-09-13 19:39:10 +03:00
"@zip.js/zip.js" : "^2.7.29" ,
2024-09-09 23:12:20 +03:00
"ansi-styles" : "^4.3.0" ,
2022-02-01 19:12:11 +03:00
"chokidar" : "^3.5.3" ,
2024-09-19 03:23:26 +03:00
"chromium-bidi" : "^0.7.1" ,
2022-04-19 03:50:25 +03:00
"colors" : "^1.4.0" ,
2021-09-03 21:30:34 +03:00
"concurrently" : "^6.2.1" ,
2022-02-01 19:12:11 +03:00
"cross-env" : "^7.0.3" ,
2024-08-23 20:19:36 +03:00
"dotenv" : "^16.4.5" ,
2024-06-21 01:43:26 +03:00
"electron" : "^30.1.2" ,
2023-07-10 23:35:05 +03:00
"esbuild" : "^0.18.11" ,
2023-12-08 07:13:35 +03:00
"eslint" : "^8.55.0" ,
"eslint-plugin-internal-playwright" : "file:utils/eslint-plugin-internal-playwright" ,
2020-07-07 21:12:45 +03:00
"eslint-plugin-notice" : "^0.9.10" ,
2024-08-20 15:16:28 +03:00
"eslint-plugin-react" : "^7.35.0" ,
"eslint-plugin-react-hooks" : "^4.6.2" ,
2022-12-08 12:09:03 +03:00
"formidable" : "^2.1.1" ,
2024-09-09 23:12:20 +03:00
"immutable" : "^4.3.7" ,
2022-04-18 21:31:58 +03:00
"license-checker" : "^25.0.1" ,
2022-02-01 23:27:34 +03:00
"mime" : "^3.0.0" ,
2022-02-01 19:12:11 +03:00
"node-stream-zip" : "^1.15.0" ,
2022-06-07 03:14:01 +03:00
"react" : "^18.1.0" ,
"react-dom" : "^18.1.0" ,
feat: implement a new image comparison function (#19166)
This patch implements a new image comparison function, codenamed
"ssim-cie94". The goal of the new comparison function is to cancel out
browser non-determenistic rendering.
To use the new comparison function:
```ts
await expect(page).toHaveScreenshot({
comparator: 'ssim-cie94',
});
```
As of Nov 30, 2022, we identified the following sources of
non-determenistic rendering for Chromium:
- Anti-aliasing for certain shapes might be different due to the
way skia rasterizes certain shapes.
- Color blending might be different on `x86` and `aarch64`
architectures.
The new function employs a few heuristics to fight these
differences.
Consider two non-equal image pixels `(r1, g1, b1)` and `(r2, g2, b2)`:
1. If the [CIE94] metric is less then 1.0, then we consider these pixels
**EQUAL**. (The value `1.0` is the [just-noticeable difference] for
[CIE94].). Otherwise, proceed to next step.
1. If all the 8 neighbors of the first pixel match its color, or
if the 8 neighbors of the second pixel match its color, then these
pixels are **DIFFERENT**. (In case of anti-aliasing, some of the
direct neighbors have to be blended up or down.) Otherwise, proceed
to next step.
1. If SSIM in some locality around the different pixels is more than
0.99, then consider this pixels to be **EQUAL**. Otherwise, mark them
as **DIFFERENT**. (Local SSIM for anti-aliased pixels turns out to be
very close to 1.0).
[CIE94]: https://en.wikipedia.org/wiki/Color_difference#CIE94
[just-noticeable difference]:
https://en.wikipedia.org/wiki/Just-noticeable_difference
2022-12-03 02:22:05 +03:00
"ssim.js" : "^3.5.0" ,
2024-07-05 17:31:08 +03:00
"typescript" : "^5.5.3" ,
2024-09-18 03:01:38 +03:00
"vite" : "^5.4.6" ,
2024-06-19 20:42:43 +03:00
"ws" : "^8.17.1" ,
2023-04-14 13:03:40 +03:00
"xml2js" : "^0.5.0" ,
2024-10-15 00:07:19 +03:00
"yaml" : "^2.5.1"
2019-11-19 05:18:28 +03:00
}
2021-10-08 01:49:30 +03:00
}