mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
Address PR feedback: refactor browser tests for better type safety
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user