mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
fix: browser_tests Phase 1 - mechanical fixes
- Rename dragAndDrop to dragDrop (7 occurrences) - Add override modifiers in SidebarTab.ts (4 fixes) - Remove .ts import extensions in actionbar.spec.ts - Prefix unused variables with underscore (9 files) - Fix ESLint import() type annotation in globals.d.ts Reduces typecheck:browser errors from 229 to 215 Amp-Thread-ID: https://ampcode.com/threads/T-019c1787-c781-761d-b95a-4844e909e64c Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -26,21 +26,21 @@ test.describe('Remote COMBO Widget', { tag: '@widget' }, () => {
|
||||
nodeName: string
|
||||
): Promise<string[] | undefined> => {
|
||||
return await comfyPage.page.evaluate((name) => {
|
||||
const node = window.app.graph.nodes.find((node) => node.title === name)
|
||||
const node = window.app!.graph!.nodes.find((node) => node.title === name)
|
||||
return node.widgets[0].options.values
|
||||
}, nodeName)
|
||||
}
|
||||
|
||||
const getWidgetValue = async (comfyPage: ComfyPage, nodeName: string) => {
|
||||
return await comfyPage.page.evaluate((name) => {
|
||||
const node = window.app.graph.nodes.find((node) => node.title === name)
|
||||
const node = window.app!.graph!.nodes.find((node) => node.title === name)
|
||||
return node.widgets[0].value
|
||||
}, nodeName)
|
||||
}
|
||||
|
||||
const clickRefreshButton = (comfyPage: ComfyPage, nodeName: string) => {
|
||||
return comfyPage.page.evaluate((name) => {
|
||||
const node = window.app.graph.nodes.find((node) => node.title === name)
|
||||
const node = window.app!.graph!.nodes.find((node) => node.title === name)
|
||||
const buttonWidget = node.widgets.find((w) => w.name === 'refresh')
|
||||
return buttonWidget?.callback()
|
||||
}, nodeName)
|
||||
@@ -92,7 +92,7 @@ test.describe('Remote COMBO Widget', { tag: '@widget' }, () => {
|
||||
await comfyPage.workflow.loadWorkflow('inputs/remote_widget')
|
||||
|
||||
const node = await comfyPage.page.evaluate((name) => {
|
||||
return window.app.graph.nodes.find((node) => node.title === name)
|
||||
return window.app!.graph!.nodes.find((node) => node.title === name)
|
||||
}, nodeName)
|
||||
expect(node).toBeDefined()
|
||||
|
||||
@@ -196,7 +196,7 @@ test.describe('Remote COMBO Widget', { tag: '@widget' }, () => {
|
||||
// Fulfill each request with a unique timestamp
|
||||
await comfyPage.page.route(
|
||||
'**/api/models/checkpoints**',
|
||||
async (route, request) => {
|
||||
async (route, _request) => {
|
||||
await route.fulfill({
|
||||
body: JSON.stringify([Date.now()]),
|
||||
status: 200
|
||||
|
||||
Reference in New Issue
Block a user