import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import { fileURLToPath } from "node:url"; function read(relativePath) { return readFileSync(fileURLToPath(new URL(relativePath, import.meta.url)), "utf8"); } const profiles = read("../src/features/mail/MailProfileManagement.tsx"); const mailbox = read("../src/features/mail/MailboxPage.tsx"); const bounces = read("../src/features/mail/MailBouncePage.tsx"); const moduleSource = read("../src/module.ts"); const styles = read("../src/styles/mail-profiles.css"); const migration = read("../../docs/INTERFACE_PATTERN_MIGRATION.md"); assert.match(profiles, /ActionBlockerHint,[\s\S]*DocumentationHelpLink/); for (const sharedComponent of ["ConnectionTree", "ConfirmDialog", "Dialog", "LoadingFrame"]) { assert.match(profiles, new RegExp(`\\b${sharedComponent}\\b`)); } assert.match(profiles, /topicId: "mail\.profiles-and-policy"/); assert.match(profiles, /disabledReason: credentialMutationBlocker/); assert.match(profiles, /disabledReason=\{editorSaveBlocker\}/); assert.match(profiles, /disabledReason=\{policySaveBlocker\}/); assert.match(profiles, /smtpActionDisabledReason=\{smtpTestBlocker\}/); assert.match(mailbox, /ActionBlockerHint/); assert.match(mailbox, /DocumentationHelpLink/); assert.match(mailbox, /topicId: "mail\.workflow\.read-mailbox"/); assert.match(mailbox, /disabledReason=\{folderReloadBlocker\}/); assert.match(mailbox, /onKeyDown=\{\(event\) => \{[\s\S]*event\.key === "Enter" \|\| event\.key === " "/); assert.match(bounces, /DocumentationHelpLink/); assert.match(bounces, /topicId: "mail\.bounce-processing"/); assert.match(bounces, /