mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user