import assert from "node:assert/strict" import { readFile } from "node:fs/promises" import test from "node:test" const appPath = new URL("../standalone-web/src/App.vue", import.meta.url) const dialogPath = new URL( "../standalone-web/src/features/workflow/WorkflowGenerationReviewDialog.vue", import.meta.url, ) const endpointsPath = new URL("../shared/api/endpoints.ts", import.meta.url) test("wires the single generation cross-review dialog to all three backend operations", async () => { const [app, dialog, endpoints] = await Promise.all([ readFile(appPath, "utf8"), readFile(dialogPath, "utf8"), readFile(endpointsPath, "utf8"), ]) assert.equal((app.match(/ { const dialog = await readFile(dialogPath, "utf8") assert.doesNotMatch(dialog, /decisionCandidateId\.value\s*=\s*[^\n]*candidates\s*\[\s*0\s*\]/) assert.doesNotMatch(dialog, /approvalCandidateId\.value\s*=\s*[^\n]*candidates\s*\[\s*0\s*\]/) })