From 7e1b69cf3333addfa40d81b598cdc1024471952e Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 21 Jun 2024 00:43:26 +0200 Subject: [PATCH] test: update Electron to v30 (#30334) --- package-lock.json | 542 +++++++----------- package.json | 2 +- tests/android/androidTest.ts | 1 + tests/config/browserTest.ts | 1 + tests/electron/electron-app.spec.ts | 4 +- tests/electron/electronTest.ts | 1 + .../browsercontext-storage-state.spec.ts | 4 +- tests/library/page-event-crash.spec.ts | 3 +- tests/page/expect-boolean.spec.ts | 2 +- tests/page/interception.spec.ts | 3 +- tests/page/page-event-request.spec.ts | 6 +- tests/page/page-goto.spec.ts | 3 +- tests/page/page-request-fulfill.spec.ts | 28 +- tests/page/page-request-intercept.spec.ts | 56 +- tests/page/page-route.spec.ts | 4 +- tests/page/pageTestApi.ts | 1 + tests/webview2/webView2Test.ts | 1 + 17 files changed, 271 insertions(+), 391 deletions(-) diff --git a/package-lock.json b/package-lock.json index acd9467df5..b63578e29e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "concurrently": "^6.2.1", "cross-env": "^7.0.3", "dotenv": "^16.0.0", - "electron": "19.0.11", + "electron": "^30.1.2", "enquirer": "^2.3.6", "esbuild": "^0.18.11", "eslint": "^8.55.0", @@ -831,25 +831,24 @@ } }, "node_modules/@electron/get": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz", - "integrity": "sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz", + "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==", "dev": true, "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", - "got": "^9.6.0", + "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "engines": { - "node": ">=8.6" + "node": ">=12" }, "optionalDependencies": { - "global-agent": "^3.0.0", - "global-tunnel-ng": "^2.7.1" + "global-agent": "^3.0.0" } }, "node_modules/@esbuild/aix-ppc64": { @@ -1698,12 +1697,15 @@ ] }, "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" } }, "node_modules/@sveltejs/vite-plugin-svelte": { @@ -1744,15 +1746,15 @@ } }, "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "dependencies": { - "defer-to-connect": "^1.0.1" + "defer-to-connect": "^2.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" } }, "node_modules/@types/babel__core": { @@ -1792,6 +1794,18 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, "node_modules/@types/codemirror": { "version": "5.60.15", "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.15.tgz", @@ -1815,12 +1829,27 @@ "@types/node": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { "version": "18.19.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", @@ -1862,6 +1891,15 @@ "integrity": "sha512-cNw5iH8JkMkb3QkCoe7DaZiawbDQEUX8t7iuQaRTyLOyQCR2h+ibBD4GJt7p5yhUHrlOeL7ZtbxNHeipqNsBzQ==", "dev": true }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", @@ -1901,6 +1939,16 @@ "@types/node": "*" } }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.19.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz", @@ -2773,69 +2821,33 @@ "node": "*" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } }, "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dev": true, "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", + "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true - }, - "node_modules/cacheable-request/node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -3048,21 +3060,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "node_modules/concurrently": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", @@ -3170,28 +3167,11 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "optional": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, "node_modules/cross-env": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", @@ -3293,15 +3273,30 @@ } }, "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "dependencies": { - "mimic-response": "^1.0.0" + "mimic-response": "^3.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/deep-is": { @@ -3319,10 +3314,13 @@ } }, "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } }, "node_modules/define-data-property": { "version": "1.1.1", @@ -3416,28 +3414,22 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/electron": { - "version": "19.0.11", - "resolved": "https://registry.npmjs.org/electron/-/electron-19.0.11.tgz", - "integrity": "sha512-GPM6C1Ze17/gR4koTE171MxrI5unYfFRgXQdkMdpWM2Cd55LMUrVa0QHCsfKpsaloufv9T65lsOn0uZuzCw5UA==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-30.1.2.tgz", + "integrity": "sha512-A5CFGwbA+HSXnzwjc8fP2GIezBcAb0uN/VbNGLOW8DHOYn07rvJ/1bAJECHUUzt5zbfohveG3hpMQiYpbktuDw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@electron/get": "^1.14.1", - "@types/node": "^16.11.26", - "extract-zip": "^1.0.3" + "@electron/get": "^2.0.0", + "@types/node": "^20.9.0", + "extract-zip": "^2.0.1" }, "bin": { "electron": "cli.js" }, "engines": { - "node": ">= 8.6" + "node": ">= 12.20.55" } }, "node_modules/electron-to-chromium": { @@ -3446,10 +3438,13 @@ "integrity": "sha512-CkKf3ZUVZchr+zDpAlNLEEy2NJJ9T64ULWaDgy3THXXlPVPkLu3VOs9Bac44nebVtdwl2geSj6AxTtGDOxoXhg==" }, "node_modules/electron/node_modules/@types/node": { - "version": "16.18.71", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.71.tgz", - "integrity": "sha512-ARO+458bNJQeNEFuPyT6W+q9ULotmsQzhV3XABsFSxEvRMUYENcBsNAHWYPlahU+UHa5gCVwyKT1Z3f1Wwr26Q==", - "dev": true + "version": "20.12.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.13.tgz", + "integrity": "sha512-gBGeanV41c1L171rR7wjbMiEpEI/l5XFQdLLfhr/REwpgDy/4U8y89+i8kRiLzDyZdOkXh+cRaTetUnCYutoXA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -3457,16 +3452,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "optional": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -4067,35 +4052,25 @@ } }, "node_modules/extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "dependencies": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", + "debug": "^4.1.1", + "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "bin": { "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" } }, - "node_modules/extract-zip/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/extract-zip/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/eyes": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", @@ -4355,15 +4330,18 @@ } }, "node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "dependencies": { "pump": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/get-symbol-description": { @@ -4468,9 +4446,9 @@ } }, "node_modules/global-agent/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "optional": true, "dependencies": { @@ -4490,22 +4468,6 @@ "dev": true, "optional": true }, - "node_modules/global-tunnel-ng": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", - "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", - "dev": true, - "optional": true, - "dependencies": { - "encodeurl": "^1.0.2", - "lodash": "^4.17.10", - "npm-conf": "^1.1.3", - "tunnel": "^0.0.6" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -4571,25 +4533,28 @@ } }, "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" }, "engines": { - "node": ">=8.6" + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, "node_modules/graceful-fs": { @@ -4714,6 +4679,19 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -4764,13 +4742,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "optional": true - }, "node_modules/internal-slot": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", @@ -5139,12 +5110,6 @@ "url": "https://github.com/sponsors/mesqueeb" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5378,12 +5343,12 @@ } }, "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/lru-cache": { @@ -5670,36 +5635,15 @@ } }, "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "optional": true, - "dependencies": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" + "node": ">=10" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-conf/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/npm-normalize-package-bin": { @@ -5869,12 +5813,12 @@ } }, "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/p-limit": { @@ -6068,15 +6012,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -6092,12 +6027,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -6118,13 +6047,6 @@ "react-is": "^16.13.1" } }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true, - "optional": true - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -6179,6 +6101,18 @@ } ] }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -6256,21 +6190,6 @@ "npm-normalize-package-bin": "^1.0.0" } }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/readdir-scoped-modules": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", @@ -6369,6 +6288,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -6379,12 +6304,15 @@ } }, "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, "dependencies": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/reusify": { @@ -6522,12 +6450,6 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/safe-regex-test": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz", @@ -6861,15 +6783,6 @@ "node": "*" } }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -7063,15 +6976,6 @@ "node": ">=4" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7223,12 +7127,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -7322,24 +7220,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "node_modules/util-extend": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", diff --git a/package.json b/package.json index 125abb0b7c..6caf9c748d 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "concurrently": "^6.2.1", "cross-env": "^7.0.3", "dotenv": "^16.0.0", - "electron": "19.0.11", + "electron": "^30.1.2", "enquirer": "^2.3.6", "esbuild": "^0.18.11", "eslint": "^8.55.0", diff --git a/tests/android/androidTest.ts b/tests/android/androidTest.ts index 4a30894cd5..7bfff3fbf3 100644 --- a/tests/android/androidTest.ts +++ b/tests/android/androidTest.ts @@ -50,6 +50,7 @@ export const androidTest = baseTest.extend { diff --git a/tests/config/browserTest.ts b/tests/config/browserTest.ts index 8b4fdc27b9..01b574f105 100644 --- a/tests/config/browserTest.ts +++ b/tests/config/browserTest.ts @@ -88,6 +88,7 @@ const test = baseTest.extend isAndroid: [false, { scope: 'worker' }], isElectron: [false, { scope: 'worker' }], + electronMajorVersion: [0, { scope: 'worker' }], isWebView2: [false, { scope: 'worker' }], contextFactory: async ({ _contextFactory }: any, run) => { diff --git a/tests/electron/electron-app.spec.ts b/tests/electron/electron-app.spec.ts index caf7251261..c725752e37 100644 --- a/tests/electron/electron-app.spec.ts +++ b/tests/electron/electron-app.spec.ts @@ -315,8 +315,8 @@ test('should return app name / version from manifest', async ({ launchElectronAp }); }); -test('should report downloads', async ({ launchElectronApp, server }) => { - test.skip(parseInt(require('electron/package.json').version.split('.')[0], 10) < 30, 'Depends on https://github.com/electron/electron/pull/41718'); +test('should report downloads', async ({ launchElectronApp, electronMajorVersion, server }) => { + test.skip(electronMajorVersion < 30, 'Depends on https://github.com/electron/electron/pull/41718'); server.setRoute('/download', (req, res) => { res.setHeader('Content-Type', 'application/octet-stream'); diff --git a/tests/electron/electronTest.ts b/tests/electron/electronTest.ts index fb353905d3..33210e9116 100644 --- a/tests/electron/electronTest.ts +++ b/tests/electron/electronTest.ts @@ -31,6 +31,7 @@ type ElectronTestFixtures = PageTestFixtures & { export const electronTest = baseTest.extend(traceViewerFixtures).extend({ browserVersion: [({}, use) => use(process.env.ELECTRON_CHROMIUM_VERSION), { scope: 'worker' }], browserMajorVersion: [({}, use) => use(Number(process.env.ELECTRON_CHROMIUM_VERSION.split('.')[0])), { scope: 'worker' }], + electronMajorVersion: [({}, use) => use(parseInt(require('electron/package.json').version.split('.')[0], 10)), { scope: 'worker' }], isAndroid: [false, { scope: 'worker' }], isElectron: [true, { scope: 'worker' }], isWebView2: [false, { scope: 'worker' }], diff --git a/tests/library/browsercontext-storage-state.spec.ts b/tests/library/browsercontext-storage-state.spec.ts index 7bd2581c9a..89bb84d2c3 100644 --- a/tests/library/browsercontext-storage-state.spec.ts +++ b/tests/library/browsercontext-storage-state.spec.ts @@ -223,9 +223,9 @@ it('should serialize storageState with lone surrogates', async ({ page, context, expect(storageState.origins[0].localStorage[0].value).toBe(String.fromCharCode(55934)); }); -it('should work when service worker is intefering', async ({ page, context, server, isAndroid, isElectron }) => { +it('should work when service worker is intefering', async ({ page, context, server, isAndroid, isElectron, electronMajorVersion }) => { it.skip(isAndroid); - it.skip(isElectron); + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); server.setRoute('/', (req, res) => { res.writeHead(200, { 'content-type': 'text/html' }); diff --git a/tests/library/page-event-crash.spec.ts b/tests/library/page-event-crash.spec.ts index ea90023630..1bf9c396dd 100644 --- a/tests/library/page-event-crash.spec.ts +++ b/tests/library/page-event-crash.spec.ts @@ -70,9 +70,8 @@ test('should cancel navigation when page crashes', async ({ server, page, crash expect(error.message).toContain('page.goto: Page crashed'); }); -test('should be able to close context when page crashes', async ({ isAndroid, isElectron, isWebView2, page, crash }) => { +test('should be able to close context when page crashes', async ({ isAndroid, isWebView2, page, crash }) => { test.skip(isAndroid); - test.skip(isElectron); test.skip(isWebView2, 'Page.close() is not supported in WebView2'); await page.setContent(`
This page should crash
`); diff --git a/tests/page/expect-boolean.spec.ts b/tests/page/expect-boolean.spec.ts index 719fa33877..a22657bda6 100644 --- a/tests/page/expect-boolean.spec.ts +++ b/tests/page/expect-boolean.spec.ts @@ -455,7 +455,7 @@ test('should print selector syntax error', async ({ page }) => { test.describe(() => { test.skip(({ isAndroid }) => isAndroid, 'server.EMPTY_PAGE is the emulator address 10.0.2.2'); - test.skip(({ isElectron }) => isElectron, 'Protocol error (Storage.getCookies): Browser context management is not supported.'); + test.skip(({ isElectron, electronMajorVersion }) => isElectron && electronMajorVersion < 30, 'Protocol error (Storage.getCookies): Browser context management is not supported.'); test('toBeOK', async ({ page, server }) => { const res = await page.request.get(server.EMPTY_PAGE); diff --git a/tests/page/interception.spec.ts b/tests/page/interception.spec.ts index c381e9f6e3..d71675cc39 100644 --- a/tests/page/interception.spec.ts +++ b/tests/page/interception.spec.ts @@ -33,9 +33,8 @@ it('should work with navigation @smoke', async ({ page, server }) => { expect(requests.get('style.css').isNavigationRequest()).toBe(false); }); -it('should intercept after a service worker', async ({ page, server, browserName, isAndroid, isElectron }) => { +it('should intercept after a service worker', async ({ page, server, browserName, isAndroid }) => { it.skip(isAndroid); - it.skip(isElectron); await page.goto(server.PREFIX + '/serviceworkers/fetchdummy/sw.html'); await page.evaluate(() => window['activationPromise']); diff --git a/tests/page/page-event-request.spec.ts b/tests/page/page-event-request.spec.ts index 07c1fcc3ce..cfc2f7a1e2 100644 --- a/tests/page/page-event-request.spec.ts +++ b/tests/page/page-event-request.spec.ts @@ -107,9 +107,8 @@ it('should report requests and responses handled by service worker with routing' expect(interceptedUrls).toEqual(expectedUrls); }); -it('should report navigation requests and responses handled by service worker', async ({ page, server, isAndroid, isElectron, browserName }) => { +it('should report navigation requests and responses handled by service worker', async ({ page, server, isAndroid, browserName }) => { it.fixme(isAndroid); - it.fixme(isElectron); await page.goto(server.PREFIX + '/serviceworkers/stub/sw.html'); await page.evaluate(() => window['activationPromise']); @@ -136,9 +135,8 @@ it('should report navigation requests and responses handled by service worker', } }); -it('should report navigation requests and responses handled by service worker with routing', async ({ page, server, isAndroid, isElectron, browserName }) => { +it('should report navigation requests and responses handled by service worker with routing', async ({ page, server, isAndroid, browserName }) => { it.fixme(isAndroid); - it.fixme(isElectron); await page.route('**/*', route => route.continue()); await page.goto(server.PREFIX + '/serviceworkers/stub/sw.html'); diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.ts index f0a700429d..5ca9ee6e46 100644 --- a/tests/page/page-goto.spec.ts +++ b/tests/page/page-goto.spec.ts @@ -685,8 +685,7 @@ it('should fail when canceled by another navigation', async ({ page, server }) = expect(error.message).toBeTruthy(); }); -it('should work with lazy loading iframes', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron); +it('should work with lazy loading iframes', async ({ page, server, isAndroid }) => { it.fixme(isAndroid); await page.goto(server.PREFIX + '/frames/lazy-frame.html'); diff --git a/tests/page/page-request-fulfill.spec.ts b/tests/page/page-request-fulfill.spec.ts index 7b78c07625..ebde0dbc56 100644 --- a/tests/page/page-request-fulfill.spec.ts +++ b/tests/page/page-request-fulfill.spec.ts @@ -140,10 +140,10 @@ it('should allow mocking binary responses', async ({ page, server, browserName, expect(await img.screenshot()).toMatchSnapshot('mock-binary-response.png'); }); -it('should allow mocking svg with charset', async ({ page, server, browserName, headless, isAndroid, isElectron, mode }) => { +it('should allow mocking svg with charset', async ({ page, server, browserName, headless, isAndroid, isElectron, electronMajorVersion }) => { it.skip(browserName === 'firefox' && !headless, 'Firefox headed produces a different image.'); it.skip(isAndroid); - it.skip(isElectron, 'Protocol error (Storage.getCookies): Browser context management is not supported'); + it.skip(isElectron && electronMajorVersion < 30, 'Protocol error (Storage.getCookies): Browser context management is not supported'); await page.route('**/*', route => { void route.fulfill({ @@ -253,8 +253,8 @@ it('should include the origin header', async ({ page, server, isAndroid }) => { expect(interceptedRequest.headers()['origin']).toEqual(server.PREFIX); }); -it('should fulfill with global fetch result', async ({ playwright, page, server, isElectron, rewriteAndroidLoopbackURL }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill with global fetch result', async ({ playwright, page, server, isElectron, electronMajorVersion, rewriteAndroidLoopbackURL }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); await page.route('**/*', async route => { const request = await playwright.request.newContext(); const response = await request.get(rewriteAndroidLoopbackURL(server.PREFIX + '/simple.json')); @@ -265,8 +265,8 @@ it('should fulfill with global fetch result', async ({ playwright, page, server, expect(await response.json()).toEqual({ 'foo': 'bar' }); }); -it('should fulfill with fetch result', async ({ page, server, isElectron, rewriteAndroidLoopbackURL }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill with fetch result', async ({ page, server, isElectron, electronMajorVersion, rewriteAndroidLoopbackURL }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); await page.route('**/*', async route => { const response = await page.request.get(rewriteAndroidLoopbackURL(server.PREFIX + '/simple.json')); void route.fulfill({ response }); @@ -276,8 +276,8 @@ it('should fulfill with fetch result', async ({ page, server, isElectron, rewrit expect(await response.json()).toEqual({ 'foo': 'bar' }); }); -it('should fulfill with fetch result and overrides', async ({ page, server, isElectron, rewriteAndroidLoopbackURL }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill with fetch result and overrides', async ({ page, server, isElectron, electronMajorVersion, rewriteAndroidLoopbackURL }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); await page.route('**/*', async route => { const response = await page.request.get(rewriteAndroidLoopbackURL(server.PREFIX + '/simple.json')); void route.fulfill({ @@ -295,8 +295,8 @@ it('should fulfill with fetch result and overrides', async ({ page, server, isEl expect(await response.json()).toEqual({ 'foo': 'bar' }); }); -it('should fetch original request and fulfill', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fetch original request and fulfill', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.route('**/*', async route => { const response = await page.request.fetch(route.request()); @@ -309,8 +309,8 @@ it('should fetch original request and fulfill', async ({ page, server, isElectro expect(await page.title()).toEqual('Woof-Woof'); }); -it('should fulfill with multiple set-cookie', async ({ page, server, isElectron }) => { - it.fixme(isElectron, 'Electron 14+ is required'); +it('should fulfill with multiple set-cookie', async ({ page, server, isElectron, electronMajorVersion }) => { + it.skip(isElectron && electronMajorVersion < 14, 'Electron 14+ is required'); const cookies = ['a=b', 'c=d']; await page.route('**/empty.html', async route => { void route.fulfill({ @@ -442,9 +442,9 @@ it('should fulfill json', async ({ page, server }) => { it('should fulfill with gzip and readback', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/29261' }, -}, async ({ page, server, isAndroid, isElectron }) => { +}, async ({ page, server, isAndroid, isElectron, electronMajorVersion }) => { it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); - it.fixme(isElectron, 'error: Browser context management is not supported.'); + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); server.enableGzip('/one-style.html'); await page.route('**/one-style.html', async route => { const response = await route.fetch(); diff --git a/tests/page/page-request-intercept.spec.ts b/tests/page/page-request-intercept.spec.ts index 8b0b82bedf..33516606e7 100644 --- a/tests/page/page-request-intercept.spec.ts +++ b/tests/page/page-request-intercept.spec.ts @@ -33,8 +33,8 @@ const it = base.extend<{ rewriteAndroidLoopbackURL(url: string): string }>({ }) }); -it('should fulfill intercepted response', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill intercepted response', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.route('**/*', async route => { const response = await page.request.fetch(route.request()); @@ -55,10 +55,10 @@ it('should fulfill intercepted response', async ({ page, server, isElectron, isA expect(await page.evaluate(() => document.body.textContent)).toBe('Yo, page!'); }); -it('should fulfill response with empty body', async ({ page, server, isAndroid, isElectron, browserName, browserMajorVersion }) => { +it('should fulfill response with empty body', async ({ page, server, isAndroid, isElectron, electronMajorVersion, browserName, browserMajorVersion }) => { it.skip(browserName === 'chromium' && browserMajorVersion <= 91, 'Fails in Electron that uses old Chromium'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); - it.skip(isElectron, 'Protocol error (Storage.getCookies): Browser context management is not supported.'); + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); await page.route('**/*', async route => { const response = await page.request.fetch(route.request()); await route.fulfill({ @@ -73,8 +73,8 @@ it('should fulfill response with empty body', async ({ page, server, isAndroid, expect(await response.text()).toBe(''); }); -it('should override with defaults when intercepted response not provided', async ({ page, server, browserName, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should override with defaults when intercepted response not provided', async ({ page, server, browserName, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); server.setRoute('/empty.html', (req, res) => { res.setHeader('foo', 'bar'); @@ -95,8 +95,8 @@ it('should override with defaults when intercepted response not provided', async expect(response.headers()).toEqual({ }); }); -it('should fulfill with any response', async ({ page, server, isElectron, rewriteAndroidLoopbackURL }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill with any response', async ({ page, server, isElectron, electronMajorVersion, rewriteAndroidLoopbackURL }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); server.setRoute('/sample', (req, res) => { res.setHeader('foo', 'bar'); @@ -117,8 +117,8 @@ it('should fulfill with any response', async ({ page, server, isElectron, rewrit expect(response.headers()['foo']).toBe('bar'); }); -it('should support fulfill after intercept', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should support fulfill after intercept', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); const requestPromise = server.waitForRequest('/title.html'); await page.route('**', async route => { @@ -132,8 +132,8 @@ it('should support fulfill after intercept', async ({ page, server, isElectron, expect(await response.text()).toBe(original); }); -it('should give access to the intercepted response', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should give access to the intercepted response', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.goto(server.EMPTY_PAGE); @@ -156,8 +156,8 @@ it('should give access to the intercepted response', async ({ page, server, isEl await Promise.all([route.fulfill({ response }), evalPromise]); }); -it('should give access to the intercepted response body', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should give access to the intercepted response body', async ({ page, server, isAndroid, isElectron, electronMajorVersion }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.goto(server.EMPTY_PAGE); @@ -194,8 +194,8 @@ it('should intercept multipart/form-data request body', async ({ page, server, a expect(request.postData()).toContain(fs.readFileSync(filePath, 'utf8')); }); -it('should fulfill intercepted response using alias', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill intercepted response using alias', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.route('**/*', async route => { const response = await route.fetch(); @@ -206,8 +206,8 @@ it('should fulfill intercepted response using alias', async ({ page, server, isE expect(response.headers()['content-type']).toContain('text/html'); }); -it('should support timeout option in route.fetch', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should support timeout option in route.fetch', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); server.setRoute('/slow', (req, res) => { @@ -224,8 +224,8 @@ it('should support timeout option in route.fetch', async ({ page, server, isElec expect(error.message).toContain(`Timeout 2000ms exceeded`); }); -it('should not follow redirects when maxRedirects is set to 0 in route.fetch', async ({ page, server, isAndroid, isElectron }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should not follow redirects when maxRedirects is set to 0 in route.fetch', async ({ page, server, isAndroid, isElectron, electronMajorVersion }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); server.setRedirect('/foo', '/empty.html'); @@ -239,8 +239,8 @@ it('should not follow redirects when maxRedirects is set to 0 in route.fetch', a expect(await page.content()).toContain('hello'); }); -it('should intercept with url override', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should intercept with url override', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.route('**/*.html', async route => { const response = await route.fetch({ url: server.PREFIX + '/one-style.html' }); @@ -251,8 +251,8 @@ it('should intercept with url override', async ({ page, server, isElectron, isAn expect((await response.body()).toString()).toContain('one-style.css'); }); -it('should intercept with post data override', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should intercept with post data override', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); const requestPromise = server.waitForRequest('/empty.html'); await page.route('**/*.html', async route => { @@ -266,8 +266,8 @@ it('should intercept with post data override', async ({ page, server, isElectron expect((await request.postBody).toString()).toBe(JSON.stringify({ 'foo': 'bar' })); }); -it('should fulfill popup main request using alias', async ({ page, server, isElectron, isAndroid }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +it('should fulfill popup main request using alias', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); it.skip(isAndroid, 'The internal Android localhost (10.0.0.2) != the localhost on the host'); await page.context().route('**/*', async route => { @@ -284,8 +284,8 @@ it('should fulfill popup main request using alias', async ({ page, server, isEle it('request.postData is not null when fetching FormData with a Blob', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/24077' } -}, async ({ server, page, browserName, isElectron }) => { - it.fixme(isElectron, 'error: Browser context management is not supported.'); +}, async ({ server, page, browserName, isElectron, electronMajorVersion }) => { + it.skip(isElectron && electronMajorVersion < 31); it.fixme(browserName === 'webkit', 'The body is empty in WebKit when intercepting'); await page.goto(server.EMPTY_PAGE); await page.setContent(` diff --git a/tests/page/page-route.spec.ts b/tests/page/page-route.spec.ts index ebde1617ea..911521018e 100644 --- a/tests/page/page-route.spec.ts +++ b/tests/page/page-route.spec.ts @@ -152,9 +152,9 @@ it('should contain referer header', async ({ page, server }) => { expect(requests[1].headers().referer).toContain('/one-style.html'); }); -it('should properly return navigation response when URL has cookies', async ({ page, server, isElectron, isAndroid }) => { +it('should properly return navigation response when URL has cookies', async ({ page, server, isAndroid, isElectron, electronMajorVersion }) => { it.skip(isAndroid, 'No isolated context'); - it.fixme(isElectron, 'error: Browser context management is not supported.'); + it.skip(isElectron && electronMajorVersion < 30, 'error: Browser context management is not supported.'); // Setup cookie. await page.goto(server.EMPTY_PAGE); diff --git a/tests/page/pageTestApi.ts b/tests/page/pageTestApi.ts index a7b124a84b..cf497e76c0 100644 --- a/tests/page/pageTestApi.ts +++ b/tests/page/pageTestApi.ts @@ -32,6 +32,7 @@ export type PageWorkerFixtures = { browserName: 'chromium' | 'firefox' | 'webkit'; browserVersion: string; browserMajorVersion: number; + electronMajorVersion: number; isAndroid: boolean; isElectron: boolean; isWebView2: boolean; diff --git a/tests/webview2/webView2Test.ts b/tests/webview2/webView2Test.ts index b72f57ce93..dcadcebe6d 100644 --- a/tests/webview2/webView2Test.ts +++ b/tests/webview2/webView2Test.ts @@ -30,6 +30,7 @@ export const webView2Test = baseTest.extend(traceViewerFixt browserMajorVersion: [({ browserVersion }, use) => use(Number(browserVersion.split('.')[0])), { scope: 'worker' }], isAndroid: [false, { scope: 'worker' }], isElectron: [false, { scope: 'worker' }], + electronMajorVersion: [0, { scope: 'worker' }], isWebView2: [true, { scope: 'worker' }], browser: [async ({ playwright }, use, testInfo) => {