28 lines
1.5 KiB
JavaScript
28 lines
1.5 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
const guidance = readFileSync(resolve(here, "../src/features/campaigns/review/ReviewWorkflowGuidance.tsx"), "utf8");
|
|
const page = readFileSync(resolve(here, "../src/features/campaigns/ReviewSendPage.tsx"), "utf8");
|
|
|
|
assert.match(guidance, /<ActionBlockerHint/);
|
|
assert.match(guidance, /<GuidedReviewList/);
|
|
assert.match(guidance, /tone="danger"/);
|
|
assert.match(guidance, /tone="warning"/);
|
|
assert.match(guidance, /requiredAction: requiredActionLabel/);
|
|
assert.match(guidance, /target: destinationLabel/);
|
|
assert.match(guidance, /documentation=\{\{ topicId: documentationTopicId \}\}/);
|
|
assert.match(guidance, /campaigns\.workflow\.prepare-validate-and-build/);
|
|
assert.match(guidance, /campaigns\.workflow\.complete-review/);
|
|
assert.match(page, /calculateBuildReviewProgress/);
|
|
assert.match(page, /<MetricCard[^>]+label="i18n:govoplan-campaign\.remaining\.cc632b5e"/);
|
|
assert.match(page, /showBuiltDetails\(\{ reviewed: 'list:\["no"\]' \}\)/);
|
|
assert.match(page, /data-residual-file-policy/);
|
|
assert.match(page, /build\.residual_file_disposition/);
|
|
assert.match(page, /residual_file_count/);
|
|
assert.match(page, /watched_source_count/);
|
|
assert.doesNotMatch(page, /blocked_or_failed_message_s_must_be_resolved_bef/);
|
|
assert.doesNotMatch(page, /resolve_the_blocking_entries_then_validate_again/);
|