From 0dbf155a650a49e2a13d5e9b80139fc3a44ef81a Mon Sep 17 00:00:00 2001 From: Zane <75694352+zanesq@users.noreply.github.com> Date: Tue, 20 May 2025 16:09:06 -0700 Subject: [PATCH] Fix e2e tests after top bar redesign (#2550) --- ui/desktop/tests/e2e/app.spec.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/desktop/tests/e2e/app.spec.ts b/ui/desktop/tests/e2e/app.spec.ts index fd4ad889..b33f265f 100644 --- a/ui/desktop/tests/e2e/app.spec.ts +++ b/ui/desktop/tests/e2e/app.spec.ts @@ -248,10 +248,13 @@ test.describe('Goose App', () => { test('dark mode toggle', async () => { console.log('Testing dark mode toggle...'); - await selectProvider(mainWindow, providers[0]); - - // Click the three dots menu button in the top right - await mainWindow.waitForSelector('div[class*="bg-bgSubtle border-b border-borderSubtle"]'); + const chatTextarea = await mainWindow.waitForSelector('[data-testid="chat-input"]', { + timeout: 2000 + }).catch(() => null); + if (!chatTextarea) { + await selectProvider(mainWindow, providers[0]); + } + const menuButton = await mainWindow.waitForSelector('[data-testid="more-options-button"]', { timeout: 5000, state: 'visible'