add tests - fix history_v2/:prompt_id fmt

This commit is contained in:
Richard Yu
2025-07-12 14:27:02 -07:00
parent 6dc75e2dcc
commit 75faab2a28
6 changed files with 215 additions and 12 deletions

View File

@@ -73,7 +73,7 @@ export default class TaskHistory {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify(this.tasks)
body: JSON.stringify({ history: this.tasks })
})
}
@@ -95,7 +95,7 @@ export default class TaskHistory {
async setupRoutes() {
return this.comfyPage.page.route(
/.*\/api\/(view|history)(\?.*)?$/,
/.*\/api\/(view|history|history_v2)(\?.*)?$/,
async (route) => {
const request = route.request()
const method = request.method()

View File

@@ -187,12 +187,14 @@ test.describe('Workflows sidebar', () => {
test('Can save workflow as with same name', async ({ comfyPage }) => {
await comfyPage.menu.topbar.saveWorkflow('workflow5.json')
await comfyPage.nextFrame()
expect(await comfyPage.menu.workflowsTab.getOpenedWorkflowNames()).toEqual([
'workflow5.json'
])
await comfyPage.menu.topbar.saveWorkflowAs('workflow5.json')
await comfyPage.confirmDialog.click('overwrite')
await comfyPage.nextFrame()
expect(await comfyPage.menu.workflowsTab.getOpenedWorkflowNames()).toEqual([
'workflow5.json'
])