Skip to content

Commit 4654f83

Browse files
committed
Fix Playwright hanging in check command - respect dry-run mode
- Added store.dryRun checks in _beforeSuite and _before - Prevents browser launch during 'codecept check' command - Check command was timing out trying to launch real browser - Now skips all browser operations when in dry-run mode
1 parent 7dc82ba commit 4654f83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/helper/Playwright.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,12 @@ class Playwright extends Helper {
585585
}
586586

587587
_beforeSuite() {
588+
// Skip browser start in dry-run mode (used by check command)
589+
if (store.dryRun) {
590+
this.debugSection('Dry Run', 'Skipping browser start')
591+
return
592+
}
593+
588594
// Start browser if not manually started and not already running
589595
// Browser should start in singleton mode (restart: false) or when restart strategy is enabled
590596
if (!this.options.manualStart && !this.isRunning) {
@@ -594,6 +600,12 @@ class Playwright extends Helper {
594600
}
595601

596602
async _before(test) {
603+
// Skip browser operations in dry-run mode (used by check command)
604+
if (store.dryRun) {
605+
this.currentRunningTest = test
606+
return
607+
}
608+
597609
this.currentRunningTest = test
598610

599611
// Reset failure tracking for each test to prevent false positives

0 commit comments

Comments
 (0)