Skip to content

Commit 5134c87

Browse files
committed
chore: make e2e test headless by default
1 parent 22a638b commit 5134c87

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/e2e-next.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
node-version: 'lts/*'
1818
- name: NPM Install
1919
run: npm install
20-
- name: Run tests against next@latest
20+
- name: Run Next.js e2e test suite
2121
run: npm run test:next
2222
env:
2323
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }}

test/e2e/next-test-lib/browsers/playwright.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { BrowserInterface, Event } from './base'
22
import fs from 'fs-extra'
33
import { chromium, webkit, firefox, Browser, BrowserContext, Page, ElementHandle, devices } from 'playwright-chromium'
44
import path from 'path'
5-
5+
import destr from 'destr'
66
let page: Page
77
let browser: Browser
88
let context: BrowserContext
@@ -34,7 +34,8 @@ export class Playwright extends BrowserInterface {
3434

3535
async setup(browserName: string, locale?: string) {
3636
if (browser) return
37-
const headless = !!process.env.HEADLESS
37+
// Headless by default
38+
const headless = destr(process.env.HEADLESS) ?? true
3839
let device
3940

4041
if (process.env.DEVICE_NAME) {

0 commit comments

Comments
 (0)