Unverified Commit 9dd1db5e authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Upgrade @playwright/test and cleanup internal APIs (#80334)

parent 345c9181
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"@opentelemetry/api": "^1.1.0", "@opentelemetry/api": "^1.1.0",
"@playwright/test": "^1.41.2", "@playwright/test": "^1.51.1",
"babel-plugin-react-compiler": "*", "babel-plugin-react-compiler": "*",
"react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
"react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
"@next/react-refresh-utils": "15.4.0-canary.79", "@next/react-refresh-utils": "15.4.0-canary.79",
"@next/swc": "15.4.0-canary.79", "@next/swc": "15.4.0-canary.79",
"@opentelemetry/api": "1.6.0", "@opentelemetry/api": "1.6.0",
"@playwright/test": "1.41.2", "@playwright/test": "1.51.1",
"@rspack/core": "1.3.12", "@rspack/core": "1.3.12",
"@storybook/addon-a11y": "8.6.0", "@storybook/addon-a11y": "8.6.0",
"@storybook/addon-essentials": "8.6.0", "@storybook/addon-essentials": "8.6.0",
......
...@@ -9,33 +9,13 @@ export interface StepProps { ...@@ -9,33 +9,13 @@ export interface StepProps {
params?: Record<string, string | number | boolean | null | undefined> params?: Record<string, string | number | boolean | null | undefined>
} }
// Access the internal Playwright API until it's exposed publicly.
// See https://github.com/microsoft/playwright/issues/27059.
interface TestInfoWithRunAsStep extends TestInfo {
_runAsStep: <T>(
stepInfo: StepProps,
handler: (result: { complete: Complete }) => Promise<T>
) => Promise<T>
}
type Complete = (result: { error?: any }) => void type Complete = (result: { error?: any }) => void
function isWithRunAsStep(
testInfo: TestInfo
): testInfo is TestInfoWithRunAsStep {
return '_runAsStep' in testInfo
}
export async function step<T>( export async function step<T>(
testInfo: TestInfo, _testInfo: TestInfo,
props: StepProps, props: StepProps,
handler: (complete: Complete) => Promise<Awaited<T>> handler: (complete: Complete) => Promise<Awaited<T>>
): Promise<Awaited<T>> { ): Promise<Awaited<T>> {
if (isWithRunAsStep(testInfo)) {
return testInfo._runAsStep(props, ({ complete }) => handler(complete))
}
// Fallback to the `test.step()`.
let result: Awaited<T> let result: Awaited<T>
let reportedError: any let reportedError: any
try { try {
......
...@@ -1040,8 +1040,8 @@ importers: ...@@ -1040,8 +1040,8 @@ importers:
specifier: 1.6.0 specifier: 1.6.0
version: 1.6.0 version: 1.6.0
'@playwright/test': '@playwright/test':
specifier: 1.41.2 specifier: 1.51.1
version: 1.41.2 version: 1.51.1
'@rspack/core': '@rspack/core':
specifier: 1.3.12 specifier: 1.3.12
version: 1.3.12(@swc/helpers@0.5.15) version: 1.3.12(@swc/helpers@0.5.15)
...@@ -1218,7 +1218,7 @@ importers: ...@@ -1218,7 +1218,7 @@ importers:
version: 3.0.0 version: 3.0.0
axe-playwright: axe-playwright:
specifier: 2.0.3 specifier: 2.0.3
version: 2.0.3(playwright@1.48.0) version: 2.0.3(playwright@1.51.1)
babel-plugin-react-compiler: babel-plugin-react-compiler:
specifier: 19.0.0-beta-e552027-20250112 specifier: 19.0.0-beta-e552027-20250112
version: 19.0.0-beta-e552027-20250112 version: 19.0.0-beta-e552027-20250112
...@@ -4633,10 +4633,9 @@ packages: ...@@ -4633,10 +4633,9 @@ packages:
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
'@playwright/test@1.41.2': '@playwright/test@1.51.1':
resolution: {integrity: sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==} resolution: {integrity: sha512-nM+kEaTSAoVlXmMPH10017vn3FSiFqr/bh4fKg9vmAdMfd9SDqRZNvPSiAHADc/itWak+qPvMPZQOPwCBW7k7Q==}
engines: {node: '>=16'} engines: {node: '>=18'}
deprecated: Please update to the latest version of Playwright to test up-to-date browsers.
hasBin: true hasBin: true
'@polka/url@1.0.0-next.11': '@polka/url@1.0.0-next.11':
...@@ -12922,19 +12921,14 @@ packages: ...@@ -12922,19 +12921,14 @@ packages:
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright-core@1.41.2:
resolution: {integrity: sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==}
engines: {node: '>=16'}
hasBin: true
playwright-core@1.48.0: playwright-core@1.48.0:
resolution: {integrity: sha512-RBvzjM9rdpP7UUFrQzRwR8L/xR4HyC1QXMzGYTbf1vjw25/ya9NRAVnXi/0fvFopjebvyPzsmoK58xxeEOaVvA==} resolution: {integrity: sha512-RBvzjM9rdpP7UUFrQzRwR8L/xR4HyC1QXMzGYTbf1vjw25/ya9NRAVnXi/0fvFopjebvyPzsmoK58xxeEOaVvA==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright@1.41.2: playwright-core@1.51.1:
resolution: {integrity: sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==} resolution: {integrity: sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw==}
engines: {node: '>=16'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright@1.48.0: playwright@1.48.0:
...@@ -12942,6 +12936,11 @@ packages: ...@@ -12942,6 +12936,11 @@ packages:
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright@1.51.1:
resolution: {integrity: sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==}
engines: {node: '>=18'}
hasBin: true
pluralize@8.0.0: pluralize@8.0.0:
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'} engines: {node: '>=4'}
...@@ -13842,7 +13841,6 @@ packages: ...@@ -13842,7 +13841,6 @@ packages:
engines: {node: '>=0.6.0', teleport: '>=0.2.0'} engines: {node: '>=0.6.0', teleport: '>=0.2.0'}
deprecated: |- deprecated: |-
You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
(For a CapTP with native promises, see @endo/eventual-send and @endo/captp) (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
qs@6.11.0: qs@6.11.0:
...@@ -20329,9 +20327,9 @@ snapshots: ...@@ -20329,9 +20327,9 @@ snapshots:
'@pkgr/core@0.1.1': {} '@pkgr/core@0.1.1': {}
'@playwright/test@1.41.2': '@playwright/test@1.51.1':
dependencies: dependencies:
playwright: 1.41.2 playwright: 1.51.1
'@polka/url@1.0.0-next.11': {} '@polka/url@1.0.0-next.11': {}
...@@ -22524,14 +22522,14 @@ snapshots: ...@@ -22524,14 +22522,14 @@ snapshots:
axe-core: 4.10.0 axe-core: 4.10.0
mustache: 4.2.0 mustache: 4.2.0
axe-playwright@2.0.3(playwright@1.48.0): axe-playwright@2.0.3(playwright@1.51.1):
dependencies: dependencies:
'@types/junit-report-builder': 3.0.2 '@types/junit-report-builder': 3.0.2
axe-core: 4.10.0 axe-core: 4.10.0
axe-html-reporter: 2.2.11(axe-core@4.10.0) axe-html-reporter: 2.2.11(axe-core@4.10.0)
junit-report-builder: 5.1.1 junit-report-builder: 5.1.1
picocolors: 1.1.1 picocolors: 1.1.1
playwright: 1.48.0 playwright: 1.51.1
axios@0.26.1: axios@0.26.1:
dependencies: dependencies:
...@@ -30961,19 +30959,19 @@ snapshots: ...@@ -30961,19 +30959,19 @@ snapshots:
dependencies: dependencies:
playwright-core: 1.48.0 playwright-core: 1.48.0
playwright-core@1.41.2: {}
playwright-core@1.48.0: {} playwright-core@1.48.0: {}
playwright@1.41.2: playwright-core@1.51.1: {}
playwright@1.48.0:
dependencies: dependencies:
playwright-core: 1.41.2 playwright-core: 1.48.0
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
playwright@1.48.0: playwright@1.51.1:
dependencies: dependencies:
playwright-core: 1.48.0 playwright-core: 1.51.1
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment