This commit is contained in:
pythongosssss
2026-03-28 10:38:10 -07:00
parent 24f252a84b
commit e9ac54fb1f
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { readFileSync } from 'fs'
import type { AppMode } from '../../../src/composables/useAppMode'
import type {
ComfyApiWorkflow,
ComfyWorkflowJSON
@@ -111,14 +112,14 @@ export class WorkflowHelper {
})
}
async getActiveWorkflowActiveAppMode(): Promise<string | null | undefined> {
async getActiveWorkflowActiveAppMode(): Promise<AppMode | null | undefined> {
return this.comfyPage.page.evaluate(() => {
return (window.app!.extensionManager as WorkspaceStore).workflow
.activeWorkflow?.activeMode
})
}
async getActiveWorkflowInitialMode(): Promise<string | null | undefined> {
async getActiveWorkflowInitialMode(): Promise<AppMode | null | undefined> {
return this.comfyPage.page.evaluate(() => {
return (window.app!.extensionManager as WorkspaceStore).workflow
.activeWorkflow?.initialMode

View File

@@ -307,7 +307,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => {
const pathAfterFirst = await comfyPage.workflow.getActiveWorkflowPath()
await reSaveAs(appMode, name, 'App')
await comfyPage.nextFrame()
await expect(appMode.saveAs.successMessage).toBeVisible({ timeout: 5000 })
const pathAfterSecond = await comfyPage.workflow.getActiveWorkflowPath()
expect(pathAfterSecond).toBe(pathAfterFirst)