From 048750599df13766e431ce443c2610c3511574dc Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 2 Feb 2026 21:15:49 -0800 Subject: [PATCH] fix: open terminal panel before checking for Logs tab The Logs tab is only visible when the panel is open. The previous test was waiting for toBeAttached() but the tab wasn't rendered until the panel was opened. Amp-Thread-ID: https://ampcode.com/threads/T-019c21eb-bc34-763e-a553-17ff79018dcf --- .../tests/bottomPanelShortcuts.spec.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index 9dc683b4fb..e01078c94b 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -148,11 +148,21 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { comfyPage }) => { // Terminal tabs load asynchronously via dynamic import - wait for registration - // Use expect().toPass() for auto-retry polling pattern + // Open terminal panel first to make tabs visible, then poll for Logs tab await expect(async () => { - const logsTab = comfyPage.page.getByRole('tab', { name: /Logs/i }) - await expect(logsTab).toBeAttached() - }).toPass({ timeout: 10_000 }) + await comfyPage.page + .locator('button[aria-label*="Toggle Bottom Panel"]') + .click() + await expect( + comfyPage.page.getByRole('tab', { name: /Logs/i }) + ).toBeVisible({ timeout: 1000 }) + }).toPass({ timeout: 15_000 }) + + // Close the terminal panel + await comfyPage.page + .locator('button[aria-label*="Toggle Bottom Panel"]') + .click() + await expect(comfyPage.page.locator('.bottom-panel')).not.toBeVisible() // Open shortcuts panel await comfyPage.page