mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 04:30:04 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user