feat(forms): add isolated Form A consultation testing

This commit is contained in:
DeCentN2Madness committed 2026-10-29 10:21:45 -07:00
1 parent 6a5e54e130
commit ff80ee516f
25 files changed
+1046 -253

No files matched your search

+18 -2
View File
@@ -16,11 +16,26 @@ async function fixture(mode = 'staging') {
['lp/aba-private-pay/index.html', 'https://form.jotform.com/262946078314059?formContext=landing&language=en'],
['lp/early-intervention/index.html', 'https://form.jotform.com/262946078314059?formContext=landing&language=en'],
];
const consultationFrames = [
['client-consultation/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=en'],
['es/client-consultation/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=es'],
['schedule-consultation/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=en'],
];
const consultationDrawers = [
['aba-therapy/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=en'],
['autism-evaluations/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=en'],
['learner-social-club/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=en'],
['es/aba-therapy/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=es'],
['es/autism-evaluations/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=es'],
['es/learner-social-club/index.html', 'https://form.jotform.com/262946078314059?formContext=consultation&language=es'],
];
const pages = mode === 'staging'
? [['index.html', 'noindex,nofollow', ''] , ['lp/index.html', 'noindex,nofollow', '']]
: mode === 'isolated-test'
? [
...productionFrames.map(([file, frame]) => [file, 'noindex,nofollow', `<section data-jotform-form-a data-form-mode="isolated-test" data-form-environment="isolated-test"><iframe src="${frame}"></iframe></section>`]),
...consultationFrames.map(([file, frame]) => [file, 'noindex,nofollow', `<section data-jotform-form-a data-form-mode="isolated-test" data-form-environment="isolated-test"><iframe src="${frame}"></iframe></section>`]),
...consultationDrawers.map(([file, frame]) => [file, 'noindex,nofollow', `<section data-jotform-form-a data-form-mode="isolated-test" data-form-environment="isolated-test" data-jotform-deferred="true"><iframe data-jotform-iframe-url="${frame}"></iframe></section>`]),
['lp/index.html', 'noindex,nofollow', ''],
]
: mode === 'production'
@@ -49,10 +64,11 @@ test('indexing artifact requires sitemap and excludes review index', async () =>
assert.equal(result.reviewIndex, false);
});
test('isolated-test artifact permits exactly the seven approved Form A iframe placements under staging safeguards', async () => {
test('isolated-test artifact permits ten static and six user-activated consultation Form A placements under staging safeguards', async () => {
const result = await verifyArtifact(await fixture('isolated-test'), 'isolated-test');
assert.equal(result.passed, true);
assert.equal(result.formAIframes, 7);
assert.equal(result.formAIframes, 10);
assert.equal(result.deferredFormAIframes, 6);
assert.equal(result.sitemapUrls, 0);
assert.equal(result.reviewIndex, true);
});