24 lines
716 B
TypeScript
24 lines
716 B
TypeScript
import assert from "node:assert/strict";
|
|
import { readFile } from "node:fs/promises";
|
|
import { join } from "node:path";
|
|
import test from "node:test";
|
|
|
|
const campaignFormDialogPath = join(
|
|
process.cwd(),
|
|
"components",
|
|
"campaigns",
|
|
"campaign-form-dialog.tsx",
|
|
);
|
|
|
|
test("CampaignFormDialog presents campaigns as lead discovery only", async () => {
|
|
const source = await readFile(campaignFormDialogPath, "utf8");
|
|
|
|
assert.match(source, /Max\. neue Leads/);
|
|
assert.doesNotMatch(source, /Max\. Audits/);
|
|
assert.match(
|
|
source,
|
|
/maxAuditsPerRun:\s*campaign\.maxAuditsPerRun\s*\?\?\s*campaignFormDefaults\.maxAuditsPerRun/,
|
|
);
|
|
assert.match(source, /maxAuditsPerRun:\s*values\.maxAuditsPerRun/);
|
|
});
|