fix: make closeMenu resilient to non-clickable button

Button can exist in DOM but not be actionable (e.g. on mobile where
it's off-screen). Use isVisible() check and catch click failures
with a short timeout to avoid blocking tests.
This commit is contained in:
Johnpaul
2026-04-14 00:19:51 +01:00
parent d6a13a3162
commit dc851e2e21

View File

@@ -372,8 +372,8 @@ export class ComfyPage {
async closeMenu() {
const btn = this.page.locator('button.comfy-close-menu-btn')
if ((await btn.count()) > 0) {
await btn.click()
if (await btn.isVisible()) {
await btn.click({ timeout: 2000 }).catch(() => {})
await this.nextFrame()
}
}