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.");
|
||||
Reference in New Issue
Block a user