Fix flaky reroute insert playwright test (#2051)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-12-25 21:57:52 -05:00
committed by GitHub
parent db572a4085
commit f851e356f2
4 changed files with 7 additions and 0 deletions

View File

@@ -845,6 +845,12 @@ export class ComfyPage {
return (await window['app'].graphToPrompt())[api ? 'output' : 'workflow']
}, api)
}
async setFocusMode(focusMode: boolean) {
await this.page.evaluate((focusMode) => {
window['app'].extensionManager.focusMode = focusMode
}, focusMode)
await this.nextFrame()
}
}
export const comfyPageFixture = base.extend<{ comfyPage: ComfyPage }>({

View File

@@ -30,6 +30,7 @@ test.describe('Reroute Node', () => {
// Close the sidebar tab
await workflowsTab.tabButton.click()
await workflowsTab.root.waitFor({ state: 'hidden' })
await comfyPage.setFocusMode(true)
await expect(comfyPage.canvas).toHaveScreenshot('reroute_inserted.png')
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 25 KiB