fix: use comfyPage.assetPath instead of __dirname for fixture loading

Addresses review feedback:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/10547#discussion_r3005786259
This commit is contained in:
bymyself
2026-03-28 23:30:48 -07:00
parent ab6da5c34a
commit 40deaaccea

View File

@@ -1,5 +1,4 @@
import { readFileSync } from 'fs'
import path from 'path'
import { expect } from '@playwright/test'
@@ -197,9 +196,8 @@ test.describe('Workflow Persistence', () => {
description: 'PR #9694 — loadApiJson early-returned on missing node types'
})
const fixturePath = path.resolve(
__dirname,
'../assets/nodes/api_workflow_with_missing_nodes.json'
const fixturePath = comfyPage.assetPath(
'nodes/api_workflow_with_missing_nodes.json'
)
const apiWorkflow = JSON.parse(readFileSync(fixturePath, 'utf-8'))