mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Fix flaky reroute insert playwright test (#2051)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -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 }>({
|
||||
|
||||
@@ -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 |
Reference in New Issue
Block a user