import { test, expect } from '@playwright/test'; test.describe('Functional - homepage', () => { test('homepage: title matches GT', async ({ page }) => { await page.goto('/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mendova telehealth'); }); test('homepage: h1 "Around-the-clock care with cli"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Around-the-clock care with clinicians online now' || t.startsWith('Around-the-clock care with clinicians online now'))).toBeTruthy(); }); test('homepage: h2 "Around-the-clock care with cli"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Around-the-clock care with clinicians online now.' || t.startsWith('Around-the-clock care with clinicians online now.'))).toBeTruthy(); }); test('homepage: h2 "Fast virtual visits for everyd"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fast virtual visits for everyday urgent care and ongoing mental health needs' || t.startsWith('Fast virtual visits for everyday urgent care and ongoing mental health needs'))).toBeTruthy(); }); test('homepage: h2 "How care works with Mendova"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How care works with Mendova' || t.startsWith('How care works with Mendova'))).toBeTruthy(); }); test('homepage: header link "Skip Navigation"', async ({ page }) => { await page.goto('/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Urgent Care"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Allergies"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - about_us', () => { test('about_us: title matches GT', async ({ page }) => { await page.goto('/about-us/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('about us'); }); test('about_us: h1 "About us"', async ({ page }) => { await page.goto('/about-us/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'About us' || t.startsWith('About us'))).toBeTruthy(); }); test('about_us: h2 "Mendova has joined the Everwel"', async ({ page }) => { await page.goto('/about-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mendova has joined the Everwell Care network' || t.startsWith('Mendova has joined the Everwell Care network'))).toBeTruthy(); }); test('about_us: h2 "Our mission and guiding values"', async ({ page }) => { await page.goto('/about-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our mission and guiding values' || t.startsWith('Our mission and guiding values'))).toBeTruthy(); }); test('about_us: h3 "Put the Patient First"', async ({ page }) => { await page.goto('/about-us/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Put the Patient First' || t.startsWith('Put the Patient First'))).toBeTruthy(); }); test('about_us: header link "Skip to content"', async ({ page }) => { await page.goto('/about-us/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('about_us: nav link "Urgent Care"', async ({ page }) => { await page.goto('/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('about_us: nav link "Allergies"', async ({ page }) => { await page.goto('/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('about_us: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog', () => { test('blog: title matches GT', async ({ page }) => { await page.goto('/blog/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mendova health blog'); }); test('blog: h1 "Mendova Health Journal"', async ({ page }) => { await page.goto('/blog/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mendova Health Journal' || t.startsWith('Mendova Health Journal'))).toBeTruthy(); }); test('blog: h2 "Preventive screenings by age: "', async ({ page }) => { await page.goto('/blog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Preventive screenings by age: what matters most' || t.startsWith('Preventive screenings by age: what matters most'))).toBeTruthy(); }); test('blog: h2 "Hormones and your mood: what t"', async ({ page }) => { await page.goto('/blog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Hormones and your mood: what to know' || t.startsWith('Hormones and your mood: what to know'))).toBeTruthy(); }); test('blog: h2 "Boost your heart health: 12 si"', async ({ page }) => { await page.goto('/blog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Boost your heart health: 12 simple habits' || t.startsWith('Boost your heart health: 12 simple habits'))).toBeTruthy(); }); test('blog: header link "Skip to Content"', async ({ page }) => { await page.goto('/blog/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - businesses', () => { test('businesses: title matches GT', async ({ page }) => { await page.goto('/businesses/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('for organizations'); }); test('businesses: h1 "Businesses"', async ({ page }) => { await page.goto('/businesses/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Businesses' || t.startsWith('Businesses'))).toBeTruthy(); }); test('businesses: h2 "Mendova, together with Everwel"', async ({ page }) => { await page.goto('/businesses/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mendova, together with Everwell Care, is now Vantell Health Group' || t.startsWith('Mendova, together with Everwell Care, is now Vantell Health Group'))).toBeTruthy(); }); test('businesses: h2 "We support organizations in ca"', async ({ page }) => { await page.goto('/businesses/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'We support organizations in caring better for the people they serve.' || t.startsWith('We support organizations in caring better for the people they serve.'))).toBeTruthy(); }); test('businesses: h3 "Employers"', async ({ page }) => { await page.goto('/businesses/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Employers' || t.startsWith('Employers'))).toBeTruthy(); }); test('businesses: header link "Skip Navigation"', async ({ page }) => { await page.goto('/businesses/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('businesses: nav link "Urgent Care"', async ({ page }) => { await page.goto('/businesses/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('businesses: nav link "Allergies"', async ({ page }) => { await page.goto('/businesses/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('businesses: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/businesses/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - clinicians', () => { test('clinicians: title matches GT', async ({ page }) => { await page.goto('/clinicians/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('our clinicians directory'); }); test('clinicians: h1 "Get to Know Our Clinical Team"', async ({ page }) => { await page.goto('/clinicians/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get to Know Our Clinical Team' || t.startsWith('Get to Know Our Clinical Team'))).toBeTruthy(); }); test('clinicians: h2 "Clinicians for Urgent, Prevent"', async ({ page }) => { await page.goto('/clinicians/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Clinicians for Urgent, Preventive & Chronic Care' || t.startsWith('Clinicians for Urgent, Preventive & Chronic Care'))).toBeTruthy(); }); test('clinicians: h2 "Psychiatrists, Counselors & Be"', async ({ page }) => { await page.goto('/clinicians/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Psychiatrists, Counselors & Beyond' || t.startsWith('Psychiatrists, Counselors & Beyond'))).toBeTruthy(); }); test('clinicians: h2 "A Broad Team of Caregivers"', async ({ page }) => { await page.goto('/clinicians/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A Broad Team of Caregivers' || t.startsWith('A Broad Team of Caregivers'))).toBeTruthy(); }); test('clinicians: header link "Skip to Content"', async ({ page }) => { await page.goto('/clinicians/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('clinicians: nav link "Urgent Care"', async ({ page }) => { await page.goto('/clinicians/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('clinicians: nav link "Allergies"', async ({ page }) => { await page.goto('/clinicians/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('clinicians: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/clinicians/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - cognitive_behavioral_therapy', () => { test('cognitive_behavioral_therapy: title matches GT', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cognitive behavioral therapy (cbt)'); }); test('cognitive_behavioral_therapy: h1 "Cognitive Behavioral Therapy ("', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cognitive Behavioral Therapy (CBT)' || t.startsWith('Cognitive Behavioral Therapy (CBT)'))).toBeTruthy(); }); test('cognitive_behavioral_therapy: h2 "Cognitive Behavioral Therapy"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cognitive Behavioral Therapy' || t.startsWith('Cognitive Behavioral Therapy'))).toBeTruthy(); }); test('cognitive_behavioral_therapy: h2 "Why choose Cognitive Behaviora"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Why choose Cognitive Behavioral Therapy through Mendova for your care?' || t.startsWith('Why choose Cognitive Behavioral Therapy through Mendova for your care?'))).toBeTruthy(); }); test('cognitive_behavioral_therapy: h2 "Getting care"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Getting care' || t.startsWith('Getting care'))).toBeTruthy(); }); test('cognitive_behavioral_therapy: header link "Skip to Content"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('cognitive_behavioral_therapy: nav link "Urgent Care"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('cognitive_behavioral_therapy: nav link "Allergies"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('cognitive_behavioral_therapy: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/cognitive-behavioral-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - doctors_note', () => { test('doctors_note: title matches GT', async ({ page }) => { await page.goto('/doctors-note/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('request an online doctor\'s note in minut'); }); test('doctors_note: h1 "Doctor\'s Note"', async ({ page }) => { await page.goto('/doctors-note/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Doctor\'s Note' || t.startsWith('Doctor\'s Note'))).toBeTruthy(); }); test('doctors_note: h2 "Who might need a Doctor\'s Note"', async ({ page }) => { await page.goto('/doctors-note/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Who might need a Doctor\'s Note?' || t.startsWith('Who might need a Doctor\'s Note?'))).toBeTruthy(); }); test('doctors_note: h2 "A virtual doctor\'s appointment"', async ({ page }) => { await page.goto('/doctors-note/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual doctor\'s appointment runs between \$0–\$99' || t.startsWith('A virtual doctor\'s appointment runs between \$0–\$99'))).toBeTruthy(); }); test('doctors_note: h2 "What are the advantages of cho"', async ({ page }) => { await page.goto('/doctors-note/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What are the advantages of choosing Mendova for a Doctor\'s Note?' || t.startsWith('What are the advantages of choosing Mendova for a Doctor\'s Note?'))).toBeTruthy(); }); test('doctors_note: header link "Skip to Content"', async ({ page }) => { await page.goto('/doctors-note/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('doctors_note: nav link "Urgent Care"', async ({ page }) => { await page.goto('/doctors-note/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('doctors_note: nav link "Allergies"', async ({ page }) => { await page.goto('/doctors-note/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('doctors_note: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/doctors-note/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - emdr_therapy', () => { test('emdr_therapy: title matches GT', async ({ page }) => { await page.goto('/emdr-therapy/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('emdr online'); }); test('emdr_therapy: h1 "EMDR from Home: Eye Movement D"', async ({ page }) => { await page.goto('/emdr-therapy/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'EMDR from Home: Eye Movement Desensitization and Reprocessing (EMDR) Care' || t.startsWith('EMDR from Home: Eye Movement Desensitization and Reprocessing (EMDR) Care'))).toBeTruthy(); }); test('emdr_therapy: h2 "At-Home Eye Movement Desensiti"', async ({ page }) => { await page.goto('/emdr-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'At-Home Eye Movement Desensitization and Reprocessing (EMDR)' || t.startsWith('At-Home Eye Movement Desensitization and Reprocessing (EMDR)'))).toBeTruthy(); }); test('emdr_therapy: h2 "How your online EMDR visit wor"', async ({ page }) => { await page.goto('/emdr-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How your online EMDR visit works' || t.startsWith('How your online EMDR visit works'))).toBeTruthy(); }); test('emdr_therapy: h2 "What Members Are Telling Us"', async ({ page }) => { await page.goto('/emdr-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What Members Are Telling Us' || t.startsWith('What Members Are Telling Us'))).toBeTruthy(); }); test('emdr_therapy: header link "Skip to Content"', async ({ page }) => { await page.goto('/emdr-therapy/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('emdr_therapy: nav link "Urgent Care"', async ({ page }) => { await page.goto('/emdr-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('emdr_therapy: nav link "Allergies"', async ({ page }) => { await page.goto('/emdr-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('emdr_therapy: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/emdr-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - faqs', () => { test('faqs: title matches GT', async ({ page }) => { await page.goto('/faqs/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('frequently asked questions (faqs)'); }); test('faqs: h1 "Answers to the questions our m"', async ({ page }) => { await page.goto('/faqs/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Answers to the questions our members ask most' || t.startsWith('Answers to the questions our members ask most'))).toBeTruthy(); }); test('faqs: h2 "General Topics"', async ({ page }) => { await page.goto('/faqs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'General Topics' || t.startsWith('General Topics'))).toBeTruthy(); }); test('faqs: h2 "Billing, Payments & Insurance"', async ({ page }) => { await page.goto('/faqs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Billing, Payments & Insurance' || t.startsWith('Billing, Payments & Insurance'))).toBeTruthy(); }); test('faqs: h2 "Medicare"', async ({ page }) => { await page.goto('/faqs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Medicare' || t.startsWith('Medicare'))).toBeTruthy(); }); test('faqs: header link "Skip to content"', async ({ page }) => { await page.goto('/faqs/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('faqs: nav link "Urgent Care"', async ({ page }) => { await page.goto('/faqs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('faqs: nav link "Allergies"', async ({ page }) => { await page.goto('/faqs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('faqs: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/faqs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - get_the_app', () => { test('get_the_app: title matches GT', async ({ page }) => { await page.goto('/get-the-app/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('top'); }); test('get_the_app: h1 "Get the Mendova virtual care a"', async ({ page }) => { await page.goto('/get-the-app/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the Mendova virtual care app' || t.startsWith('Get the Mendova virtual care app'))).toBeTruthy(); }); test('get_the_app: header link "Skip Navigation"', async ({ page }) => { await page.goto('/get-the-app/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('get_the_app: nav link "Urgent Care"', async ({ page }) => { await page.goto('/get-the-app/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('get_the_app: nav link "Allergies"', async ({ page }) => { await page.goto('/get-the-app/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('get_the_app: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/get-the-app/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - how_it_works', () => { test('how_it_works: title matches GT', async ({ page }) => { await page.goto('/how-it-works/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how it works'); }); test('how_it_works: h1 "How It Works"', async ({ page }) => { await page.goto('/how-it-works/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How It Works' || t.startsWith('How It Works'))).toBeTruthy(); }); test('how_it_works: h2 "How does the Mendova service w"', async ({ page }) => { await page.goto('/how-it-works/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How does the Mendova service work?' || t.startsWith('How does the Mendova service work?'))).toBeTruthy(); }); test('how_it_works: h2 "Get care in three simple steps"', async ({ page }) => { await page.goto('/how-it-works/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get care in three simple steps' || t.startsWith('Get care in three simple steps'))).toBeTruthy(); }); test('how_it_works: h2 "How it works: FAQ"', async ({ page }) => { await page.goto('/how-it-works/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How it works: FAQ' || t.startsWith('How it works: FAQ'))).toBeTruthy(); }); test('how_it_works: header link "Skip to content"', async ({ page }) => { await page.goto('/how-it-works/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('how_it_works: nav link "Urgent Care"', async ({ page }) => { await page.goto('/how-it-works/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('how_it_works: nav link "Allergies"', async ({ page }) => { await page.goto('/how-it-works/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('how_it_works: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/how-it-works/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - how_to_contact_us', () => { test('how_to_contact_us: title matches GT', async ({ page }) => { await page.goto('/how-to-contact-us/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('contact us'); }); test('how_to_contact_us: h1 "Contact Us"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Contact Us' || t.startsWith('Contact Us'))).toBeTruthy(); }); test('how_to_contact_us: h2 "Our Locations"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Our Locations' || t.startsWith('Our Locations'))).toBeTruthy(); }); test('how_to_contact_us: h3 "Member Support"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Member Support' || t.startsWith('Member Support'))).toBeTruthy(); }); test('how_to_contact_us: h3 "Call Support"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Call Support' || t.startsWith('Call Support'))).toBeTruthy(); }); test('how_to_contact_us: header link "Skip to content"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('how_to_contact_us: nav link "Urgent Care"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('how_to_contact_us: nav link "Allergies"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('how_to_contact_us: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/how-to-contact-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - mental_health', () => { test('mental_health: title matches GT', async ({ page }) => { await page.goto('/mental-health/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual mental health care'); }); test('mental_health: h1 "Virtual Mental Health Care | T"', async ({ page }) => { await page.goto('/mental-health/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Mental Health Care | Therapy & Psychiatry' || t.startsWith('Virtual Mental Health Care | Therapy & Psychiatry'))).toBeTruthy(); }); test('mental_health: h1 "Access mental wellness from an"', async ({ page }) => { await page.goto('/mental-health/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Access mental wellness from anywhere.' || t.startsWith('Access mental wellness from anywhere.'))).toBeTruthy(); }); test('mental_health: h2 "Mental health concerns our cli"', async ({ page }) => { await page.goto('/mental-health/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mental health concerns our clinicians treat here:' || t.startsWith('Mental health concerns our clinicians treat here:'))).toBeTruthy(); }); test('mental_health: h2 "Get Our App"', async ({ page }) => { await page.goto('/mental-health/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Our App' || t.startsWith('Get Our App'))).toBeTruthy(); }); test('mental_health: header link "Skip Navigation"', async ({ page }) => { await page.goto('/mental-health/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('mental_health: nav link "Urgent Care"', async ({ page }) => { await page.goto('/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('mental_health: nav link "Allergies"', async ({ page }) => { await page.goto('/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('mental_health: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - online_couples_therapy', () => { test('online_couples_therapy: title matches GT', async ({ page }) => { await page.goto('/online-couples-therapy/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual couples therapy & relationship c'); }); test('online_couples_therapy: h1 "Virtual Couples Therapy & Rela"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Couples Therapy & Relationship Counseling (Insurance Welcome)' || t.startsWith('Virtual Couples Therapy & Relationship Counseling (Insurance Welcome)'))).toBeTruthy(); }); test('online_couples_therapy: h2 "Virtual Couples Therapy & Rela"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Couples Therapy & Relationship Counseling' || t.startsWith('Virtual Couples Therapy & Relationship Counseling'))).toBeTruthy(); }); test('online_couples_therapy: h2 "What makes virtual couples the"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What makes virtual couples therapy worthwhile?' || t.startsWith('What makes virtual couples therapy worthwhile?'))).toBeTruthy(); }); test('online_couples_therapy: h2 "How it works"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How it works' || t.startsWith('How it works'))).toBeTruthy(); }); test('online_couples_therapy: header link "Skip to Content"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('online_couples_therapy: nav link "Urgent Care"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('online_couples_therapy: nav link "Allergies"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('online_couples_therapy: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/online-couples-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - online_prescriptions', () => { test('online_prescriptions: title matches GT', async ({ page }) => { await page.goto('/online-prescriptions/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online prescriptions'); }); test('online_prescriptions: h1 "Prescription Refills & Ongoing"', async ({ page }) => { await page.goto('/online-prescriptions/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Prescription Refills & Ongoing Medication Management' || t.startsWith('Prescription Refills & Ongoing Medication Management'))).toBeTruthy(); }); test('online_prescriptions: h2 "Prescriptions handled online."', async ({ page }) => { await page.goto('/online-prescriptions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Prescriptions handled online.' || t.startsWith('Prescriptions handled online.'))).toBeTruthy(); }); test('online_prescriptions: h2 "Who should use this?"', async ({ page }) => { await page.goto('/online-prescriptions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Who should use this?' || t.startsWith('Who should use this?'))).toBeTruthy(); }); test('online_prescriptions: h2 "A virtual visit for a prescrip"', async ({ page }) => { await page.goto('/online-prescriptions/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual visit for a prescription refill runs between \$0–\$99' || t.startsWith('A virtual visit for a prescription refill runs between \$0–\$99'))).toBeTruthy(); }); test('online_prescriptions: header link "Skip to content"', async ({ page }) => { await page.goto('/online-prescriptions/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('online_prescriptions: nav link "Urgent Care"', async ({ page }) => { await page.goto('/online-prescriptions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('online_prescriptions: nav link "Allergies"', async ({ page }) => { await page.goto('/online-prescriptions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('online_prescriptions: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/online-prescriptions/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - online_psychiatry', () => { test('online_psychiatry: title matches GT', async ({ page }) => { await page.goto('/online-psychiatry/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online psychiatry & mental health medica'); }); test('online_psychiatry: h1 "Online Psychiatry"', async ({ page }) => { await page.goto('/online-psychiatry/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Psychiatry' || t.startsWith('Online Psychiatry'))).toBeTruthy(); }); test('online_psychiatry: h2 "Who is online psychiatry right"', async ({ page }) => { await page.goto('/online-psychiatry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Who is online psychiatry right for?' || t.startsWith('Who is online psychiatry right for?'))).toBeTruthy(); }); test('online_psychiatry: h2 "An online psychiatry visit cos"', async ({ page }) => { await page.goto('/online-psychiatry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An online psychiatry visit costs between \$0–\$299' || t.startsWith('An online psychiatry visit costs between \$0–\$299'))).toBeTruthy(); }); test('online_psychiatry: h2 "What are the benefits of onlin"', async ({ page }) => { await page.goto('/online-psychiatry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What are the benefits of online psychiatry?' || t.startsWith('What are the benefits of online psychiatry?'))).toBeTruthy(); }); test('online_psychiatry: header link "Skip to Content"', async ({ page }) => { await page.goto('/online-psychiatry/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('online_psychiatry: nav link "Urgent Care"', async ({ page }) => { await page.goto('/online-psychiatry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('online_psychiatry: nav link "Allergies"', async ({ page }) => { await page.goto('/online-psychiatry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('online_psychiatry: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/online-psychiatry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - online_therapy', () => { test('online_therapy: title matches GT', async ({ page }) => { await page.goto('/online-therapy/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online therapy & video counseling as low'); }); test('online_therapy: h1 "Virtual Therapy & Counseling"', async ({ page }) => { await page.goto('/online-therapy/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Therapy & Counseling' || t.startsWith('Virtual Therapy & Counseling'))).toBeTruthy(); }); test('online_therapy: h2 "Who is virtual therapy a good "', async ({ page }) => { await page.goto('/online-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Who is virtual therapy a good fit' || t.startsWith('Who is virtual therapy a good fit'))).toBeTruthy(); }); test('online_therapy: h2 "A virtual therapy visit runs b"', async ({ page }) => { await page.goto('/online-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual therapy visit runs between \$0–\$134' || t.startsWith('A virtual therapy visit runs between \$0–\$134'))).toBeTruthy(); }); test('online_therapy: h2 "What makes virtual therapy wor"', async ({ page }) => { await page.goto('/online-therapy/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What makes virtual therapy worth it?' || t.startsWith('What makes virtual therapy worth it?'))).toBeTruthy(); }); test('online_therapy: header link "Skip to content"', async ({ page }) => { await page.goto('/online-therapy/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('online_therapy: nav link "Urgent Care"', async ({ page }) => { await page.goto('/online-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('online_therapy: nav link "Allergies"', async ({ page }) => { await page.goto('/online-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('online_therapy: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/online-therapy/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - sitemap', () => { test('sitemap: title matches GT', async ({ page }) => { await page.goto('/sitemap/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('site directory'); }); test('sitemap: h1 "Sitemap"', async ({ page }) => { await page.goto('/sitemap/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sitemap' || t.startsWith('Sitemap'))).toBeTruthy(); }); test('sitemap: h2 "Pages"', async ({ page }) => { await page.goto('/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pages' || t.startsWith('Pages'))).toBeTruthy(); }); test('sitemap: h2 "Reads"', async ({ page }) => { await page.goto('/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reads' || t.startsWith('Reads'))).toBeTruthy(); }); test('sitemap: h2 "Blog writers"', async ({ page }) => { await page.goto('/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Blog writers' || t.startsWith('Blog writers'))).toBeTruthy(); }); test('sitemap: header link "Skip to content"', async ({ page }) => { await page.goto('/sitemap/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('sitemap: nav link "Urgent Care"', async ({ page }) => { await page.goto('/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('sitemap: nav link "Allergies"', async ({ page }) => { await page.goto('/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('sitemap: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - skin_care', () => { test('skin_care: title matches GT', async ({ page }) => { await page.goto('/skin-care/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual skin care visits'); }); test('skin_care: h1 "Virtual Dermatology Care"', async ({ page }) => { await page.goto('/skin-care/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Dermatology Care' || t.startsWith('Virtual Dermatology Care'))).toBeTruthy(); }); test('skin_care: h2 "Great skin begins with us"', async ({ page }) => { await page.goto('/skin-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Great skin begins with us' || t.startsWith('Great skin begins with us'))).toBeTruthy(); }); test('skin_care: h2 "Virtual care for your skin con"', async ({ page }) => { await page.goto('/skin-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual care for your skin concerns' || t.startsWith('Virtual care for your skin concerns'))).toBeTruthy(); }); test('skin_care: h2 "Skin issues we care for"', async ({ page }) => { await page.goto('/skin-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skin issues we care for' || t.startsWith('Skin issues we care for'))).toBeTruthy(); }); test('skin_care: header link "Skip to content"', async ({ page }) => { await page.goto('/skin-care/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('skin_care: nav link "Urgent Care"', async ({ page }) => { await page.goto('/skin-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('skin_care: nav link "Allergies"', async ({ page }) => { await page.goto('/skin-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('skin_care: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/skin-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - urgent_care', () => { test('urgent_care: title matches GT', async ({ page }) => { await page.goto('/urgent-care/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual urgent care online'); }); test('urgent_care: h1 "Urgent Care"', async ({ page }) => { await page.goto('/urgent-care/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care'))).toBeTruthy(); }); test('urgent_care: h2 "Around-the-clock urgent care"', async ({ page }) => { await page.goto('/urgent-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Around-the-clock urgent care' || t.startsWith('Around-the-clock urgent care'))).toBeTruthy(); }); test('urgent_care: h2 "Common urgent care needs our c"', async ({ page }) => { await page.goto('/urgent-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Common urgent care needs our clinicians treat' || t.startsWith('Common urgent care needs our clinicians treat'))).toBeTruthy(); }); test('urgent_care: h2 "Reach Virtual Urgent Care Anyt"', async ({ page }) => { await page.goto('/urgent-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reach Virtual Urgent Care Anytime, Anywhere' || t.startsWith('Reach Virtual Urgent Care Anytime, Anywhere'))).toBeTruthy(); }); test('urgent_care: header link "Skip to content"', async ({ page }) => { await page.goto('/urgent-care/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('urgent_care: nav link "Urgent Care"', async ({ page }) => { await page.goto('/urgent-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('urgent_care: nav link "Allergies"', async ({ page }) => { await page.goto('/urgent-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('urgent_care: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/urgent-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - virtual_primary_care', () => { test('virtual_primary_care: title matches GT', async ({ page }) => { await page.goto('/virtual-primary-care/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual primary care'); }); test('virtual_primary_care: h1 "Virtual Primary Care"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Primary Care' || t.startsWith('Virtual Primary Care'))).toBeTruthy(); }); test('virtual_primary_care: h2 "What is Virtual Primary Care?"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is Virtual Primary Care?' || t.startsWith('What is Virtual Primary Care?'))).toBeTruthy(); }); test('virtual_primary_care: h2 "Why Choose Mendova for Your Vi"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Why Choose Mendova for Your Virtual Primary Care?' || t.startsWith('Why Choose Mendova for Your Virtual Primary Care?'))).toBeTruthy(); }); test('virtual_primary_care: h2 "Your online primary care visit"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your online primary care visit could cost as little as \$0*' || t.startsWith('Your online primary care visit could cost as little as \$0*'))).toBeTruthy(); }); test('virtual_primary_care: header link "Skip to Content"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care: nav link "Urgent Needs"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Needs' || t.startsWith('Urgent Needs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care: nav link "Hay Fever"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Hay Fever' || t.startsWith('Hay Fever')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care: nav link "Flu & Colds"', async ({ page }) => { await page.goto('/virtual-primary-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Flu & Colds' || t.startsWith('Flu & Colds')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat', () => { test('what_we_treat: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('conditions treated by video visit'); }); test('what_we_treat: h1 "Conditions Our Clinicians Trea"', async ({ page }) => { await page.goto('/what-we-treat/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Conditions Our Clinicians Treat' || t.startsWith('Conditions Our Clinicians Treat'))).toBeTruthy(); }); test('what_we_treat: h2 "24/7 online care with clinicia"', async ({ page }) => { await page.goto('/what-we-treat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '24/7 online care with clinicians ready to help.' || t.startsWith('24/7 online care with clinicians ready to help.'))).toBeTruthy(); }); test('what_we_treat: h2 "Care for the Everyday, the Urg"', async ({ page }) => { await page.goto('/what-we-treat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Care for the Everyday, the Urgent & the Mind' || t.startsWith('Care for the Everyday, the Urgent & the Mind'))).toBeTruthy(); }); test('what_we_treat: h2 "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care'))).toBeTruthy(); }); test('what_we_treat: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - about_us_cost_insurance', () => { test('about_us_cost_insurance: title matches GT', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('what does a mendova visit cost?'); }); test('about_us_cost_insurance: h1 "How much does a Mendova visit "', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How much does a Mendova visit cost?' || t.startsWith('How much does a Mendova visit cost?'))).toBeTruthy(); }); test('about_us_cost_insurance: h2 "How much does Mendova cost wit"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How much does Mendova cost without insurance?' || t.startsWith('How much does Mendova cost without insurance?'))).toBeTruthy(); }); test('about_us_cost_insurance: h2 "Get Our App"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Our App' || t.startsWith('Get Our App'))).toBeTruthy(); }); test('about_us_cost_insurance: h2 "Frequently asked questions abo"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Frequently asked questions about telehealth pricing and insurance coverage' || t.startsWith('Frequently asked questions about telehealth pricing and insurance coverage'))).toBeTruthy(); }); test('about_us_cost_insurance: header link "Skip to Content"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('about_us_cost_insurance: nav link "Urgent Care"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('about_us_cost_insurance: nav link "Allergies"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('about_us_cost_insurance: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/about-us/cost-insurance/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_anglehealth', () => { test('microsite_anglehealth: title matches GT', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mendova virtual care'); }); test('microsite_anglehealth: h2 "24/7 urgent care with online c"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '24/7 urgent care with online clinicians on call.' || t.startsWith('24/7 urgent care with online clinicians on call.'))).toBeTruthy(); }); test('microsite_anglehealth: h2 "How much does a telehealth vis"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How much does a telehealth visit cost with Mendova?' || t.startsWith('How much does a telehealth visit cost with Mendova?'))).toBeTruthy(); }); test('microsite_anglehealth: h2 "Care we offer"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Care we offer' || t.startsWith('Care we offer'))).toBeTruthy(); }); test('microsite_anglehealth: header link "Skip Navigation"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_anglehealth: header link "Northwind Health"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Northwind Health' || t.startsWith('Northwind Health')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('anglehealth')), 'href fragment present').toBeTruthy(); }); test('microsite_anglehealth: header link "Get the App"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the App' || t.startsWith('Get the App')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('get-the-app')), 'href fragment present').toBeTruthy(); }); test('microsite_anglehealth: nav link "How It Works"', async ({ page }) => { await page.goto('/microsite/anglehealth/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How It Works' || t.startsWith('How It Works')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('how-it-works')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_bcbsmn', () => { test('microsite_bcbsmn: title matches GT', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('north star health plan members'); }); test('microsite_bcbsmn: h2 "Access primary, urgent, and me"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Access primary, urgent, and mental health care online.' || t.startsWith('Access primary, urgent, and mental health care online.'))).toBeTruthy(); }); test('microsite_bcbsmn: h2 "Urgent care available 24/7."', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent care available 24/7.' || t.startsWith('Urgent care available 24/7.'))).toBeTruthy(); }); test('microsite_bcbsmn: h2 "Virtual primary care that fits"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual primary care that fits your day' || t.startsWith('Virtual primary care that fits your day'))).toBeTruthy(); }); test('microsite_bcbsmn: h2 "What will a visit cost me?"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What will a visit cost me?' || t.startsWith('What will a visit cost me?'))).toBeTruthy(); }); test('microsite_bcbsmn: header link "Skip to content"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_bcbsmn: header link "North Star Health Plan"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'North Star Health Plan' || t.startsWith('North Star Health Plan')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('bcbsmn')), 'href fragment present').toBeTruthy(); }); test('microsite_bcbsmn: header link "Get the App"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the App' || t.startsWith('Get the App')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('get-the-app')), 'href fragment present').toBeTruthy(); }); test('microsite_bcbsmn: nav link "How It Works"', async ({ page }) => { await page.goto('/microsite/bcbsmn/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How It Works' || t.startsWith('How It Works')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('how-it-works')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_healthy_ohio', () => { test('microsite_healthy_ohio: title matches GT', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('healthy living program in ohio'); }); test('microsite_healthy_ohio: h2 "24/7 urgent care with online d"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '24/7 urgent care with online doctors on call.' || t.startsWith('24/7 urgent care with online doctors on call.'))).toBeTruthy(); }); test('microsite_healthy_ohio: h2 "Covered visits for Clearpath H"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Covered visits for Clearpath Health Plan members' || t.startsWith('Covered visits for Clearpath Health Plan members'))).toBeTruthy(); }); test('microsite_healthy_ohio: h2 "Care we offer"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Care we offer' || t.startsWith('Care we offer'))).toBeTruthy(); }); test('microsite_healthy_ohio: h3 "Medical"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Medical' || t.startsWith('Medical'))).toBeTruthy(); }); test('microsite_healthy_ohio: header link "Skip to Content"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_healthy_ohio: header link "Clearpath Health Plan"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Clearpath Health Plan' || t.startsWith('Clearpath Health Plan')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('healthyohio')), 'href fragment present').toBeTruthy(); }); test('microsite_healthy_ohio: header link "Español Es"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Español Es' || t.startsWith('Español Es')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('healthy-ohio')), 'href fragment present').toBeTruthy(); }); test('microsite_healthy_ohio: header link "Install App"', async ({ page }) => { await page.goto('/microsite/healthy-ohio/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Install App' || t.startsWith('Install App')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('get-the-app')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_optum', () => { test('microsite_optum: title matches GT', async ({ page }) => { await page.goto('/microsite/optum/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('havenwell mental health care provided by'); }); test('microsite_optum: h2 "Online mental health care"', async ({ page }) => { await page.goto('/microsite/optum/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online mental health care' || t.startsWith('Online mental health care'))).toBeTruthy(); }); test('microsite_optum: h2 "What will an online mental hea"', async ({ page }) => { await page.goto('/microsite/optum/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What will an online mental health visit cost me?' || t.startsWith('What will an online mental health visit cost me?'))).toBeTruthy(); }); test('microsite_optum: h2 "Online Mental Health includes"', async ({ page }) => { await page.goto('/microsite/optum/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Mental Health includes' || t.startsWith('Online Mental Health includes'))).toBeTruthy(); }); test('microsite_optum: h2 "What Our Members Are Saying"', async ({ page }) => { await page.goto('/microsite/optum/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What Our Members Are Saying' || t.startsWith('What Our Members Are Saying'))).toBeTruthy(); }); test('microsite_optum: header link "Skip to content"', async ({ page }) => { await page.goto('/microsite/optum/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_optum: header link "Havenwell"', async ({ page }) => { await page.goto('/microsite/optum/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Havenwell' || t.startsWith('Havenwell')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('optum')), 'href fragment present').toBeTruthy(); }); test('microsite_optum: header link "Get Our App"', async ({ page }) => { await page.goto('/microsite/optum/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Our App' || t.startsWith('Get Our App')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('get-the-app')), 'href fragment present').toBeTruthy(); }); test('microsite_optum: nav link "Ways We Help"', async ({ page }) => { await page.goto('/microsite/optum/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ways We Help' || t.startsWith('Ways We Help')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('how-it-works')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_scan', () => { test('microsite_scan: title matches GT', async ({ page }) => { await page.goto('/microsite/scan/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('brightpath health'); }); test('microsite_scan: h2 "Getting care is simple"', async ({ page }) => { await page.goto('/microsite/scan/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Getting care is simple' || t.startsWith('Getting care is simple'))).toBeTruthy(); }); test('microsite_scan: h3 "1. Create your account"', async ({ page }) => { await page.goto('/microsite/scan/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Create your account' || t.startsWith('1. Create your account'))).toBeTruthy(); }); test('microsite_scan: h3 "2. Book your virtual appointme"', async ({ page }) => { await page.goto('/microsite/scan/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '2. Book your virtual appointment' || t.startsWith('2. Book your virtual appointment'))).toBeTruthy(); }); test('microsite_scan: h3 "3. Get seen"', async ({ page }) => { await page.goto('/microsite/scan/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '3. Get seen' || t.startsWith('3. Get seen'))).toBeTruthy(); }); test('microsite_scan: header link "Skip to content"', async ({ page }) => { await page.goto('/microsite/scan/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_scan: header link "Brightpath Health"', async ({ page }) => { await page.goto('/microsite/scan/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Brightpath Health' || t.startsWith('Brightpath Health')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('scan')), 'href fragment present').toBeTruthy(); }); test('microsite_scan: nav link "How It Works"', async ({ page }) => { await page.goto('/microsite/scan/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How It Works' || t.startsWith('How It Works')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('how-it-works')), 'href fragment present').toBeTruthy(); }); test('microsite_scan: nav link "Cost & Insurance"', async ({ page }) => { await page.goto('/microsite/scan/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cost & Insurance' || t.startsWith('Cost & Insurance')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cost-insurance')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - microsite_tricare_east', () => { test('microsite_tricare_east: title matches GT', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('sentinel east'); }); test('microsite_tricare_east: h2 "24/7 urgent care with online c"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '24/7 urgent care with online clinicians on call.' || t.startsWith('24/7 urgent care with online clinicians on call.'))).toBeTruthy(); }); test('microsite_tricare_east: h2 "See a physician, counselor, or"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See a physician, counselor, or specialist by video.' || t.startsWith('See a physician, counselor, or specialist by video.'))).toBeTruthy(); }); test('microsite_tricare_east: h2 "Virtual care built around you."', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual care built around you.' || t.startsWith('Virtual care built around you.'))).toBeTruthy(); }); test('microsite_tricare_east: h2 "Sign up with your Sentinel Ben"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign up with your Sentinel Benefits Number (SBN)' || t.startsWith('Sign up with your Sentinel Benefits Number (SBN)'))).toBeTruthy(); }); test('microsite_tricare_east: header link "Skip to Content"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('microsite_tricare_east: header link "Sentinel East"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sentinel East' || t.startsWith('Sentinel East')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('tricare-east')), 'href fragment present').toBeTruthy(); }); test('microsite_tricare_east: header link "Get our App"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get our App' || t.startsWith('Get our App')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('get-the-app')), 'href fragment present').toBeTruthy(); }); test('microsite_tricare_east: nav link "How Care Works"', async ({ page }) => { await page.goto('/microsite/tricare-east/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Care Works' || t.startsWith('How Care Works')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('how-it-works')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - virtual_primary_care_chronic_care', () => { test('virtual_primary_care_chronic_care: title matches GT', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('chronic care video visits'); }); test('virtual_primary_care_chronic_care: h1 "Ongoing Care"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ongoing Care' || t.startsWith('Ongoing Care'))).toBeTruthy(); }); test('virtual_primary_care_chronic_care: h3 "Virtual Primary Care"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Primary Care' || t.startsWith('Virtual Primary Care'))).toBeTruthy(); }); test('virtual_primary_care_chronic_care: h3 "Urgent Care"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care'))).toBeTruthy(); }); test('virtual_primary_care_chronic_care: h3 "Preventive Health"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Preventive Health' || t.startsWith('Preventive Health'))).toBeTruthy(); }); test('virtual_primary_care_chronic_care: header link "Skip To Content"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip To Content' || t.startsWith('Skip To Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_chronic_care: nav link "Urgent Care"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_chronic_care: nav link "Allergies"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_chronic_care: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/virtual-primary-care/chronic-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - virtual_primary_care_preventive_care', () => { test('virtual_primary_care_preventive_care: title matches GT', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('preventive care video visits with mendov'); }); test('virtual_primary_care_preventive_care: h1 "Preventive Wellness"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Preventive Wellness' || t.startsWith('Preventive Wellness'))).toBeTruthy(); }); test('virtual_primary_care_preventive_care: h2 "Staying Well"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Staying Well' || t.startsWith('Staying Well'))).toBeTruthy(); }); test('virtual_primary_care_preventive_care: h3 "Virtual Primary Care"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Primary Care' || t.startsWith('Virtual Primary Care'))).toBeTruthy(); }); test('virtual_primary_care_preventive_care: h3 "Urgent Care"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care'))).toBeTruthy(); }); test('virtual_primary_care_preventive_care: header link "Skip to Content"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_preventive_care: nav link "Urgent Care"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_preventive_care: nav link "Allergies"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('virtual_primary_care_preventive_care: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/virtual-primary-care/preventive-care/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_acne', () => { test('what_we_treat_acne: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual acne care, diagnosis & prescript'); }); test('what_we_treat_acne: h1 "Acne"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Acne' || t.startsWith('Acne'))).toBeTruthy(); }); test('what_we_treat_acne: h2 "Virtual Acne Treatment & Presc"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Acne Treatment & Prescriptions' || t.startsWith('Virtual Acne Treatment & Prescriptions'))).toBeTruthy(); }); test('what_we_treat_acne: h2 "What is acne?"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is acne?' || t.startsWith('What is acne?'))).toBeTruthy(); }); test('what_we_treat_acne: h2 "Convenient online treatment pl"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Convenient online treatment plans for clearer skin' || t.startsWith('Convenient online treatment plans for clearer skin'))).toBeTruthy(); }); test('what_we_treat_acne: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_acne: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_acne: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_acne: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/acne/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_adhd', () => { test('what_we_treat_adhd: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online adhd support'); }); test('what_we_treat_adhd: h1 "Virtual ADHD Care"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual ADHD Care' || t.startsWith('Virtual ADHD Care'))).toBeTruthy(); }); test('what_we_treat_adhd: h2 "Understanding ADHD"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding ADHD' || t.startsWith('Understanding ADHD'))).toBeTruthy(); }); test('what_we_treat_adhd: h2 "Proven Virtual Care Options fo"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Proven Virtual Care Options for ADHD' || t.startsWith('Proven Virtual Care Options for ADHD'))).toBeTruthy(); }); test('what_we_treat_adhd: h2 "A virtual ADHD visit runs betw"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual ADHD visit runs between \$0–\$299' || t.startsWith('A virtual ADHD visit runs between \$0–\$299'))).toBeTruthy(); }); test('what_we_treat_adhd: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_adhd: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_adhd: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_adhd: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/adhd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_allergies', () => { test('what_we_treat_allergies: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual allergy doctor & care'); }); test('what_we_treat_allergies: h1 "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies'))).toBeTruthy(); }); test('what_we_treat_allergies: h2 "Virtual Allergy Treatment"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Allergy Treatment' || t.startsWith('Virtual Allergy Treatment'))).toBeTruthy(); }); test('what_we_treat_allergies: h2 "Allergies, explained"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies, explained' || t.startsWith('Allergies, explained'))).toBeTruthy(); }); test('what_we_treat_allergies: h2 "Reliable virtual care for your"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reliable virtual care for your allergies' || t.startsWith('Reliable virtual care for your allergies'))).toBeTruthy(); }); test('what_we_treat_allergies: header link "Skip To Content"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip To Content' || t.startsWith('Skip To Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_allergies: nav link "Rapid Care"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Rapid Care' || t.startsWith('Rapid Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_allergies: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_allergies: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_anxiety', () => { test('what_we_treat_anxiety: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online anxiety medication & treatment'); }); test('what_we_treat_anxiety: h1 "Online Anxiety Treatment & Med"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Anxiety Treatment & Medication' || t.startsWith('Online Anxiety Treatment & Medication'))).toBeTruthy(); }); test('what_we_treat_anxiety: h2 "Is this the right fit for you?"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Is this the right fit for you?' || t.startsWith('Is this the right fit for you?'))).toBeTruthy(); }); test('what_we_treat_anxiety: h2 "An online anxiety visit costs "', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An online anxiety visit costs between \$0–\$134' || t.startsWith('An online anxiety visit costs between \$0–\$134'))).toBeTruthy(); }); test('what_we_treat_anxiety: h2 "Online Anxiety Medication Opti"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Anxiety Medication Options' || t.startsWith('Online Anxiety Medication Options'))).toBeTruthy(); }); test('what_we_treat_anxiety: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_anxiety: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_anxiety: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_anxiety: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/anxiety/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_asthma', () => { test('what_we_treat_asthma: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('asthma care and treatment online'); }); test('what_we_treat_asthma: h1 "Manage Your Asthma by Video"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Manage Your Asthma by Video' || t.startsWith('Manage Your Asthma by Video'))).toBeTruthy(); }); test('what_we_treat_asthma: h2 "Virtual Care for Asthma"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Care for Asthma' || t.startsWith('Virtual Care for Asthma'))).toBeTruthy(); }); test('what_we_treat_asthma: h2 "Asthma explained"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Asthma explained' || t.startsWith('Asthma explained'))).toBeTruthy(); }); test('what_we_treat_asthma: h2 "Convenient online care for ast"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Convenient online care for asthma' || t.startsWith('Convenient online care for asthma'))).toBeTruthy(); }); test('what_we_treat_asthma: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_asthma: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_asthma: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_asthma: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/asthma/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_bronchitis_treatment_online', () => { test('what_we_treat_bronchitis_treatment_online: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online bronchitis treatment'); }); test('what_we_treat_bronchitis_treatment_online: h1 "Bronchitis Treatment Online"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Bronchitis Treatment Online' || t.startsWith('Bronchitis Treatment Online'))).toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: h2 "Online Bronchitis Treatment"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Bronchitis Treatment' || t.startsWith('Online Bronchitis Treatment'))).toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: h2 "Bronchitis, explained"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Bronchitis, explained' || t.startsWith('Bronchitis, explained'))).toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: h2 "Effective virtual care for bro"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Effective virtual care for bronchitis' || t.startsWith('Effective virtual care for bronchitis'))).toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bronchitis_treatment_online: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/bronchitis-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_bv_treatment_online', () => { test('what_we_treat_bv_treatment_online: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online bacterial vaginosis treatment'); }); test('what_we_treat_bv_treatment_online: h1 "Online BV Care Visits"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online BV Care Visits' || t.startsWith('Online BV Care Visits'))).toBeTruthy(); }); test('what_we_treat_bv_treatment_online: h2 "Treat Bacterial Vaginosis Virt"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Treat Bacterial Vaginosis Virtually' || t.startsWith('Treat Bacterial Vaginosis Virtually'))).toBeTruthy(); }); test('what_we_treat_bv_treatment_online: h2 "Understanding bacterial vagino"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding bacterial vaginosis' || t.startsWith('Understanding bacterial vaginosis'))).toBeTruthy(); }); test('what_we_treat_bv_treatment_online: h2 "Reliable virtual care for bact"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reliable virtual care for bacterial vaginosis relief' || t.startsWith('Reliable virtual care for bacterial vaginosis relief'))).toBeTruthy(); }); test('what_we_treat_bv_treatment_online: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bv_treatment_online: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bv_treatment_online: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_bv_treatment_online: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/bv-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_cold_flu', () => { test('what_we_treat_cold_flu: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online flu treatment'); }); test('what_we_treat_cold_flu: h1 "Cold and Flu"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold and Flu' || t.startsWith('Cold and Flu'))).toBeTruthy(); }); test('what_we_treat_cold_flu: h2 "Virtual Care for Cold and Flu "', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Care for Cold and Flu Symptoms' || t.startsWith('Virtual Care for Cold and Flu Symptoms'))).toBeTruthy(); }); test('what_we_treat_cold_flu: h2 "Is It the Flu or Just a Cold?"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Is It the Flu or Just a Cold?' || t.startsWith('Is It the Flu or Just a Cold?'))).toBeTruthy(); }); test('what_we_treat_cold_flu: h2 "Ways We Treat the Flu"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ways We Treat the Flu' || t.startsWith('Ways We Treat the Flu'))).toBeTruthy(); }); test('what_we_treat_cold_flu: header link "Jump To Content"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Jump To Content' || t.startsWith('Jump To Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_cold_flu: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_cold_flu: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_cold_flu: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/cold-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_covid', () => { test('what_we_treat_covid: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online covid'); }); test('what_we_treat_covid: h1 "Get Care for COVID-19 Online"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Care for COVID-19 Online' || t.startsWith('Get Care for COVID-19 Online'))).toBeTruthy(); }); test('what_we_treat_covid: h2 "Treat COVID-19 From Anywhere"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Treat COVID-19 From Anywhere' || t.startsWith('Treat COVID-19 From Anywhere'))).toBeTruthy(); }); test('what_we_treat_covid: h2 "What comes next"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What comes next' || t.startsWith('What comes next'))).toBeTruthy(); }); test('what_we_treat_covid: h2 "How your online covid doctor v"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How your online covid doctor visit works' || t.startsWith('How your online covid doctor visit works'))).toBeTruthy(); }); test('what_we_treat_covid: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_covid: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_covid: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_covid: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_depression', () => { test('what_we_treat_depression: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online depression care'); }); test('what_we_treat_depression: h1 "Virtual Care for Depression"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Care for Depression' || t.startsWith('Virtual Care for Depression'))).toBeTruthy(); }); test('what_we_treat_depression: h2 "Understanding depression"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding depression' || t.startsWith('Understanding depression'))).toBeTruthy(); }); test('what_we_treat_depression: h2 "Meaningful virtual treatment f"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Meaningful virtual treatment for depression' || t.startsWith('Meaningful virtual treatment for depression'))).toBeTruthy(); }); test('what_we_treat_depression: h2 "A virtual visit runs between \$"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual visit runs between \$0–\$134' || t.startsWith('A virtual visit runs between \$0–\$134'))).toBeTruthy(); }); test('what_we_treat_depression: header link "Skip to Content"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_depression: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_depression: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_depression: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/depression/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_diarrhea', () => { test('what_we_treat_diarrhea: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('diarrhea virtual care'); }); test('what_we_treat_diarrhea: h1 "Virtual Care for Diarrhea"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Care for Diarrhea' || t.startsWith('Virtual Care for Diarrhea'))).toBeTruthy(); }); test('what_we_treat_diarrhea: h2 "Quick, Reliable Virtual Care f"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Quick, Reliable Virtual Care for Diarrhea' || t.startsWith('Quick, Reliable Virtual Care for Diarrhea'))).toBeTruthy(); }); test('what_we_treat_diarrhea: h2 "What to expect"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What to expect' || t.startsWith('What to expect'))).toBeTruthy(); }); test('what_we_treat_diarrhea: h2 "How a virtual visit works"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How a virtual visit works' || t.startsWith('How a virtual visit works'))).toBeTruthy(); }); test('what_we_treat_diarrhea: header link "Jump to Content"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Jump to Content' || t.startsWith('Jump to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_diarrhea: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_diarrhea: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_diarrhea: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/diarrhea/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_ear_infections', () => { test('what_we_treat_ear_infections: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online ear infection treatment'); }); test('what_we_treat_ear_infections: h1 "Ear Infections"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ear Infections' || t.startsWith('Ear Infections'))).toBeTruthy(); }); test('what_we_treat_ear_infections: h2 "Get Ear Infection Care Online,"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Ear Infection Care Online, Fast*' || t.startsWith('Get Ear Infection Care Online, Fast*'))).toBeTruthy(); }); test('what_we_treat_ear_infections: h2 "Understanding ear infections"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding ear infections' || t.startsWith('Understanding ear infections'))).toBeTruthy(); }); test('what_we_treat_ear_infections: h2 "Effective online care that cle"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Effective online care that clears up an ear infection' || t.startsWith('Effective online care that clears up an ear infection'))).toBeTruthy(); }); test('what_we_treat_ear_infections: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ear_infections: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ear_infections: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ear_infections: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/ear-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_grief_loss', () => { test('what_we_treat_grief_loss: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online grief counseling & therapy'); }); test('what_we_treat_grief_loss: h1 "Virtual Grief Support & Counse"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Grief Support & Counseling' || t.startsWith('Virtual Grief Support & Counseling'))).toBeTruthy(); }); test('what_we_treat_grief_loss: h2 "Making Sense of Grief & Loss: "', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Making Sense of Grief & Loss: Far Beyond Sadness' || t.startsWith('Making Sense of Grief & Loss: Far Beyond Sadness'))).toBeTruthy(); }); test('what_we_treat_grief_loss: h2 "Online treatment that truly he"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online treatment that truly helps with grief' || t.startsWith('Online treatment that truly helps with grief'))).toBeTruthy(); }); test('what_we_treat_grief_loss: h2 "A virtual visit runs between \$"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual visit runs between \$0–\$134' || t.startsWith('A virtual visit runs between \$0–\$134'))).toBeTruthy(); }); test('what_we_treat_grief_loss: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_grief_loss: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_grief_loss: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_grief_loss: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/grief-loss/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_high_blood_pressure_treatment_online', () => { test('what_we_treat_high_blood_pressure_treatment_online: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online high blood pressure treatment & c'); }); test('what_we_treat_high_blood_pressure_treatment_online: h1 "Hypertension - Virtual Care Pl"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Hypertension - Virtual Care Plans for High Blood Pressure' || t.startsWith('Hypertension - Virtual Care Plans for High Blood Pressure'))).toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: h2 "Virtual Care for High Blood Pr"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Care for High Blood Pressure' || t.startsWith('Virtual Care for High Blood Pressure'))).toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: h2 "What high blood pressure is"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What high blood pressure is' || t.startsWith('What high blood pressure is'))).toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: h2 "Reliable virtual care for mana"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reliable virtual care for managing high blood pressure' || t.startsWith('Reliable virtual care for managing high blood pressure'))).toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_high_blood_pressure_treatment_online: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/high-blood-pressure-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_ibs', () => { test('what_we_treat_ibs: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('irritable bowel syndrome (ibs)'); }); test('what_we_treat_ibs: h1 "Irritable Bowel Syndrome (IBS)"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Irritable Bowel Syndrome (IBS)' || t.startsWith('Irritable Bowel Syndrome (IBS)'))).toBeTruthy(); }); test('what_we_treat_ibs: h2 "Steps to ease your symptoms"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Steps to ease your symptoms' || t.startsWith('Steps to ease your symptoms'))).toBeTruthy(); }); test('what_we_treat_ibs: h3 "How Mendova can support you"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Mendova can support you' || t.startsWith('How Mendova can support you'))).toBeTruthy(); }); test('what_we_treat_ibs: h3 "Understanding IBS"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding IBS' || t.startsWith('Understanding IBS'))).toBeTruthy(); }); test('what_we_treat_ibs: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ibs: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ibs: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ibs: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/ibs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_migraine_headache', () => { test('what_we_treat_migraine_headache: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online migraine care'); }); test('what_we_treat_migraine_headache: h1 "Online Care for Migraines"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Care for Migraines' || t.startsWith('Online Care for Migraines'))).toBeTruthy(); }); test('what_we_treat_migraine_headache: h2 "Migraine, explained"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Migraine, explained' || t.startsWith('Migraine, explained'))).toBeTruthy(); }); test('what_we_treat_migraine_headache: h2 "Proven virtual care for migrai"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Proven virtual care for migraine relief' || t.startsWith('Proven virtual care for migraine relief'))).toBeTruthy(); }); test('what_we_treat_migraine_headache: h2 "A virtual migraine visit runs "', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A virtual migraine visit runs between \$0–\$99' || t.startsWith('A virtual migraine visit runs between \$0–\$99'))).toBeTruthy(); }); test('what_we_treat_migraine_headache: header link "Skip to Content"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_migraine_headache: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_migraine_headache: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_migraine_headache: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/migraine-headache/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_nausea_vomiting', () => { test('what_we_treat_nausea_vomiting: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ondansetron prescription online'); }); test('what_we_treat_nausea_vomiting: h1 "Get Relief From Nausea and Vom"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get Relief From Nausea and Vomiting Now' || t.startsWith('Get Relief From Nausea and Vomiting Now'))).toBeTruthy(); }); test('what_we_treat_nausea_vomiting: h2 "Care and Treatment for Nausea "', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Care and Treatment for Nausea and Vomiting' || t.startsWith('Care and Treatment for Nausea and Vomiting'))).toBeTruthy(); }); test('what_we_treat_nausea_vomiting: h2 "How do you know when nausea an"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How do you know when nausea and vomiting need care?' || t.startsWith('How do you know when nausea and vomiting need care?'))).toBeTruthy(); }); test('what_we_treat_nausea_vomiting: h2 "Online care for nausea and vom"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online care for nausea and vomiting' || t.startsWith('Online care for nausea and vomiting'))).toBeTruthy(); }); test('what_we_treat_nausea_vomiting: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_nausea_vomiting: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_nausea_vomiting: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_nausea_vomiting: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/nausea-vomiting/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_pink_eye', () => { test('what_we_treat_pink_eye: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online pink eye care'); }); test('what_we_treat_pink_eye: h1 "Virtual Pink Eye Treatment"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Pink Eye Treatment' || t.startsWith('Virtual Pink Eye Treatment'))).toBeTruthy(); }); test('what_we_treat_pink_eye: h2 "Pink Eye Explained"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pink Eye Explained' || t.startsWith('Pink Eye Explained'))).toBeTruthy(); }); test('what_we_treat_pink_eye: h2 "Reliable Virtual Care for Pink"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reliable Virtual Care for Pink Eye' || t.startsWith('Reliable Virtual Care for Pink Eye'))).toBeTruthy(); }); test('what_we_treat_pink_eye: h2 "An online pink eye visit costs"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An online pink eye visit costs between \$0–\$99' || t.startsWith('An online pink eye visit costs between \$0–\$99'))).toBeTruthy(); }); test('what_we_treat_pink_eye: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_pink_eye: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_pink_eye: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_pink_eye: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/pink-eye/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_postpartum', () => { test('what_we_treat_postpartum: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('postpartum'); }); test('what_we_treat_postpartum: h1 "Postpartum Depression"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Postpartum Depression' || t.startsWith('Postpartum Depression'))).toBeTruthy(); }); test('what_we_treat_postpartum: h2 "Ways to ease your symptoms"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ways to ease your symptoms' || t.startsWith('Ways to ease your symptoms'))).toBeTruthy(); }); test('what_we_treat_postpartum: h3 "The ways Mendova supports you"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The ways Mendova supports you' || t.startsWith('The ways Mendova supports you'))).toBeTruthy(); }); test('what_we_treat_postpartum: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_postpartum: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_postpartum: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_postpartum: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/postpartum/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_ptsd', () => { test('what_we_treat_ptsd: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('ptsd explained'); }); test('what_we_treat_ptsd: h1 "PTSD"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'PTSD' || t.startsWith('PTSD'))).toBeTruthy(); }); test('what_we_treat_ptsd: h2 "Steps toward feeling better"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Steps toward feeling better' || t.startsWith('Steps toward feeling better'))).toBeTruthy(); }); test('what_we_treat_ptsd: h3 "How Mendova can help you heal"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Mendova can help you heal' || t.startsWith('How Mendova can help you heal'))).toBeTruthy(); }); test('what_we_treat_ptsd: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ptsd: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ptsd: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_ptsd: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/ptsd/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_sinus_infections', () => { test('what_we_treat_sinus_infections: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online sinus infection treatment'); }); test('what_we_treat_sinus_infections: h1 "Sinus Infections"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sinus Infections' || t.startsWith('Sinus Infections'))).toBeTruthy(); }); test('what_we_treat_sinus_infections: h2 "Virtual Sinus Infection Consul"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Sinus Infection Consultations' || t.startsWith('Virtual Sinus Infection Consultations'))).toBeTruthy(); }); test('what_we_treat_sinus_infections: h2 "What happens next"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What happens next' || t.startsWith('What happens next'))).toBeTruthy(); }); test('what_we_treat_sinus_infections: h2 "How a sinus infection teleheal"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How a sinus infection telehealth visit unfolds' || t.startsWith('How a sinus infection telehealth visit unfolds'))).toBeTruthy(); }); test('what_we_treat_sinus_infections: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_sinus_infections: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_sinus_infections: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_sinus_infections: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/sinus-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_std_treatment_online', () => { test('what_we_treat_std_treatment_online: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online std treatment'); }); test('what_we_treat_std_treatment_online: h1 "Confidential STD Care"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Confidential STD Care' || t.startsWith('Confidential STD Care'))).toBeTruthy(); }); test('what_we_treat_std_treatment_online: h2 "Virtual STD Treatment"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual STD Treatment' || t.startsWith('Virtual STD Treatment'))).toBeTruthy(); }); test('what_we_treat_std_treatment_online: h2 "The Steps Behind Virtual STD C"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The Steps Behind Virtual STD Care' || t.startsWith('The Steps Behind Virtual STD Care'))).toBeTruthy(); }); test('what_we_treat_std_treatment_online: h2 "Words From People We Care For"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Words From People We Care For' || t.startsWith('Words From People We Care For'))).toBeTruthy(); }); test('what_we_treat_std_treatment_online: header link "Skip to Content"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_std_treatment_online: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_std_treatment_online: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_std_treatment_online: nav link "Colds & Flu"', async ({ page }) => { await page.goto('/what-we-treat/std-treatment-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Colds & Flu' || t.startsWith('Colds & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_strep_throat', () => { test('what_we_treat_strep_throat: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('online strep throat care'); }); test('what_we_treat_strep_throat: h1 "Online Strep Throat Care and F"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Strep Throat Care and Fast Antibiotics' || t.startsWith('Online Strep Throat Care and Fast Antibiotics'))).toBeTruthy(); }); test('what_we_treat_strep_throat: h2 "Online Care for Strep Throat"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Care for Strep Throat' || t.startsWith('Online Care for Strep Throat'))).toBeTruthy(); }); test('what_we_treat_strep_throat: h2 "Strep throat explained"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Strep throat explained' || t.startsWith('Strep throat explained'))).toBeTruthy(); }); test('what_we_treat_strep_throat: h2 "Reliable virtual treatment for"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reliable virtual treatment for strep throat' || t.startsWith('Reliable virtual treatment for strep throat'))).toBeTruthy(); }); test('what_we_treat_strep_throat: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_strep_throat: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_strep_throat: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_strep_throat: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/strep-throat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_stress', () => { test('what_we_treat_stress: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual stress therapy'); }); test('what_we_treat_stress: h1 "Virtual Therapy For Stress"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Virtual Therapy For Stress' || t.startsWith('Virtual Therapy For Stress'))).toBeTruthy(); }); test('what_we_treat_stress: h2 "What is stress?"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What is stress?' || t.startsWith('What is stress?'))).toBeTruthy(); }); test('what_we_treat_stress: h2 "Effective virtual care for man"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Effective virtual care for managing stress' || t.startsWith('Effective virtual care for managing stress'))).toBeTruthy(); }); test('what_we_treat_stress: h2 "An online therapy visit costs "', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An online therapy visit costs between \$0–\$134' || t.startsWith('An online therapy visit costs between \$0–\$134'))).toBeTruthy(); }); test('what_we_treat_stress: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_stress: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_stress: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_stress: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/stress/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_uti', () => { test('what_we_treat_uti: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('uti treatment online'); }); test('what_we_treat_uti: h1 "Online Care for UTIs"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Care for UTIs' || t.startsWith('Online Care for UTIs'))).toBeTruthy(); }); test('what_we_treat_uti: h2 "Understanding a Urinary Tract "', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Understanding a Urinary Tract Infection' || t.startsWith('Understanding a Urinary Tract Infection'))).toBeTruthy(); }); test('what_we_treat_uti: h2 "Trusted online treatment for U"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trusted online treatment for UTIs' || t.startsWith('Trusted online treatment for UTIs'))).toBeTruthy(); }); test('what_we_treat_uti: h2 "An online UTI visit runs betwe"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'An online UTI visit runs between \$0–\$99' || t.startsWith('An online UTI visit runs between \$0–\$99'))).toBeTruthy(); }); test('what_we_treat_uti: header link "Skip to content"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_uti: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_uti: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_uti: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/uti/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - what_we_treat_yeast_infections', () => { test('what_we_treat_yeast_infections: title matches GT', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('yeast infection prescription & treatment'); }); test('what_we_treat_yeast_infections: h1 "Online Yeast Infection Care"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Online Yeast Infection Care' || t.startsWith('Online Yeast Infection Care'))).toBeTruthy(); }); test('what_we_treat_yeast_infections: h2 "Yeast Infection Care by Video"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Yeast Infection Care by Video' || t.startsWith('Yeast Infection Care by Video'))).toBeTruthy(); }); test('what_we_treat_yeast_infections: h2 "Prescriptions & Treatments for"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Prescriptions & Treatments for Yeast Infections' || t.startsWith('Prescriptions & Treatments for Yeast Infections'))).toBeTruthy(); }); test('what_we_treat_yeast_infections: h2 "How it works"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How it works' || t.startsWith('How it works'))).toBeTruthy(); }); test('what_we_treat_yeast_infections: header link "Skip Navigation"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_yeast_infections: nav link "Urgent Care"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_yeast_infections: nav link "Allergies"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('what_we_treat_yeast_infections: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/what-we-treat/yeast-infections/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu', () => { test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: title matches GT', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('first 24 hours of a cold or flu'); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: h1 "5 Steps to Take in the First 2"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '5 Steps to Take in the First 24 Hours of a Cold or Flu' || t.startsWith('5 Steps to Take in the First 24 Hours of a Cold or Flu'))).toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: h2 "Table of contents In this guid"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Table of contents In this guide' || t.startsWith('Table of contents In this guide'))).toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: h2 "How Do You Know If It\'s a Cold"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Do You Know If It\'s a Cold or Flu?' || t.startsWith('How Do You Know If It\'s a Cold or Flu?'))).toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: h2 "What to do the moment you feel"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What to do the moment you feel unwell?' || t.startsWith('What to do the moment you feel unwell?'))).toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_5_things_to_do_in_the_first_24_hours_of_a_cold_or_flu: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/cold-and-flu/5-things-to-do-in-the-first-24-hours-of-a-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_cold_and_flu_cold_vs_flu_whats_the_difference', () => { test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: title matches GT', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cold or flu? understanding the key diffe'); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: h1 "Cold or Flu: Which One Do You "', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold or Flu: Which One Do You Have?' || t.startsWith('Cold or Flu: Which One Do You Have?'))).toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: h3 "When Should a Child See a Doct"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'When Should a Child See a Doctor for a Cold: Signs It\'s Serious' || t.startsWith('When Should a Child See a Doctor for a Cold: Signs It\'s Serious'))).toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: h3 "The Biggest Mistakes People Ma"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The Biggest Mistakes People Make Treating a Cold' || t.startsWith('The Biggest Mistakes People Make Treating a Cold'))).toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: h3 "A Simple Guide to the Cold and"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A Simple Guide to the Cold and Flu Medicine Aisle' || t.startsWith('A Simple Guide to the Cold and Flu Medicine Aisle'))).toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_cold_vs_flu_whats_the_difference: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/cold-and-flu/cold-vs-flu-whats-the-difference/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious', () => { test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: title matches GT', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how long does a cold or flu stay contagi'); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: h1 "How long does a cold or the fl"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How long does a cold or the flu spread?' || t.startsWith('How long does a cold or the flu spread?'))).toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: h3 "Your Complete Cold & Flu Seaso"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your Complete Cold & Flu Season Prep Guide' || t.startsWith('Your Complete Cold & Flu Season Prep Guide'))).toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: h3 "Simple Ways to Ease Your Cough"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Simple Ways to Ease Your Cough' || t.startsWith('Simple Ways to Ease Your Cough'))).toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: h3 "When Should a Fever Send You t"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'When Should a Fever Send You to Urgent Care, and When Is It Serious?' || t.startsWith('When Should a Fever Send You to Urgent Care, and When Is It Serious?'))).toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_how_long_is_a_cold_or_flu_contagious: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/cold-and-flu/how-long-is-a-cold-or-flu-contagious/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide', () => { test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: title matches GT', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cold & flu season readiness'); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: h1 "Your Complete Cold & Flu Seaso"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your Complete Cold & Flu Season Preparedness Guide' || t.startsWith('Your Complete Cold & Flu Season Preparedness Guide'))).toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: h2 "Contents What you\'ll find insi"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Contents What you\'ll find inside' || t.startsWith('Contents What you\'ll find inside'))).toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: h2 "Expert Guidance on Prevention,"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Expert Guidance on Prevention, Symptoms, and Finding the Care You Deserve' || t.startsWith('Expert Guidance on Prevention, Symptoms, and Finding the Care You Deserve'))).toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: h2 "Cold, Flu, or Something Else? "', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold, Flu, or Something Else? Learning to Spot the Difference' || t.startsWith('Cold, Flu, or Something Else? Learning to Spot the Difference'))).toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_the_ultimate_cold_flu_season_readiness_guide: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/cold-and-flu/the-ultimate-cold-flu-season-readiness-guide/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu', () => { test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: title matches GT', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cold and flu self'); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: h1 "Common Errors to Avoid When Tr"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Common Errors to Avoid When Treating a Cold or Flu' || t.startsWith('Common Errors to Avoid When Treating a Cold or Flu'))).toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: h3 "When to Seek Urgent Care for t"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'When to Seek Urgent Care for the Flu: How Serious Is It?' || t.startsWith('When to Seek Urgent Care for the Flu: How Serious Is It?'))).toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: h3 "A Sinus Infection or a Cold?"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A Sinus Infection or a Cold?' || t.startsWith('A Sinus Infection or a Cold?'))).toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: h3 "When to Visit Urgent Care for "', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'When to Visit Urgent Care for a Fever: How Serious Is a Fever?' || t.startsWith('When to Visit Urgent Care for a Fever: How Serious Is a Fever?'))).toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_cold_and_flu_top_mistakes_when_self_treating_the_cold_or_flu: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/cold-and-flu/top-mistakes-when-self-treating-the-cold-or-flu/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_covid_is_it_a_cold_the_flu_or_covid', () => { test('blog_covid_is_it_a_cold_the_flu_or_covid: title matches GT', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cold, flu, or covid'); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: h1 "Cold, Flu, or Coronavirus? Wha"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold, Flu, or Coronavirus? What Your Symptoms Might Be Telling You' || t.startsWith('Cold, Flu, or Coronavirus? What Your Symptoms Might Be Telling You'))).toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: h2 "Ways to guard against colds, f"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ways to guard against colds, flu and coronavirus this season :' || t.startsWith('Ways to guard against colds, flu and coronavirus this season :'))).toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: h3 "Stay apart from other people"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Stay apart from other people' || t.startsWith('Stay apart from other people'))).toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: h3 "Clean your hands often"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Clean your hands often' || t.startsWith('Clean your hands often'))).toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: nav link "Same-Day Care"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Same-Day Care' || t.startsWith('Same-Day Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: nav link "Hay Fever"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Hay Fever' || t.startsWith('Hay Fever')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_covid_is_it_a_cold_the_flu_or_covid: nav link "Flu & Colds"', async ({ page }) => { await page.goto('/blog/covid/is-it-a-cold-the-flu-or-covid/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Flu & Colds' || t.startsWith('Flu & Colds')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_health_allergies_symptoms_and_types', () => { test('blog_health_allergies_symptoms_and_types: title matches GT', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('allergies'); }); test('blog_health_allergies_symptoms_and_types: h1 "Allergies: Signs and Common Ki"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies: Signs and Common Kinds' || t.startsWith('Allergies: Signs and Common Kinds'))).toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: h3 "A Simple Guide to Gender Prono"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A Simple Guide to Gender Pronouns and Why They Count' || t.startsWith('A Simple Guide to Gender Pronouns and Why They Count'))).toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: h3 "What Happens During an Online "', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'What Happens During an Online Visit' || t.startsWith('What Happens During an Online Visit'))).toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: h3 "How Alcohol Affects Your Heart"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Alcohol Affects Your Heart Health' || t.startsWith('How Alcohol Affects Your Heart Health'))).toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: header link "Skip Navigation"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip Navigation' || t.startsWith('Skip Navigation')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_health_allergies_symptoms_and_types: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/health/allergies-symptoms-and-types/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_health_how_to_control_your_seasonal_allergies', () => { test('blog_health_how_to_control_your_seasonal_allergies: title matches GT', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('how to manage your seasonal allergy symp'); }); test('blog_health_how_to_control_your_seasonal_allergies: h1 "Managing Your Seasonal Allergy"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Managing Your Seasonal Allergy Symptoms' || t.startsWith('Managing Your Seasonal Allergy Symptoms'))).toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: h3 "5 Reasons Your Weight Loss Pro"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '5 Reasons Your Weight Loss Progress May Have Stalled' || t.startsWith('5 Reasons Your Weight Loss Progress May Have Stalled'))).toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: h3 "Easy Ways to Clear Up Nasal Co"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Easy Ways to Clear Up Nasal Congestion' || t.startsWith('Easy Ways to Clear Up Nasal Congestion'))).toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: h3 "True or False? Common Myths Ab"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'True or False? Common Myths About Heartburn' || t.startsWith('True or False? Common Myths About Heartburn'))).toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: header link "Skip to Content"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to Content' || t.startsWith('Skip to Content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_health_how_to_control_your_seasonal_allergies: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/health/how-to-control-your-seasonal-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - blog_health_when_to_see_a_doctor_for_allergies', () => { test('blog_health_when_to_see_a_doctor_for_allergies: title matches GT', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('when allergies need a doctor'); }); test('blog_health_when_to_see_a_doctor_for_allergies: h1 "Allergies and When Professiona"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies and When Professional Care Matters: How Clinicians Can Help' || t.startsWith('Allergies and When Professional Care Matters: How Clinicians Can Help'))).toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: h2 "Table of contents What we\'ll c"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Table of contents What we\'ll cover' || t.startsWith('Table of contents What we\'ll cover'))).toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: h2 "How do I know it\'s time to see"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How do I know it\'s time to see a doctor for allergies?' || t.startsWith('How do I know it\'s time to see a doctor for allergies?'))).toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: h2 "When your primary care doctor "', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'When your primary care doctor can help' || t.startsWith('When your primary care doctor can help'))).toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: header link "Skip to content"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const links = page.locator('header a, [role="banner"] a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Skip to content' || t.startsWith('Skip to content')), 'link text in header').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('#main-content')), 'href fragment present').toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: nav link "Urgent Care"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Urgent Care' || t.startsWith('Urgent Care')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('urgent-care')), 'href fragment present').toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: nav link "Allergies"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Allergies' || t.startsWith('Allergies')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('allergies')), 'href fragment present').toBeTruthy(); }); test('blog_health_when_to_see_a_doctor_for_allergies: nav link "Cold & Flu"', async ({ page }) => { await page.goto('/blog/health/when-to-see-a-doctor-for-allergies/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cold & Flu' || t.startsWith('Cold & Flu')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cold-flu')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - Routing', () => { test('navigate to urgent_care via "Urgent Care"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="urgent-care"]').first(); expect(await link.count(), 'nav link to urgent_care exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('urgent-care'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Urgent Care'); }); test('navigate to what_we_treat_allergies via "Allergies"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="allergies"]').first(); expect(await link.count(), 'nav link to what_we_treat_allergies exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('allergies'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Allergies'); }); test('navigate to what_we_treat_cold_flu via "Cold & Flu"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="cold-flu"]').first(); expect(await link.count(), 'nav link to what_we_treat_cold_flu exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('cold-flu'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Cold and Flu'); }); });