feat(forms): add local Form A presentation preview
This commit is contained in:
13 files changed
+983
-8
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user