feat(campaign): govern attachment reuse

This commit is contained in:
2026-08-20 05:20:07 +02:00
parent f4fe534ee1
commit 112ef9dc31
16 changed files with 705 additions and 2 deletions
@@ -6,6 +6,7 @@ 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, /<ActionBlockerHint/);
assert.match(guidance, /<GuidedReviewList/);
@@ -23,5 +24,15 @@ 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(`<option value="${action}">`));
}
for (const allowance of ["none", "same_recipient", "same_message"]) {
assert.match(attachmentsPage, new RegExp(`<option value="${allowance}">`));
}
assert.doesNotMatch(page, /blocked_or_failed_message_s_must_be_resolved_bef/);
assert.doesNotMatch(page, /resolve_the_blocking_entries_then_validate_again/);