feat(forms): add local Form A presentation preview

This commit is contained in:
DeCentN2Madness committed 2026-10-25 13:04:00 -07:00
1 parent b102a061fe
commit 7a6cab29db
13 files changed
+983 -8

No files matched your search

+9
View File
@@ -6,6 +6,7 @@ import {
resolveCounterConfig,
} from '../src/utils/counter-mode.ts';
import {
formAPreviewEnabled,
formModeForRuntime,
formRouteMapping,
logicalFormForRoute,
@@ -36,6 +37,14 @@ test('form configuration defaults off and live remains fail-closed', () => {
assert.equal(resolveMockFormResult('anything-else'), 'success');
});
test('Form A meeting preview requires explicit mock mode and remains staging-only', () => {
assert.equal(formAPreviewEnabled(undefined, 'false', 'mock'), false);
assert.equal(formAPreviewEnabled('true', undefined, 'off'), false);
assert.equal(formAPreviewEnabled('true', 'true', 'mock'), false);
assert.equal(formAPreviewEnabled('true', 'false', 'mock'), true);
assert.equal(formAPreviewEnabled('TRUE', 'FALSE', 'mock'), true);
});
test('form mapping covers nine native instances and five landing journeys', () => {
assert.equal(formRouteMapping.filter((entry) => entry.kind === 'native-instance').length, 9);
assert.equal(formRouteMapping.filter((entry) => entry.kind === 'landing-journey').length, 5);