Address PR feedback: refactor browser tests for better type safety

This commit is contained in:
DrJKL
2026-01-12 18:02:59 -08:00
parent 3a0c84145c
commit 4c46f5786b
14 changed files with 131 additions and 177 deletions

View File

@@ -109,7 +109,9 @@ test.describe('Slider widget', () => {
await comfyPage.page.evaluate(() => {
const app = window['app']
if (!app?.graph?.nodes?.[0]?.widgets?.[0]) return
if (!app?.graph?.nodes?.[0]?.widgets?.[0]) {
throw new Error('widget not found')
}
const widget = app.graph.nodes[0].widgets[0]
widget.callback = (value: number) => {
window.widgetValue = value