import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; const here = dirname(fileURLToPath(import.meta.url)); const guidance = readFileSync(resolve(here, "../src/features/campaigns/review/ReviewWorkflowGuidance.tsx"), "utf8"); const page = readFileSync(resolve(here, "../src/features/campaigns/ReviewSendPage.tsx"), "utf8"); const attachmentsPage = readFileSync(resolve(here, "../src/features/campaigns/AttachmentsDataPage.tsx"), "utf8"); assert.match(guidance, /]+label="i18n:govoplan-campaign\.remaining\.cc632b5e"/); assert.match(page, /showBuiltDetails\(\{ reviewed: 'list:\["no"\]' \}\)/); assert.match(page, /data-residual-file-policy/); assert.match(page, /build\.residual_file_disposition/); assert.match(page, /residual_file_count/); assert.match(page, /watched_source_count/); assert.match(page, /data-attachment-reuse-policy/); assert.match(page, /build\.attachment_reuse/); assert.match(page, /attachmentReusePolicy\.allow_within/); assert.match(attachmentsPage, /patch\(\["attachments", "reuse_policy"\]/); for (const action of ["allow", "warn", "review", "block"]) { assert.match(attachmentsPage, new RegExp(`