fix: add --no-sandbox to PLAYWRIGHT_LOCAL launch options

Headless Chrome crashes in some environments without sandbox flags.
Only applies when PLAYWRIGHT_LOCAL=1 (QA Phase 2 recording).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-04-10 08:56:26 +00:00
parent 8664d2201e
commit 14e194ab34

View File

@@ -11,7 +11,15 @@ const maybeLocalOptions: PlaywrightTestConfig = process.env.PLAYWRIGHT_LOCAL
use: {
trace: 'on', // Always capture traces (CI uses 'on-first-retry')
video: 'on' // Always record video (CI uses 'retain-on-failure')
video: 'on', // Always record video (CI uses 'retain-on-failure')
launchOptions: {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-gpu',
'--disable-dev-shm-usage'
]
}
}
}
: {