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
@@ -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') {
|
||||
|
||||
@@ -29,7 +29,7 @@ test.describe(
|
||||
timeout: 30000
|
||||
})
|
||||
|
||||
await expect(comfyPage.page).toHaveScreenshot(
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(
|
||||
'save-image-and-webm-preview.png'
|
||||
)
|
||||
})
|
||||
|
||||
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |