fix: escape single quotes in workflow name for template generation

Addresses review feedback:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/10694#discussion_r3005550592
This commit is contained in:
bymyself
2026-03-28 18:59:43 -07:00
parent a458946742
commit 16ecb0c074

View File

@@ -22,7 +22,7 @@ export function generateRecordingTemplate(
const filePath = join(browserTestsDir, 'tests', `_recording-session.spec.ts`)
const workflowLine = options.workflow
? ` // Load the selected workflow\n await comfyPage.workflow.loadWorkflow('${options.workflow}')\n await comfyPage.nextFrame()\n`
? ` // Load the selected workflow\n await comfyPage.workflow.loadWorkflow('${options.workflow.replace(/'/g, "\\'")}')\n await comfyPage.nextFrame()\n`
: ''
const code = `/**