Complete recipient search and delivery evidence
This commit is contained in:
28
webui/tests/recipient-search-ui-structure.test.mjs
Normal file
28
webui/tests/recipient-search-ui-structure.test.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const source = readFileSync(
|
||||
new URL("../src/features/campaigns/RecipientDataPage.tsx", import.meta.url),
|
||||
"utf8"
|
||||
).replace(/\s+/g, " ");
|
||||
|
||||
function assertIncludes(fragment, message) {
|
||||
if (!source.includes(fragment.replace(/\s+/g, " "))) throw new Error(message);
|
||||
}
|
||||
|
||||
for (const field of ["from", "reply_to", "to", "cc", "bcc"]) {
|
||||
assertIncludes(`key: "${field}"`, `recipient search must retain the ${field} address category`);
|
||||
}
|
||||
assertIncludes(
|
||||
"recipientAddressOverlayColumns. flatMap((column) => getEntryAddresses(entry, column.key))",
|
||||
"recipient filtering must search every configured address category"
|
||||
);
|
||||
assertIncludes(
|
||||
"onQueryChange={setRecipientProfilesQuery}",
|
||||
"the recipient page must observe the shared DataGrid filter"
|
||||
);
|
||||
assertIncludes(
|
||||
"Matched in {hiddenMatch.label}: {hiddenMatch.address}",
|
||||
"a row must explain when its match came from a hidden address"
|
||||
);
|
||||
|
||||
console.log("Campaign recipient search covers and explains hidden address matches.");
|
||||
@@ -86,3 +86,6 @@ assert(reportSource.includes('return status === "skipped" ? "i18n:govoplan-campa
|
||||
assert(reportSource.includes("cards?.skipped ?? jobs.counts.send?.skipped"), "SMTP skipped has a separate report count");
|
||||
assert(reportSource.includes("cards?.imap_skipped ?? jobs.counts.imap?.skipped"), "IMAP skipped has a separate report count");
|
||||
assert(!reportSource.includes("setPage((value) => Math.max(1, value - 1))"), "the one-off report pager is removed in favor of the central DataGrid pager");
|
||||
assert(reportSource.includes("<AttachmentEvidenceSection"), "job detail exposes frozen attachment evidence");
|
||||
assert(reportSource.includes("managed.version_id") && reportSource.includes("managed.checksum_sha256"), "attachment evidence identifies the exact managed file version and checksum");
|
||||
assert(reportSource.includes("detail.job.eml_sha256"), "job detail exposes the immutable message digest");
|
||||
|
||||
Reference in New Issue
Block a user