feat(campaigns): add governed collaboration thread
Module Package Release / publish-packages (push) Successful in 13s
Module Package Release / publish-packages (push) Successful in 13s
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const page = fs.readFileSync(
|
||||
path.join(root, "src/features/campaigns/CampaignCollaborationPage.tsx"),
|
||||
"utf8"
|
||||
);
|
||||
const workspace = fs.readFileSync(
|
||||
path.join(root, "src/features/campaigns/CampaignWorkspace.tsx"),
|
||||
"utf8"
|
||||
);
|
||||
const sidebar = fs.readFileSync(
|
||||
path.join(root, "src/layout/SectionSidebar.tsx"),
|
||||
"utf8"
|
||||
);
|
||||
const api = fs.readFileSync(path.join(root, "src/api/campaigns.ts"), "utf8");
|
||||
|
||||
assert.match(page, /archetype="collection"/);
|
||||
assert.match(page, /variant="collection"/);
|
||||
assert.match(page, /refreshable/);
|
||||
assert.match(page, /ReferenceMultiSelect/);
|
||||
assert.match(page, /ConfirmDialog/);
|
||||
assert.match(page, /campaigns:discussion:post/);
|
||||
assert.match(page, /campaigns:discussion:moderate/);
|
||||
assert.match(page, /maxLength=\{8000\}/);
|
||||
assert.match(page, /<ol[^>]+aria-label="Campaign collaboration thread"/);
|
||||
assert.match(page, /entry\.tombstone/);
|
||||
assert.match(page, /collaboration_audit_boundary/);
|
||||
assert.doesNotMatch(page, /updateCampaignVersion|saveCampaignVersion/);
|
||||
|
||||
assert.match(workspace, /path="activity"/);
|
||||
assert.match(workspace, /CampaignCollaborationPage/);
|
||||
assert.match(sidebar, /canReadActivity/);
|
||||
assert.match(sidebar, /id: "activity"/);
|
||||
|
||||
assert.match(api, /\/collaboration\?/);
|
||||
assert.match(api, /\/withdraw/);
|
||||
assert.match(api, /\/redact/);
|
||||
assert.match(api, /\/collaboration\/mention-options/);
|
||||
|
||||
console.log("Campaign collaboration UI structure checks passed.");
|
||||
Reference in New Issue
Block a user