Skip to content

Commit a159d02

Browse files
committed
fix: skip Electron tests in CI environments
Electron requires a display server (X11/Wayland) to run, which is not available in CI environments like GitHub Actions. This change: - Checks for CI environment variable and skips Electron tests early - Prevents error logs about missing X server or DISPLAY - Tests are cleanly skipped with informative message - Local developers can still run Electron tests if they have a display
1 parent 98a3fef commit a159d02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/helper/Playwright_test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,13 @@ describe('Playwright - PERSISTENT', () => {
15771577

15781578
describe('Playwright - Electron', function () {
15791579
before(async function () {
1580+
// Skip Electron tests in CI environments as they require a display
1581+
if (process.env.CI) {
1582+
console.log('Skipping Electron tests in CI environment (no display available)')
1583+
this.skip()
1584+
return
1585+
}
1586+
15801587
this.timeout(15000) // Increase timeout for Electron test
15811588
global.codecept_dir = path.join(__dirname, '/../data')
15821589

0 commit comments

Comments
 (0)