From c6bfdb63772ec18b05a39811967837fbfc37bb65 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 1 Feb 2026 20:03:36 -0800 Subject: [PATCH] test: skip terminal switching test when terminal tabs unavailable Amp-Thread-ID: https://ampcode.com/threads/T-019c1c14-d3a2-740c-a304-840f14971bde --- .../tests/bottomPanelShortcuts.spec.ts | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index cdc4578aa..66422c544 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -147,10 +147,31 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { test('should maintain panel state when switching to terminal', async ({ comfyPage }) => { - // Wait for terminal tab to be registered (loaded asynchronously) - await expect(comfyPage.page.locator('[id*="logs-terminal"]')).toBeVisible({ - timeout: 10000 - }) + // First open the bottom panel to check if terminal tab is available + await comfyPage.page + .locator('button[aria-label*="Toggle Bottom Panel"]') + .click() + await expect(comfyPage.page.locator('.bottom-panel')).toBeVisible() + + // Check if terminal tab exists (loaded asynchronously, not available in cloud) + const terminalTabExists = await comfyPage.page + .locator('[id*="logs-terminal"]') + .isVisible({ timeout: 5000 }) + .catch(() => false) + + if (!terminalTabExists) { + // Close panel and skip test - terminal not available in this distribution + await comfyPage.page + .locator('button[aria-label*="Toggle Bottom Panel"]') + .click() + test.skip() + return + } + + // Close the panel to reset state + await comfyPage.page + .locator('button[aria-label*="Toggle Bottom Panel"]') + .click() // Open shortcuts panel first await comfyPage.page