refactor(campaign): split review and recipient boundaries
This commit is contained in:
@@ -57,13 +57,16 @@ const explicitLinkablePreview = {
|
||||
};
|
||||
assert(attachmentPreviewLinkableFiles(explicitLinkablePreview).length === 2, "explicit linkable candidates are deduplicated without a display cap");
|
||||
|
||||
const reviewSource = readFileSync("src/features/campaigns/ReviewSendPage.tsx", "utf8");
|
||||
const reviewSource = [
|
||||
readFileSync("src/features/campaigns/ReviewSendPage.tsx", "utf8"),
|
||||
readFileSync("src/features/campaigns/review/AttachmentLinkingPreview.tsx", "utf8")
|
||||
].join("\n");
|
||||
assert(!reviewSource.includes("attachmentPreviewMatchedFiles(preview).slice("), "review attachment links must not use an arbitrary display slice");
|
||||
assert(reviewSource.includes("<AttachmentLinkingFileList files={matchedFiles} compact />"), "compact review exposes the complete bounded attachment list");
|
||||
assert(reviewSource.includes('aria-haspopup="dialog"'), "the matched count advertises its attachment detail dialog");
|
||||
assert(reviewSource.includes("tabIndex={0}"), "bounded attachment lists are keyboard-focusable scroll regions");
|
||||
assert(reviewSource.includes('i18nMessage("i18n:govoplan-campaign.attachment_file_links_value.ce230e30"'), "dynamic attachment dialog title uses the i18n message contract");
|
||||
assert(reviewSource.includes('i18nMessage("i18n:govoplan-campaign.view_all_value_matched_attachment_file_links.81e53951"'), "dynamic attachment count aria label uses the i18n message contract");
|
||||
assert(/i18nMessage\(\s*"i18n:govoplan-campaign\.attachment_file_links_value\.ce230e30"/.test(reviewSource), "dynamic attachment dialog title uses the i18n message contract");
|
||||
assert(/i18nMessage\(\s*"i18n:govoplan-campaign\.view_all_value_matched_attachment_file_links\.81e53951"/.test(reviewSource), "dynamic attachment count aria label uses the i18n message contract");
|
||||
assert(!reviewSource.includes(">Attachment file links<"), "attachment review heading is not raw English");
|
||||
assert(!reviewSource.includes('label="Matched"'), "attachment review facts are not raw English");
|
||||
assert(!reviewSource.includes("`Link ${unlinkedCount}"), "attachment link actions are not assembled from raw English");
|
||||
|
||||
Reference in New Issue
Block a user