[Test] Sync workflow instead of full page reload (#3168)

This commit is contained in:
Chenlei Hu
2025-03-20 20:42:12 -04:00
committed by GitHub
parent af0bf05883
commit 5b730517a3
2 changed files with 5 additions and 4 deletions

View File

@@ -214,6 +214,10 @@ export class ComfyPage {
`Failed to setup workflows directory: ${await resp.text()}`
)
}
await this.page.evaluate(async () => {
await window['app'].extensionManager.workflow.syncWorkflows()
})
}
async setupUser(username: string) {

View File

@@ -34,7 +34,6 @@ test.describe('Workflows sidebar', () => {
'workflow1.json': 'default.json',
'workflow2.json': 'default.json'
})
await comfyPage.setup()
const tab = comfyPage.menu.workflowsTab
await tab.open()
@@ -77,7 +76,6 @@ test.describe('Workflows sidebar', () => {
await comfyPage.setupWorkflowsDirectory({
'workflow1.json': 'single_ksampler.json'
})
await comfyPage.setup()
const tab = comfyPage.menu.workflowsTab
await tab.open()
@@ -101,7 +99,6 @@ test.describe('Workflows sidebar', () => {
'bar.json': 'default.json'
}
})
await comfyPage.setup()
const tab = comfyPage.menu.workflowsTab
await tab.open()
@@ -323,7 +320,7 @@ test.describe('Workflows sidebar', () => {
await comfyPage.setupWorkflowsDirectory({
'workflow1.json': 'default.json'
})
await comfyPage.setup()
await comfyPage.menu.workflowsTab.open()
const nodeCount = await comfyPage.getGraphNodesCount()