Skip to content

Commit 2bb5535

Browse files
authored
test: use new chromium headless browser for playwright, bump playwright (#14464)
This PR bumps the playwright version and configures it to use the new chromium headless browser. See https://playwright.dev/docs/browsers#chromium-new-headless-mode and microsoft/playwright#33566 > New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-end web app testing or browser extension testing. > Switching to new headless mode gives you a browser that closely follows the regular headed browser, at the cost of being a bit heavier on features you probably do not need and being slightly slower. In order for CI playwright caching to work, the playwright version we use in our templates needs to match the one we use in our test suite. Thus, this PR bumps the templates playwright version and regenerates them.
1 parent 339a0c3 commit 2bb5535

31 files changed

+165
-167
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ jobs:
364364

365365
- name: Setup Playwright - Browsers and Dependencies
366366
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
367-
run: pnpm exec playwright install --with-deps chromium
367+
run: pnpm exec playwright install --with-deps chromium --no-shell
368368

369369
- name: Setup Playwright - Dependencies-only
370370
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true'
@@ -591,7 +591,7 @@ jobs:
591591
- name: Start PostgreSQL
592592
uses: CasperWA/postgresql-action@v1.2
593593
with:
594-
postgresql version: "14" # See https://hub.docker.com/_/postgres for available versions
594+
postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions
595595
postgresql db: ${{ env.POSTGRES_DB }}
596596
postgresql user: ${{ env.POSTGRES_USER }}
597597
postgresql password: ${{ env.POSTGRES_PASSWORD }}
@@ -753,4 +753,4 @@ jobs:
753753
if: github.event.pull_request.head.repo.fork == false
754754
uses: exoego/esbuild-bundle-analyzer@v1
755755
with:
756-
metafiles: "packages/payload/meta_index.json,packages/payload/meta_shared.json,packages/ui/meta_client.json,packages/ui/meta_shared.json,packages/next/meta_index.json,packages/richtext-lexical/meta_client.json"
756+
metafiles: 'packages/payload/meta_index.json,packages/payload/meta_shared.json,packages/ui/meta_client.json,packages/ui/meta_shared.json,packages/next/meta_index.json,packages/richtext-lexical/meta_client.json'

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"@payloadcms/eslint-config": "workspace:*",
144144
"@payloadcms/eslint-plugin": "workspace:*",
145145
"@payloadcms/live-preview-react": "workspace:*",
146-
"@playwright/test": "1.54.1",
146+
"@playwright/test": "1.56.1",
147147
"@sentry/nextjs": "^8.33.1",
148148
"@sentry/node": "^8.33.1",
149149
"@swc-node/register": "1.10.10",
@@ -178,8 +178,8 @@
178178
"open": "^10.1.0",
179179
"p-limit": "^5.0.0",
180180
"pg": "8.16.3",
181-
"playwright": "1.54.1",
182-
"playwright-core": "1.54.1",
181+
"playwright": "1.56.1",
182+
"playwright-core": "1.56.1",
183183
"prettier": "3.5.3",
184184
"react": "19.1.1",
185185
"react-dom": "19.1.1",

pnpm-lock.yaml

Lines changed: 81 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/_template/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"devDependencies": {
3434
"@eslint/eslintrc": "^3.2.0",
35-
"@playwright/test": "1.54.1",
35+
"@playwright/test": "1.56.1",
3636
"@testing-library/react": "16.3.0",
3737
"@types/node": "^22.5.4",
3838
"@types/react": "19.1.8",
@@ -41,8 +41,8 @@
4141
"eslint": "^9.16.0",
4242
"eslint-config-next": "15.4.4",
4343
"jsdom": "26.1.0",
44-
"playwright": "1.54.1",
45-
"playwright-core": "1.54.1",
44+
"playwright": "1.56.1",
45+
"playwright-core": "1.56.1",
4646
"prettier": "^3.4.2",
4747
"typescript": "5.7.3",
4848
"vite-tsconfig-paths": "5.1.4",

templates/_template/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig({
3030
projects: [
3131
{
3232
name: 'chromium',
33-
use: { ...devices['Desktop Chrome'] },
33+
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
3434
},
3535
],
3636
webServer: {

templates/blank/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"sharp": "0.34.2"
3333
},
3434
"devDependencies": {
35-
"@playwright/test": "1.54.1",
35+
"@playwright/test": "1.56.1",
3636
"@testing-library/react": "16.3.0",
3737
"@types/node": "^22.5.4",
3838
"@types/react": "19.1.8",
@@ -41,8 +41,8 @@
4141
"eslint": "^9.16.0",
4242
"eslint-config-next": "15.4.4",
4343
"jsdom": "26.1.0",
44-
"playwright": "1.54.1",
45-
"playwright-core": "1.54.1",
44+
"playwright": "1.56.1",
45+
"playwright-core": "1.56.1",
4646
"prettier": "^3.4.2",
4747
"typescript": "5.7.3",
4848
"vite-tsconfig-paths": "5.1.4",

templates/blank/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig({
3030
projects: [
3131
{
3232
name: 'chromium',
33-
use: { ...devices['Desktop Chrome'] },
33+
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
3434
},
3535
],
3636
webServer: {

templates/ecommerce/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig({
3030
projects: [
3131
{
3232
name: 'chromium',
33-
use: { ...devices['Desktop Chrome'] },
33+
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
3434
},
3535
],
3636
webServer: {

templates/website/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"devDependencies": {
5959
"@eslint/eslintrc": "^3.2.0",
60-
"@playwright/test": "1.54.1",
60+
"@playwright/test": "1.56.1",
6161
"@tailwindcss/typography": "^0.5.13",
6262
"@testing-library/react": "16.3.0",
6363
"@types/escape-html": "^1.0.2",
@@ -70,8 +70,8 @@
7070
"eslint": "^9.16.0",
7171
"eslint-config-next": "15.4.4",
7272
"jsdom": "26.1.0",
73-
"playwright": "1.54.1",
74-
"playwright-core": "1.54.1",
73+
"playwright": "1.56.1",
74+
"playwright-core": "1.56.1",
7575
"postcss": "^8.4.38",
7676
"prettier": "^3.4.2",
7777
"tailwindcss": "^3.4.3",

templates/website/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default defineConfig({
3030
projects: [
3131
{
3232
name: 'chromium',
33-
use: { ...devices['Desktop Chrome'] },
33+
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
3434
},
3535
],
3636
webServer: {

0 commit comments

Comments
 (0)