From ad74185ea1ff918b818c580314bb2ee47b237aa1 Mon Sep 17 00:00:00 2001 From: Ammar Date: Mon, 13 Oct 2025 14:59:15 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20skip=20splash=20screen=20?= =?UTF-8?q?in=20E2E=20tests=20to=20fix=20flaky=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The splash screen was being shown in E2E mode, causing app.firstWindow() to grab the splash window instead of the main window. This made the "Projects" navigation check fail. Fix: Skip splash screen when CMUX_E2E=1 --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c8894ac28..1bb5e09cf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -378,7 +378,11 @@ if (gotTheLock) { // 2. Load services while splash visible (fast - ~100ms) // 3. Create window and start loading content (splash stays visible) // 4. When window ready-to-show: close splash, show main window - await showSplashScreen(); // Wait for splash to actually load + // + // Skip splash in E2E tests to avoid app.firstWindow() grabbing the wrong window + if (!isE2ETest) { + await showSplashScreen(); // Wait for splash to actually load + } await loadServices(); createWindow(); // Note: splash closes in ready-to-show event handler