From 60250031fcae31cfbc47c959133405c5b3bfb789 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 1 Feb 2026 20:08:04 -0800 Subject: [PATCH] test: fix terminal tab detection using role selector instead of ID Amp-Thread-ID: https://ampcode.com/threads/T-019c1c14-d3a2-740c-a304-840f14971bde --- browser_tests/tests/bottomPanelShortcuts.spec.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index 66422c544..32cc2a5a9 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -148,14 +148,17 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { comfyPage }) => { // First open the bottom panel to check if terminal tab is available + // Terminal tabs are loaded asynchronously, so wait for the "Logs" tab to appear 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"]') + // Look for the "Logs" tab text in the bottom panel + const logsTab = comfyPage.page.locator('.bottom-panel').getByRole('tab', { + name: /Logs/i + }) + const terminalTabExists = await logsTab .isVisible({ timeout: 5000 }) .catch(() => false)