Fix io slot label overwrite by i18n (#1904)

* Add test on export with different locales

* Fix node slot rename
This commit is contained in:
Chenlei Hu
2024-12-13 12:27:16 -08:00
committed by GitHub
parent 6f7c7f3c61
commit a99f63784d
6 changed files with 84 additions and 10 deletions

View File

@@ -840,6 +840,11 @@ export class ComfyPage {
.activeWorkflow?.isModified
})
}
async getExportedWorkflow({ api = false }: { api?: boolean } = {}) {
return this.page.evaluate(async (api) => {
return (await window['app'].graphToPrompt())[api ? 'output' : 'workflow']
}, api)
}
}
export const comfyPageFixture = base.extend<{ comfyPage: ComfyPage }>({

View File

@@ -40,7 +40,14 @@ export class Topbar {
return this._saveWorkflow(workflowName, 'Save As')
}
async _saveWorkflow(workflowName: string, command: 'Save' | 'Save As') {
exportWorkflow(workflowName: string): Promise<void> {
return this._saveWorkflow(workflowName, 'Export')
}
async _saveWorkflow(
workflowName: string,
command: 'Save' | 'Save As' | 'Export'
) {
await this.triggerTopbarCommand(['Workflow', command])
await this.getSaveDialog().fill(workflowName)
await this.page.keyboard.press('Enter')