feat(campaign): make delivery modes explicit
This commit is contained in:
16
webui/tests/delivery-mode-ui-structure.test.mjs
Normal file
16
webui/tests/delivery-mode-ui-structure.test.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { dirname, resolve } from "node:path";
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const source = readFileSync(resolve(here, "../src/features/campaigns/ReviewSendPage.tsx"), "utf8");
|
||||
|
||||
assert.match(source, /getCampaignDeliveryOptions/);
|
||||
assert.match(source, /Queue for workers/);
|
||||
assert.match(source, /Send now keeps this request open/);
|
||||
assert.match(source, /synchronousSendAllowed/);
|
||||
assert.match(source, /commandInProgress[\s\S]*refreshQueueStatus/);
|
||||
assert.match(source, /<ConfirmDialog[\s\S]*open=\{queueConfirmOpen\}/);
|
||||
assert.match(source, /<ConfirmDialog[\s\S]*open=\{cancelDeliveryConfirmOpen\}/);
|
||||
assert.doesNotMatch(source, /window\.alert\s*\(/);
|
||||
Reference in New Issue
Block a user