fix(landing): remove inactive-form availability copy
This commit is contained in:
4 files changed
+23
-21
No files matched your search
@@ -89,24 +89,29 @@ test('inactive lead presentation has no native submission surface or live integr
|
||||
assert.equal($('#lead-form [name]:not([disabled])').length, 0);
|
||||
assert.equal($('#lead-form button').attr('type'), 'button');
|
||||
assert.ok($('#lead-form button').is('[disabled]'));
|
||||
assert.match($('#campaign-form-status').text(), /not enabled/);
|
||||
assert.ok($('#campaign-form-status a[href^="tel:"]').length);
|
||||
assert.equal($('[data-form-status-notice], #campaign-form-status').length, 0);
|
||||
assert.equal($('#lead-form a[href^="tel:"]').length, 1);
|
||||
assert.equal($('#lead-form a[href="/privacy-policy"]').length, 1);
|
||||
assert.doesNotMatch($('#lead-form').text(), /(?:online )?(?:forms?|requests?|submissions?) (?:are |is )?(?:unavailable|not enabled)|detailed medical|diagnostic|insurance-member/i);
|
||||
assert.equal($('#lead-form p:empty').length, 0);
|
||||
assert.equal($('iframe').length, 0);
|
||||
assert.equal($('script[src]').length, 0);
|
||||
assert.doesNotMatch($('script').text(), /gtag|googletagmanager|sessionStorage|fetch\(|utm_|gclid|postMessage/);
|
||||
}
|
||||
});
|
||||
|
||||
test('inactive form messaging directs visitors to telephone contact', () => {
|
||||
test('campaign contact paths remain without unavailable-form messaging', () => {
|
||||
for (const page of pages) {
|
||||
const $ = html(page);
|
||||
const heroNote = $('.hero .form-note').text();
|
||||
assert.doesNotMatch(heroNote, /forms are available anytime/i);
|
||||
assert.match(heroNote, /online forms are not enabled/i);
|
||||
assert.doesNotMatch(heroNote, /online forms are not enabled/i);
|
||||
assert.ok($('.hero .form-note a[href^="tel:"]').length);
|
||||
assert.doesNotMatch($('#lead-form').text(), /By submitting this form/i);
|
||||
assert.match($('#lead-form').text(), /Online submissions are not enabled/i);
|
||||
assert.ok($('#lead-form a[href^="tel:"]').length);
|
||||
assert.ok($('#lead-form a[href="/privacy-policy"]').length);
|
||||
assert.doesNotMatch($('#lead-form').text(), /(?:online )?(?:forms?|requests?|submissions?) (?:are |is )?(?:unavailable|not enabled)/i);
|
||||
assert.doesNotMatch($('.consultation__contact').text(), /Online (?:forms|requests|submissions)/i);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -148,7 +153,8 @@ test('early-intervention preserves its own publication identity and source secti
|
||||
assert.equal($('#consultation input').length, 3);
|
||||
assert.equal($('#consultation input:disabled').length, 3);
|
||||
assert.equal($('#consultation button').attr('type'), 'button');
|
||||
assert.ok($('#consultation-unavailable a[href="tel:+14806877099"]').length);
|
||||
assert.ok($('.qr-call-card a[href="tel:+14806877099"]').length);
|
||||
assert.equal($('#consultation-unavailable, [data-form-status-notice]').length, 0);
|
||||
assert.equal($('img[src^="https:"]').length, 0);
|
||||
assert.equal($('.early-header').length, 0);
|
||||
assert.equal($('.site-header').length, 1);
|
||||
@@ -161,12 +167,14 @@ test('early-intervention preserves its own publication identity and source secti
|
||||
assert.equal($('.mobile-cta').length, 0);
|
||||
});
|
||||
|
||||
test('early-intervention inactive copy does not promise online requests', () => {
|
||||
test('early-intervention keeps telephone contact without unavailable-form copy', () => {
|
||||
const $ = load(read('dist/lp/early-intervention/index.html'));
|
||||
assert.equal($('.eyebrow').first().text(), 'Evidence-Based ABA Therapy');
|
||||
assert.doesNotMatch($('.qr-landing').text(), /Send a short request/);
|
||||
assert.doesNotMatch($('.qr-landing').text(), /Evidense-Based/);
|
||||
assert.match($('.qr-contact-section').text(), /Online requests are not enabled/);
|
||||
assert.doesNotMatch($('.qr-landing').text(), /(?:online )?(?:forms?|requests?|submissions?) (?:are |is )?(?:unavailable|not enabled)/i);
|
||||
assert.doesNotMatch($('.qr-contact-section').text(), /detailed medical|diagnostic|insurance-member/i);
|
||||
assert.equal($('.qr-contact-section p:empty').length, 0);
|
||||
assert.ok($('.qr-hero-actions a[href^="tel:"]').length);
|
||||
assert.ok($('.qr-final-cta a[href^="tel:"]').length);
|
||||
assert.equal($('form').length, 0);
|
||||
|
||||
Reference in new issue
Block a user