diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd6e8942875..35da191b181 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,7 +133,7 @@ jobs: echo "pid=$pid" >> $GITHUB_OUTPUT sleep 5 - name: Run VRT - uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy + uses: docker://mcr.microsoft.com/playwright:v1.47.2-jammy env: STORYBOOK_URL: 'http://172.17.0.1:6006' with: @@ -285,7 +285,7 @@ jobs: echo "pid=$pid" >> $GITHUB_OUTPUT sleep 5 - name: Run AAT - uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy + uses: docker://mcr.microsoft.com/playwright:v1.47.2-jammy env: STORYBOOK_URL: 'http://172.17.0.1:6006' with: diff --git a/.github/workflows/vrt.yml b/.github/workflows/vrt.yml index 81a7be8f420..1cd02e91ebd 100644 --- a/.github/workflows/vrt.yml +++ b/.github/workflows/vrt.yml @@ -53,7 +53,7 @@ jobs: echo "pid=$pid" >> $GITHUB_OUTPUT sleep 5 - name: Run VRT - uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy + uses: docker://mcr.microsoft.com/playwright:v1.47.2-jammy env: STORYBOOK_URL: 'http://172.17.0.1:6006' with: diff --git a/.playwright/snapshots/components/SelectPanel.test.ts-snapshots/SelectPanel-Default-forced-colors-dark-modern-action-list--true-linux.png b/.playwright/snapshots/components/SelectPanel.test.ts-snapshots/SelectPanel-Default-forced-colors-dark-modern-action-list--true-linux.png index c36315cc576..febdfd9066d 100644 Binary files a/.playwright/snapshots/components/SelectPanel.test.ts-snapshots/SelectPanel-Default-forced-colors-dark-modern-action-list--true-linux.png and b/.playwright/snapshots/components/SelectPanel.test.ts-snapshots/SelectPanel-Default-forced-colors-dark-modern-action-list--true-linux.png differ diff --git a/package-lock.json b/package-lock.json index e22de925de1..cb8c5c32b0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@github/markdownlint-github": "^0.6.0", "@github/prettier-config": "0.0.6", "@mdx-js/react": "1.6.22", - "@playwright/test": "1.43.0", + "@playwright/test": "^1.47.2", "@prettier/sync": "0.5.1", "@primer/stylelint-config": "^13.0.1-rc.5358628", "@size-limit/preset-big-lib": "11.0.2", @@ -6208,17 +6208,19 @@ } }, "node_modules/@playwright/test": { - "version": "1.43.0", + "version": "1.47.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.47.2.tgz", + "integrity": "sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.43.0" + "playwright": "1.47.2" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@prettier/sync": { @@ -22906,31 +22908,35 @@ } }, "node_modules/playwright": { - "version": "1.43.0", + "version": "1.47.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.47.2.tgz", + "integrity": "sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.43.0" + "playwright-core": "1.47.2" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.43.0", + "version": "1.47.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.2.tgz", + "integrity": "sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==", "dev": true, "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/polished": { diff --git a/package.json b/package.json index 63a3c2fbc27..4de21e08999 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@github/markdownlint-github": "^0.6.0", "@github/prettier-config": "0.0.6", "@mdx-js/react": "1.6.22", - "@playwright/test": "1.43.0", + "@playwright/test": "^1.47.2", "@prettier/sync": "0.5.1", "@primer/stylelint-config": "^13.0.1-rc.5358628", "@size-limit/preset-big-lib": "11.0.2", diff --git a/script/test-e2e b/script/test-e2e index 8ffffd42274..462fd5d625e 100755 --- a/script/test-e2e +++ b/script/test-e2e @@ -1,12 +1,26 @@ #!/bin/bash +set -e set -x PLAYWRIGHT_VERSION=$(npm --json list @playwright/test | jq --raw-output '.dependencies["@playwright/test"].version') +if [ -z "$PLAYWRIGHT_VERSION" ]; then + echo "Unable to find Playwright version. Make sure @playwright/test is installed." + exit 1 +fi + +echo "Using Playwright version $PLAYWRIGHT_VERSION" + +if [ -z "$STORYBOOK_URL" ]; then + STORYBOOK_URL="http://host.docker.internal:6006" +fi + +echo "Using Storybook at: $STORYBOOK_URL" + docker run --rm \ --network host \ -v $(pwd):/workspace \ -w /workspace \ -it "mcr.microsoft.com/playwright:v$PLAYWRIGHT_VERSION-jammy" \ - /bin/bash -c "npm install && STORYBOOK_URL=http://host.docker.internal:6006 npx playwright test $@" + /bin/bash -c "npm install && STORYBOOK_URL=$STORYBOOK_URL npx playwright test $@"