test: make closeMenu safe, use canvas for saveImageAndWebp

- closeMenu() now checks if close button exists before clicking
- saveImageAndWebp screenshots canvas instead of full page
- Delete widget golden images for regeneration
This commit is contained in:
Johnpaul
2026-04-13 22:49:34 +01:00
parent fc9e442e36
commit 9c92669988
17 changed files with 6 additions and 3 deletions

View File

@@ -371,8 +371,11 @@ export class ComfyPage {
}
async closeMenu() {
await this.page.locator('button.comfy-close-menu-btn').click()
await this.nextFrame()
const btn = this.page.locator('button.comfy-close-menu-btn')
if ((await btn.count()) > 0) {
await btn.click()
await this.nextFrame()
}
}
async clickDialogButton(prompt: string, buttonText: string = 'Yes') {

View File

@@ -29,7 +29,7 @@ test.describe(
timeout: 30000
})
await expect(comfyPage.page).toHaveScreenshot(
await expect(comfyPage.canvas).toHaveScreenshot(
'save-image-and-webm-preview.png'
)
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB