mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
test: stabilize Preview3D camera state assertion
Use a polling assertion before reading Preview3D camera state so the test waits for async state propagation after execution and avoids null reads in CI.
This commit is contained in:
@@ -109,10 +109,19 @@ test.describe('Preview3D execution flow', { tag: ['@node', '@slow'] }, () => {
|
||||
const savedPath = await pipeline.getModelFileWidgetValue(
|
||||
Preview3DPipelineContext.previewNodeId
|
||||
)
|
||||
await expect
|
||||
.poll(
|
||||
() =>
|
||||
pipeline.getCameraStateFromProperties(
|
||||
Preview3DPipelineContext.previewNodeId
|
||||
),
|
||||
{ timeout: 15_000 }
|
||||
)
|
||||
.not.toBeNull()
|
||||
|
||||
const savedCamera = await pipeline.getCameraStateFromProperties(
|
||||
Preview3DPipelineContext.previewNodeId
|
||||
)
|
||||
expect(savedCamera, 'Camera state present after execution').not.toBeNull()
|
||||
|
||||
const workflowName = `p3d-restore-${Date.now().toString(36)}`
|
||||
await pipeline.comfyPage.menu.workflowsTab.open()
|
||||
|
||||
Reference in New Issue
Block a user