mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-23 22:25:05 +00:00
Manual backport of #10856 to `cloud/1.43`. Paired with core/1.43 backport #11217. ## Conflicts resolved Same two files, same root cause as the core/1.43 backport — #10856 extracted the inline `cleanup_fake_model` block into a shared `cleanupFakeModel` helper in `browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts`: - `browser_tests/tests/errorOverlay.spec.ts` - `browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts` `cloud/1.43` still carries the original inline `expect(cleanupOk).toBeTruthy()` form. #10856 replaces both with `await cleanupFakeModel(comfyPage)` calling the helper added by this same PR. Resolution: accepted the PR version (helper call) on both conflict sites. The helper itself is added as part of this backport, so no runtime behavior is lost. ## Verification - No residual conflict markers - Cherry-picked commit carries the entire #10856 squash (45 files, +3596/-209) ## Original PR summary See #10856 for full behavioral description, test plan, and screenshots. --- Fixes Comfy-Org/ComfyUI#13256 on cloud/1.43 ┆Issue is synchronized with this [Notion page](https://app.notion.com/p/PR-11218-backport-cloud-1-43-fix-exclude-muted-bypassed-nodes-from-missing-asset-detection-1-3426d73d3650811e9a27d4a334c74de8) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import { expect } from '@playwright/test'
|
|
|
|
import type { ComfyPage } from '@e2e/fixtures/ComfyPage'
|
|
import { TestIds } from '@e2e/fixtures/selectors'
|
|
import { PropertiesPanelHelper } from '@e2e/tests/propertiesPanel/PropertiesPanelHelper'
|
|
|
|
export async function loadWorkflowAndOpenErrorsTab(
|
|
comfyPage: ComfyPage,
|
|
workflow: string
|
|
) {
|
|
await comfyPage.workflow.loadWorkflow(workflow)
|
|
|
|
const errorOverlay = comfyPage.page.getByTestId(TestIds.dialogs.errorOverlay)
|
|
await expect(errorOverlay).toBeVisible()
|
|
|
|
await errorOverlay.getByTestId(TestIds.dialogs.errorOverlaySeeErrors).click()
|
|
await expect(errorOverlay).not.toBeVisible()
|
|
}
|
|
|
|
export async function openErrorsTab(comfyPage: ComfyPage) {
|
|
const panel = new PropertiesPanelHelper(comfyPage.page)
|
|
await panel.open(comfyPage.actionbar.propertiesButton)
|
|
|
|
const errorsTab = comfyPage.page.getByTestId(
|
|
TestIds.propertiesPanel.errorsTab
|
|
)
|
|
await expect(errorsTab).toBeVisible()
|
|
await errorsTab.click()
|
|
}
|
|
|
|
/**
|
|
* Remove the fake model file from the backend so it is detected as missing.
|
|
* Fixture URLs (e.g. http://localhost:8188/...) are not actually downloaded
|
|
* during tests — they only serve as metadata for the missing model UI.
|
|
*/
|
|
export async function cleanupFakeModel(comfyPage: ComfyPage) {
|
|
await expect
|
|
.poll(() =>
|
|
comfyPage.page.evaluate(async (url: string) => {
|
|
const response = await fetch(`${url}/api/devtools/cleanup_fake_model`)
|
|
return response.ok
|
|
}, comfyPage.url)
|
|
)
|
|
.toBeTruthy()
|
|
}
|