fix(referrals): restore existing hosted referral CTA and remove native placeholder
This commit is contained in:
7 files changed
+27
-11
No files matched your search
@@ -1075,7 +1075,7 @@ test('Phase 7 privacy page preserves policy sections and reciprocal eligible nav
|
||||
});
|
||||
|
||||
test('Phase 9 off-mode form surfaces localize Spanish without enabling submission', () => {
|
||||
for (const route of ['/es/contact','/es/client-consultation','/contact','/client-consultation','/referrals','/schedule-consultation']) {
|
||||
for (const route of ['/es/contact','/es/client-consultation','/contact','/client-consultation','/schedule-consultation']) {
|
||||
const $ = load(artifacts.get('staging').html.get(route));
|
||||
const form = $('[data-aia-form]');
|
||||
assert.equal(form.length, 1, route);
|
||||
@@ -1095,6 +1095,18 @@ test('Phase 9 off-mode form surfaces localize Spanish without enabling submissio
|
||||
assert.match($('#aia-openstreetmap').attr('data-tile-alt'), /^Mapa de OpenStreetMap/);
|
||||
});
|
||||
|
||||
test('referrals retains the existing hosted Jotform CTA without rendering a local form', () => {
|
||||
for (const mode of ['staging', 'indexing']) {
|
||||
const $ = load(artifacts.get(mode).html.get('/referrals'));
|
||||
const link = $('main a').filter((_i, element) => $(element).text().trim() === 'Refer a Client');
|
||||
assert.equal(link.length, 1, mode);
|
||||
assert.equal(link.attr('href'), 'https://form.jotform.com/231638510219149');
|
||||
assert.ok(link.hasClass('content-button'));
|
||||
assert.equal($('[data-aia-form], [data-jotform-form-a], #form-title').length, 0);
|
||||
assert.equal($('main form').length, 0);
|
||||
}
|
||||
});
|
||||
|
||||
test('Phase 7 author labels and Arabic credential isolation preserve archive SEO', () => {
|
||||
for (const locale of ['en','es','ar']) {
|
||||
const route = `${locale === 'en' ? '' : `/${locale}`}/library/author/rula-diab`;
|
||||
|
||||
@@ -45,12 +45,12 @@ test('Form A meeting preview requires explicit mock mode and remains staging-onl
|
||||
assert.equal(formAPreviewEnabled('TRUE', 'FALSE', 'mock'), true);
|
||||
});
|
||||
|
||||
test('form mapping covers twelve native instances and five landing journeys', () => {
|
||||
assert.equal(formRouteMapping.filter((entry) => entry.kind === 'native-instance').length, 12);
|
||||
test('form mapping covers eleven native instances and five landing journeys', () => {
|
||||
assert.equal(formRouteMapping.filter((entry) => entry.kind === 'native-instance').length, 11);
|
||||
assert.equal(formRouteMapping.filter((entry) => entry.kind === 'landing-journey').length, 5);
|
||||
assert.equal(logicalFormForRoute('/contact'), 'general');
|
||||
assert.equal(logicalFormForRoute('/es/client-consultation'), 'service');
|
||||
assert.equal(logicalFormForRoute('/referrals'), 'referral');
|
||||
assert.equal(logicalFormForRoute('/referrals'), undefined);
|
||||
for (const route of ['/es/aba-therapy', '/es/autism-evaluations', '/es/learner-social-club']) {
|
||||
assert.equal(logicalFormForRoute(route), 'service');
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ test('Phase 5A conversion CTAs resolve to the intended published local route or
|
||||
['/es/aba-therapy', 'Solicitar una consulta', '/es/client-consultation'],
|
||||
['/es/autism-evaluations', 'Solicitar una consulta', '/es/client-consultation'],
|
||||
['/es/learner-social-club', 'Solicitar una consulta', '/es/client-consultation'],
|
||||
['/referrals', 'Refer a Client', '#form-title'],
|
||||
['/referrals', 'Refer a Client', 'https://form.jotform.com/231638510219149'],
|
||||
['/aba-therapy-intake-process', 'Take the First Step', '/client-consultation'],
|
||||
['/es/aba-therapy-intake-process', 'Take the First Step', '/es/client-consultation'],
|
||||
['/services', 'Consult with a Client Advocate', '/client-consultation'],
|
||||
@@ -563,6 +563,11 @@ test('Phase 5A conversion CTAs resolve to the intended published local route or
|
||||
assert.equal(link.length, 1, `${route}: ${label}`);
|
||||
assert.equal(link.attr('href'), href, route);
|
||||
const target = new URL(href, site + route);
|
||||
if (target.origin !== new URL(site).origin) {
|
||||
assert.equal(route, '/referrals', 'only the explicitly approved referral CTA leaves the site');
|
||||
assert.equal(target.href, 'https://form.jotform.com/231638510219149');
|
||||
continue;
|
||||
}
|
||||
const destination = page(target.pathname);
|
||||
if (target.hash) assert.equal(destination(`[id="${target.hash.slice(1)}"]`).length, 1, href);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user