Datasets:
Download web/rituvia.example/tests/static/content.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 332 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/rituvia.example/tests/static/content.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/rituvia.example/tests/static/content.scripted.spec.ts
-
curl -L -o content.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/rituvia.example/tests/static/content.scripted.spec.ts
332 kB
| import { test, expect } from '@playwright/test'; | |
| test.describe('Functional - homepage', () => { | |
| test('homepage: h1 "Find your people"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Find your people' || t.startsWith('Find your people'))).toBeTruthy(); | |
| }); | |
| test('homepage: h2 "How can Rituvia help you?"', 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 can Rituvia help you?' || t.startsWith('How can Rituvia help you?'))).toBeTruthy(); | |
| }); | |
| test('homepage: h2 "Choose what fits you"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose what fits you' || t.startsWith('Choose what fits you'))).toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - clarify', () => { | |
| test('clarify: title matches GT', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('focus planner'); | |
| }); | |
| test('clarify: h1 "What our members say about Rit"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What our members say about Rituvia' || t.startsWith('What our members say about Rituvia'))).toBeTruthy(); | |
| }); | |
| test('clarify: h2 "FAQ"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'FAQ' || t.startsWith('FAQ'))).toBeTruthy(); | |
| }); | |
| test('clarify: nav link "Research"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Research' || t.startsWith('Research')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('science-behind-rituvia')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('clarify: nav link "Rituvia"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rituvia' || t.startsWith('Rituvia')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('clarify: nav link "Mindful Meals"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mindful Meals' || t.startsWith('Mindful Meals')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('shape')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('clarify: nav link "Focus Planner"', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Focus Planner' || t.startsWith('Focus Planner')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('clarify')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa', () => { | |
| test('qa: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('rituvia community'); | |
| }); | |
| test('qa: h2 "Browse the posts"', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Browse the posts' || t.startsWith('Browse the posts'))).toBeTruthy(); | |
| }); | |
| test('qa: h3 "What is the best way to build "', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What is the best way to build a lasting daily habit?' || t.startsWith('What is the best way to build a lasting daily habit?'))).toBeTruthy(); | |
| }); | |
| test('qa: h3 "How do you actually unplug and"', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you actually unplug and stay consistent with it' || t.startsWith('How do you actually unplug and stay consistent with it'))).toBeTruthy(); | |
| }); | |
| test('qa: header link "What is the best way to build "', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| 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 === 'What is the best way to build a lasting daily habit?' || t.startsWith('What is the best way to build a lasting daily habit?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa: header link "May 20, 2026 May 20, 2026"', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| 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 === 'May 20, 2026 May 20, 2026' || t.startsWith('May 20, 2026 May 20, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa: header link "How do you actually unplug and"', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| 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 === 'How do you actually unplug and stay consistent with it' || t.startsWith('How do you actually unplug and stay consistent with it')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-actually-disconnect-and-be-consistent-with-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa: header link "Yes: How Do You Keep Up With Y"', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| 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 === 'Yes: How Do You Keep Up With Your Morning Notes and Study Pl' || t.startsWith('Yes: How Do You Keep Up With Your Morning Notes and Study Pl')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('yes-how-do-you-manage-your-morning-notes-and-study-schedule')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - science_behind_rituvia', () => { | |
| test('science_behind_rituvia: title matches GT', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('rituvia app'); | |
| }); | |
| test('science_behind_rituvia: h1 "A Rituvia Story"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A Rituvia Story' || t.startsWith('A Rituvia Story'))).toBeTruthy(); | |
| }); | |
| test('science_behind_rituvia: h2 "The science of Rituvia"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The science of Rituvia' || t.startsWith('The science of Rituvia'))).toBeTruthy(); | |
| }); | |
| test('science_behind_rituvia: h2 "Our Goal"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our Goal' || t.startsWith('Our Goal'))).toBeTruthy(); | |
| }); | |
| test('science_behind_rituvia: h2 "20+ Million Members Later"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === '20+ Million Members Later' || t.startsWith('20+ Million Members Later'))).toBeTruthy(); | |
| }); | |
| test('science_behind_rituvia: nav link "For Teams"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'For Teams' || t.startsWith('For Teams')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('science_behind_rituvia: nav link "Community"', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Community' || t.startsWith('Community')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('qa')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - shape', () => { | |
| test('shape: h2 "FAQ"', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'FAQ' || t.startsWith('FAQ'))).toBeTruthy(); | |
| }); | |
| test('shape: nav link "Research"', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Research' || t.startsWith('Research')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('science-behind-rituvia')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('shape: nav link "Rituvia"', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rituvia' || t.startsWith('Rituvia')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('shape: nav link "Mindful Eating"', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mindful Eating' || t.startsWith('Mindful Eating')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('shape')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('shape: nav link "Focus & ADHD"', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Focus & ADHD' || t.startsWith('Focus & ADHD')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('clarify')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness', () => { | |
| test('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('every afternoon around three o\'clock i h'); | |
| }); | |
| test('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: h1 "Every afternoon around three o"', async ({ page }) => { | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Every afternoon around three o\'clock I hit a wall of tiredness at my desk. Tea keeps me going, but I' || t.startsWith('Every afternoon around three o\'clock I hit a wall of tiredness at my desk. Tea keeps me going, but I'))).toBeTruthy(); | |
| }); | |
| test('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: header link "Start a Great Morning"', async ({ page }) => { | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| 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 === 'Start a Great Morning' || t.startsWith('Start a Great Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet', () => { | |
| test('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can you stay focused meditating in a bus'); | |
| }); | |
| test('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: h1 "Can you stay focused meditatin"', async ({ page }) => { | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can you stay focused meditating in a busy, noisy space?' || t.startsWith('Can you stay focused meditating in a busy, noisy space?'))).toBeTruthy(); | |
| }); | |
| test('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_be_grateful', () => { | |
| test('qa_be_grateful: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('be grateful'); | |
| }); | |
| test('qa_be_grateful: h1 "Give Thanks"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Give Thanks' || t.startsWith('Give Thanks'))).toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: h2 "Who deserves your gratitude mo"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Who deserves your gratitude most today? Make sure to tell them!' || t.startsWith('Who deserves your gratitude most today? Make sure to tell them!'))).toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: h2 "Over the last year, what fille"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Over the last year, what filled you with the most gratitude?' || t.startsWith('Over the last year, what filled you with the most gratitude?'))).toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: h2 "How do you keep gratitude aliv"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep gratitude alive on days when everything feels heavy or unfair?' || t.startsWith('How do you keep gratitude alive on days when everything feels heavy or unfair?'))).toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: header link "Who deserves your gratitude mo"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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 === 'Who deserves your gratitude most today? Make sure to tell th' || t.startsWith('Who deserves your gratitude most today? Make sure to tell th')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('who-are-you-most-grateful-to-right-now-be-sure-you-tell-them')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: header link "May 27, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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 === 'May 27, 2026 May 27, 2026' || t.startsWith('May 27, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('who-are-you-most-grateful-to-right-now-be-sure-you-tell-them')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: header link "Over the last year, what fille"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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 === 'Over the last year, what filled you with the most gratitude?' || t.startsWith('Over the last year, what filled you with the most gratitude?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('in-the-past-year-what-have-you-been-most-grateful-for')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_be_grateful: header link "May 20, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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 === 'May 20, 2026 May 27, 2026' || t.startsWith('May 20, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('in-the-past-year-what-have-you-been-most-grateful-for')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_best_tips_for_meditating', () => { | |
| test('qa_best_tips_for_meditating: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what helps you meditate best?'); | |
| }); | |
| test('qa_best_tips_for_meditating: h1 "What helps you meditate?"', async ({ page }) => { | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What helps you meditate?' || t.startsWith('What helps you meditate?'))).toBeTruthy(); | |
| }); | |
| test('qa_best_tips_for_meditating: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_clean_tidy_up', () => { | |
| test('qa_clean_tidy_up: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('tidy & declutter'); | |
| }); | |
| test('qa_clean_tidy_up: h1 "Tidy & Declutter"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tidy & Declutter' || t.startsWith('Tidy & Declutter'))).toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: h2 "Is there a cleaning routine yo"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Is there a cleaning routine you follow? Certain chores on certain days, weeks, months?' || t.startsWith('Is there a cleaning routine you follow? Certain chores on certain days, weeks, months?'))).toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: h2 "Why do my counters keep collec"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Why do my counters keep collecting clutter? It piles up on its own somehow 😆' || t.startsWith('Why do my counters keep collecting clutter? It piles up on its own somehow 😆'))).toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: h2 "How do you actually remember t"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you actually remember to keep up with everything listed here day after day? I work hard to pr' || t.startsWith('How do you actually remember to keep up with everything listed here day after day? I work hard to pr'))).toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: header link "Is there a cleaning routine yo"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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 === 'Is there a cleaning routine you follow? Certain chores on ce' || t.startsWith('Is there a cleaning routine you follow? Certain chores on ce')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-have-a-cleaning-schedule-like-certain-tasks-on-certain-days-weeks-and-months')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: header link "May 13, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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 === 'May 13, 2026 May 27, 2026' || t.startsWith('May 13, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-have-a-cleaning-schedule-like-certain-tasks-on-certain-days-weeks-and-months')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: header link "Why do my counters keep collec"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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 === 'Why do my counters keep collecting clutter? It piles up on i' || t.startsWith('Why do my counters keep collecting clutter? It piles up on i')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-stop-surfaces-becoming-cluttered-it-seems-to-materialise-on-its-own-%f0%9f%98%86')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_clean_tidy_up: header link "April 1, 2026 April 29, 2026"', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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 === 'April 1, 2026 April 29, 2026' || t.startsWith('April 1, 2026 April 29, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-stop-surfaces-becoming-cluttered-it-seems-to-materialise-on-its-own-%f0%9f%98%86')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_deep_work', () => { | |
| test('qa_deep_work: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('deep work'); | |
| }); | |
| test('qa_deep_work: h2 "How do you stay in deep work a"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you stay in deep work and tune out distractions when you are out in public' || t.startsWith('How do you stay in deep work and tune out distractions when you are out in public'))).toBeTruthy(); | |
| }); | |
| test('qa_deep_work: h2 "Which deep work habits would y"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which deep work habits would you suggest for someone who feels TRULY driven, focused, and excited ab' || t.startsWith('Which deep work habits would you suggest for someone who feels TRULY driven, focused, and excited ab'))).toBeTruthy(); | |
| }); | |
| test('qa_deep_work: h2 "How do you draw yourself back "', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you draw yourself back into focus when your motivation begins to slip during a deep work sess' || t.startsWith('How do you draw yourself back into focus when your motivation begins to slip during a deep work sess'))).toBeTruthy(); | |
| }); | |
| test('qa_deep_work: header link "How do you stay in deep work a"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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 === 'How do you stay in deep work and tune out distractions when ' || t.startsWith('How do you stay in deep work and tune out distractions when ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-avoid-distractions-when-you-are-in-deep-work-in-an-outside-environment')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_deep_work: header link "April 22, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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 === 'April 22, 2026 May 27, 2026' || t.startsWith('April 22, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-avoid-distractions-when-you-are-in-deep-work-in-an-outside-environment')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_deep_work: header link "Which deep work habits would y"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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 === 'Which deep work habits would you suggest for someone who fee' || t.startsWith('Which deep work habits would you suggest for someone who fee')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-deep-work-habits-would-you-recommend-to-me-where-i-feel-really-motivated-determined-and-passionate-about-my-work-i-recently-just-started-a-new-job-thank-you-%f0%9f%98%8a%f0%9f%98%8a')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_deep_work: header link "March 4, 2026 March 3, 2026"', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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 === 'March 4, 2026 March 3, 2026' || t.startsWith('March 4, 2026 March 3, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-deep-work-habits-would-you-recommend-to-me-where-i-feel-really-motivated-determined-and-passionate-about-my-work-i-recently-just-started-a-new-job-thank-you-%f0%9f%98%8a%f0%9f%98%8a')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_disconnect_unplug', () => { | |
| test('qa_disconnect_unplug: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('unplug & disconnect from screens'); | |
| }); | |
| test('qa_disconnect_unplug: h1 "Unplug & Recharge"', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Unplug & Recharge' || t.startsWith('Unplug & Recharge'))).toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: h2 "How do you truly switch off an"', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you truly switch off and stay consistent with it?' || t.startsWith('How do you truly switch off and stay consistent with it?'))).toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: h2 "How do you resist the pull to "', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you resist the pull to keep scrolling here?' || t.startsWith('How do you resist the pull to keep scrolling here?'))).toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: h2 "What does switching off truly "', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What does switching off truly mean to you?' || t.startsWith('What does switching off truly mean to you?'))).toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: header link "How do you truly switch off an"', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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 === 'How do you truly switch off and stay consistent with it?' || t.startsWith('How do you truly switch off and stay consistent with it?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-actually-disconnect-and-be-consistent-with-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: header link "May 20, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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 === 'May 20, 2026 May 27, 2026' || t.startsWith('May 20, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-actually-disconnect-and-be-consistent-with-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: header link "How do you resist the pull to "', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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 === 'How do you resist the pull to keep scrolling here?' || t.startsWith('How do you resist the pull to keep scrolling here?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-pull-away-from-the-urge-to-scroll')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_disconnect_unplug: header link "April 22, 2026 April 29, 2026"', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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 === 'April 22, 2026 April 29, 2026' || t.startsWith('April 22, 2026 April 29, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-pull-away-from-the-urge-to-scroll')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_i_eat_before_or_after_a_workout', () => { | |
| test('qa_do_i_eat_before_or_after_a_workout: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('should i eat before or after training?'); | |
| }); | |
| test('qa_do_i_eat_before_or_after_a_workout: h1 "Should I eat before or after t"', async ({ page }) => { | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Should I eat before or after training?' || t.startsWith('Should I eat before or after training?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_i_eat_before_or_after_a_workout: header link "Fuel a Strong Morning"', async ({ page }) => { | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| 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 === 'Fuel a Strong Morning' || t.startsWith('Fuel a Strong Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much', () => { | |
| test('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('have your closest relationships gotten s'); | |
| }); | |
| test('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: h1 "Have your closest relationship"', async ({ page }) => { | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Have your closest relationships gotten stronger since you cut way back on scrolling feeds?' || t.startsWith('Have your closest relationships gotten stronger since you cut way back on scrolling feeds?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: header link "Disconnect & Unplug"', async ({ page }) => { | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| 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 === 'Disconnect & Unplug' || t.startsWith('Disconnect & Unplug')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion', () => { | |
| test('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('does eating breakfast a bit later actual'); | |
| }); | |
| test('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: h1 "Does eating breakfast a bit la"', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Does eating breakfast a bit later actually keep your energy steady all morning? I feel drained if I' || t.startsWith('Does eating breakfast a bit later actually keep your energy steady all morning? I feel drained if I'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: header link "Fuel a Better Morning"', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| 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 === 'Fuel a Better Morning' || t.startsWith('Fuel a Better Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for', () => { | |
| test('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do even the hardest routines still spark'); | |
| }); | |
| test('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: h1 "Do even the hardest routines s"', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do even the hardest routines still spark a quiet awareness you feel GRATEFUL for?' || t.startsWith('Do even the hardest routines still spark a quiet awareness you feel GRATEFUL for?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: header link "Be Thankful"', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| 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 === 'Be Thankful' || t.startsWith('Be Thankful')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for', () => { | |
| test('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('when you sit down at night to reflect, i'); | |
| }); | |
| test('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: h1 "When you sit down at night to "', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'When you sit down at night to reflect, is it simpler to name a few good moments from your day than t' || t.startsWith('When you sit down at night to reflect, is it simpler to name a few good moments from your day than t'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: header link "Be Thankful"', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| 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 === 'Be Thankful' || t.startsWith('Be Thankful')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_a_cheat_day', () => { | |
| test('qa_do_you_have_a_cheat_day: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do you take rest days?'); | |
| }); | |
| test('qa_do_you_have_a_cheat_day: h1 "Do you take rest days?"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you take rest days?' || t.startsWith('Do you take rest days?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_a_cheat_day: header link "Start a Morning Ritual"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| 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 === 'Start a Morning Ritual' || t.startsWith('Start a Morning Ritual')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before', () => { | |
| test('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are some good things you like to ge'); | |
| }); | |
| test('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: h1 "What are some good things you "', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are some good things you like to get ready the night before?' || t.startsWith('What are some good things you like to get ready the night before?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: header link "Own Your Morning Rise"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| 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 === 'Own Your Morning Rise' || t.startsWith('Own Your Morning Rise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma', () => { | |
| test('qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-good-make-in-advance-recipes-i-like-to-have-things-ready-to-go-that-i-can-just-pull-out-of-the-refrigerator-freezer-and-heat-up-but-im-burning-out-on-the-things-i-usually-ma/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('any reliable batch'); | |
| }); | |
| test('qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma: header link "Fuel Your Morning Well"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-good-make-in-advance-recipes-i-like-to-have-things-ready-to-go-that-i-can-just-pull-out-of-the-refrigerator-freezer-and-heat-up-but-im-burning-out-on-the-things-i-usually-ma/'); | |
| 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 === 'Fuel Your Morning Well' || t.startsWith('Fuel Your Morning Well')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea', () => { | |
| test('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('looking for a fast weekday breakfast ide'); | |
| }); | |
| test('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: h1 "Looking for a fast weekday bre"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Looking for a fast weekday breakfast idea? On weekends I happily cook eggs, yet on busy mornings all' || t.startsWith('Looking for a fast weekday breakfast idea? On weekends I happily cook eggs, yet on busy mornings all'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: header link "Enjoy a Great Morning"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| 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 === 'Enjoy a Great Morning' || t.startsWith('Enjoy a Great Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking', () => { | |
| test('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are your best tricks for picking up'); | |
| }); | |
| test('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: h1 "What are your best tricks for "', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are your best tricks for picking up a new language? How do you rehearse speaking?' || t.startsWith('What are your best tricks for picking up a new language? How do you rehearse speaking?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: header link "Learn & Study"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| 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 === 'Learn & Study' || t.startsWith('Learn & Study')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning', () => { | |
| test('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are your favorite ways to get break'); | |
| }); | |
| test('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: h1 "What are your favorite ways to"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are your favorite ways to get breakfast ready the night before? Just no oatmeal, please, it is' || t.startsWith('What are your favorite ways to get breakfast ready the night before? Just no oatmeal, please, it is'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: header link "Fuel a Bright Morning"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| 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 === 'Fuel a Bright Morning' || t.startsWith('Fuel a Bright Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up', () => { | |
| test('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do you keep the same breakfast daily or '); | |
| }); | |
| test('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: h1 "Do you stick to the same break"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you stick to the same breakfast daily or mix it up?' || t.startsWith('Do you stick to the same breakfast daily or mix it up?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: header link "Fuel a Better Morning"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| 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 === 'Fuel a Better Morning' || t.startsWith('Fuel a Better Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia', () => { | |
| test('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do you have trouble remembering to log y'); | |
| }); | |
| test('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: h1 "Do you have trouble rememberin"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you have trouble remembering to log your healthy breakfast in Rituvia?' || t.startsWith('Do you have trouble remembering to log your healthy breakfast in Rituvia?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: header link "Eat a Real Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| 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 === 'Eat a Real Breakfast' || t.startsWith('Eat a Real Breakfast')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_do_you_vary_what_you_eat_every_morning', () => { | |
| test('qa_do_you_vary_what_you_eat_every_morning: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do you switch up your breakfast each day'); | |
| }); | |
| test('qa_do_you_vary_what_you_eat_every_morning: h1 "Do you switch up your breakfas"', async ({ page }) => { | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you switch up your breakfast each day?' || t.startsWith('Do you switch up your breakfast each day?'))).toBeTruthy(); | |
| }); | |
| test('qa_do_you_vary_what_you_eat_every_morning: header link "Own Your Morning Meal"', async ({ page }) => { | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| 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 === 'Own Your Morning Meal' || t.startsWith('Own Your Morning Meal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great', () => { | |
| test('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can anyone share a green smoothie recipe'); | |
| }); | |
| test('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: h1 "Can anyone share a green smoot"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can anyone share a green smoothie recipe that actually tastes good?' || t.startsWith('Can anyone share a green smoothie recipe that actually tastes good?'))).toBeTruthy(); | |
| }); | |
| test('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: header link "Build a Bright Morning"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| 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 === 'Build a Bright Morning' || t.startsWith('Build a Bright Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it', () => { | |
| test('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('does anyone else wake up feeling foggy a'); | |
| }); | |
| test('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: h1 "Does anyone else wake up feeli"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Does anyone else wake up feeling foggy and drained in the mornings? And if so, what habits help you' || t.startsWith('Does anyone else wake up feeling foggy and drained in the mornings? And if so, what habits help you'))).toBeTruthy(); | |
| }); | |
| test('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: header link "Build a Morning Boost"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| 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 === 'Build a Morning Boost' || t.startsWith('Build a Morning Boost')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action', () => { | |
| test('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do i turn all this eagerness into re'); | |
| }); | |
| test('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: h1 "How do I turn all this eagerne"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I turn all this eagerness into real movement when I keep planning but never actually begin? :' || t.startsWith('How do I turn all this eagerness into real movement when I keep planning but never actually begin? :'))).toBeTruthy(); | |
| }); | |
| test('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people', () => { | |
| test('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can journaling really ease severe anxiet'); | |
| }); | |
| test('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: h1 "Can journaling really ease sev"', async ({ page }) => { | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can journaling really ease severe anxiety? I\'m wondering if it actually works for others.' || t.startsWith('Can journaling really ease severe anxiety? I\'m wondering if it actually works for others.'))).toBeTruthy(); | |
| }); | |
| test('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: header link "Add to your Journal"', async ({ page }) => { | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| 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 === 'Add to your Journal' || t.startsWith('Add to your Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_drink_tea', () => { | |
| test('qa_drink_tea: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('drink tea'); | |
| }); | |
| test('qa_drink_tea: h2 "What kinds of tea do you enjoy"', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What kinds of tea do you enjoy most each day?' || t.startsWith('What kinds of tea do you enjoy most each day?'))).toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: h2 "is loose leaf worth the extra "', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'is loose leaf worth the extra effort?' || t.startsWith('is loose leaf worth the extra effort?'))).toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: h2 "which tea is best for staying "', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'which tea is best for staying focused?' || t.startsWith('which tea is best for staying focused?'))).toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: header link "What kinds of tea do you enjoy"', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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 === 'What kinds of tea do you enjoy most each day?' || t.startsWith('What kinds of tea do you enjoy most each day?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-your-favourite-tea-blends-or-brands')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: header link "April 22, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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 === 'April 22, 2026 May 13, 2026' || t.startsWith('April 22, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-your-favourite-tea-blends-or-brands')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: header link "is loose leaf worth the extra "', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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 === 'is loose leaf worth the extra effort?' || t.startsWith('is loose leaf worth the extra effort?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('is-loose-leaf-better-than-tea-bags')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_drink_tea: header link "April 8, 2026 April 8, 2026"', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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 === 'April 8, 2026 April 8, 2026' || t.startsWith('April 8, 2026 April 8, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('is-loose-leaf-better-than-tea-bags')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_eat_a_great_breakfast', () => { | |
| test('qa_eat_a_great_breakfast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('eat a great breakfast'); | |
| }); | |
| test('qa_eat_a_great_breakfast: h1 "Eat a Great Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Eat a Great Breakfast' || t.startsWith('Eat a Great Breakfast'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: h2 "Which breakfast do you love so"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which breakfast do you love so much that you start looking forward to it the evening before?' || t.startsWith('Which breakfast do you love so much that you start looking forward to it the evening before?'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: h2 "Do you ever forget to log your"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you ever forget to log your healthy morning breakfast in the Rituvia app each day?' || t.startsWith('Do you ever forget to log your healthy morning breakfast in the Rituvia app each day?'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: h2 "Which morning meal leaves you "', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which morning meal leaves you feeling satisfied the longest?' || t.startsWith('Which morning meal leaves you feeling satisfied the longest?'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: header link "Which breakfast do you love so"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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 === 'Which breakfast do you love so much that you start looking f' || t.startsWith('Which breakfast do you love so much that you start looking f')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: header link "May 27, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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 === 'May 27, 2026 May 27, 2026' || t.startsWith('May 27, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: header link "Do you ever forget to log your"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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 === 'Do you ever forget to log your healthy morning breakfast in ' || t.startsWith('Do you ever forget to log your healthy morning breakfast in ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast: header link "Which morning meal leaves you "', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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 === 'Which morning meal leaves you feeling satisfied the longest?' || t.startsWith('Which morning meal leaves you feeling satisfied the longest?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-breakfast-keeps-you-the-fullest-longest')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_exercise', () => { | |
| test('qa_exercise: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('exercise'); | |
| }); | |
| test('qa_exercise: h2 "Which workouts target specific"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which workouts target specific areas of my body?' || t.startsWith('Which workouts target specific areas of my body?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise: h2 "How can I make cardio fun?"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I make cardio fun?' || t.startsWith('How can I make cardio fun?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise: h2 "How do you celebrate after a w"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you celebrate after a workout?' || t.startsWith('How do you celebrate after a workout?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise: header link "Which workouts target specific"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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 === 'Which workouts target specific areas of my body?' || t.startsWith('Which workouts target specific areas of my body?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('work-outs-to-build-different-parts-of-my-body')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise: header link "May 13, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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 === 'May 13, 2026 May 13, 2026' || t.startsWith('May 13, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('work-outs-to-build-different-parts-of-my-body')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise: header link "How can I make cardio fun?"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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 === 'How can I make cardio fun?' || t.startsWith('How can I make cardio fun?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-make-cardio-fun')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise: header link "How do you celebrate after a w"', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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 === 'How do you celebrate after a workout?' || t.startsWith('How do you celebrate after a workout?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-celebrate-after-working-out')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_floss', () => { | |
| test('qa_floss: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('floss'); | |
| }); | |
| test('qa_floss: h2 "How do I floss more consistent"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I floss more consistently?' || t.startsWith('How do I floss more consistently?'))).toBeTruthy(); | |
| }); | |
| test('qa_floss: h2 "Should you floss before or aft"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Should you floss before or after brushing at night?' || t.startsWith('Should you floss before or after brushing at night?'))).toBeTruthy(); | |
| }); | |
| test('qa_floss: h2 "How much floss do you actually"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How much floss do you actually use during each session?' || t.startsWith('How much floss do you actually use during each session?'))).toBeTruthy(); | |
| }); | |
| test('qa_floss: header link "How do I floss more consistent"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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 === 'How do I floss more consistently?' || t.startsWith('How do I floss more consistently?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-floss-more-then-i-do')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_floss: header link "May 13, 2026 May 20, 2026"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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 === 'May 13, 2026 May 20, 2026' || t.startsWith('May 13, 2026 May 20, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-floss-more-then-i-do')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_floss: header link "Should you floss before or aft"', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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 === 'Should you floss before or after brushing at night?' || t.startsWith('Should you floss before or after brushing at night?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-floss-your-back-molars-or-just-in-the-gaps')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_floss: header link "December 24, 2025 February 4, "', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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 === 'December 24, 2025 February 4, 2026' || t.startsWith('December 24, 2025 February 4, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-floss-your-back-molars-or-just-in-the-gaps')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_groom_yourself', () => { | |
| test('qa_groom_yourself: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('tend your skin'); | |
| }); | |
| test('qa_groom_yourself: h1 "Tend Your Skin"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tend Your Skin' || t.startsWith('Tend Your Skin'))).toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: h2 "Hi so I\'m a 24yo totally overw"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Hi so I\'m a 24yo totally overwhelmed mom and my skin has been breaking out with the worst acne and b' || t.startsWith('Hi so I\'m a 24yo totally overwhelmed mom and my skin has been breaking out with the worst acne and b'))).toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: h2 "My face is covered in tiny bum"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'My face is covered in tiny bumps and I cannot really afford the fancy products. I do look after my s' || t.startsWith('My face is covered in tiny bumps and I cannot really afford the fancy products. I do look after my s'))).toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: h2 "I would love a simple skincare"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I would love a simple skincare routine that genuinely works for a 13 year old Indian girl without pr' || t.startsWith('I would love a simple skincare routine that genuinely works for a 13 year old Indian girl without pr'))).toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: header link "Hi so I\'m a 24yo totally overw"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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 === 'Hi so I\'m a 24yo totally overwhelmed mom and my skin has bee' || t.startsWith('Hi so I\'m a 24yo totally overwhelmed mom and my skin has bee')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('hello-so-i-am-a-24yo-super-stressed-out-mom-and-ive-had-the-worst-acne-blackheads-in-my-life-lately-what-are-somethings-i-could-use-or-do-to-help-with-this')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: header link "March 18, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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 === 'March 18, 2026 May 27, 2026' || t.startsWith('March 18, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('hello-so-i-am-a-24yo-super-stressed-out-mom-and-ive-had-the-worst-acne-blackheads-in-my-life-lately-what-are-somethings-i-could-use-or-do-to-help-with-this')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: header link "I\'ve got these short curtain b"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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 === 'I\'ve got these short curtain bangs and they look awful when ' || t.startsWith('I\'ve got these short curtain bangs and they look awful when ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-little-curtain-bangs-and-they-look-really-bad-when-my-hair-is-down-because-they-just-hang-down-straight-how-can-i-style-them-without-looking-too-much-i-want-cute-hairstyles-and-such-but-those')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_groom_yourself: header link "March 11, 2026 March 11, 2026"', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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 === 'March 11, 2026 March 11, 2026' || t.startsWith('March 11, 2026 March 11, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-little-curtain-bangs-and-they-look-really-bad-when-my-hair-is-down-because-they-just-hang-down-straight-how-can-i-style-them-without-looking-too-much-i-want-cute-hairstyles-and-such-but-those')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_can_i_know_more_about_meditation_2', () => { | |
| test('qa_how_can_i_know_more_about_meditation_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('where can i learn more about meditation?'); | |
| }); | |
| test('qa_how_can_i_know_more_about_meditation_2: h1 "Where can I learn more about m"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Where can I learn more about meditation?' || t.startsWith('Where can I learn more about meditation?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_can_i_know_more_about_meditation_2: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time', () => { | |
| test('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('is there any way to fit in breakfast whe'); | |
| }); | |
| test('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: h1 "Is there any way to fit in bre"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Is there any way to fit in breakfast when I\'m up at 6:45, need to head out by 7:20, and spend 30 min' || t.startsWith('Is there any way to fit in breakfast when I\'m up at 6:45, need to head out by 7:20, and spend 30 min'))).toBeTruthy(); | |
| }); | |
| test('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: header link "Own Your Morning Meal"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| 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 === 'Own Your Morning Meal' || t.startsWith('Own Your Morning Meal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem', () => { | |
| test('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('why does my workout streak fall apart af'); | |
| }); | |
| test('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: h1 "WHY does my workout streak fal"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'WHY does my workout streak fall apart after a strong start and how do I finally stay steady with it?' || t.startsWith('WHY does my workout streak fall apart after a strong start and how do I finally stay steady with it?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: header link "Movement"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| 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 === 'Movement' || t.startsWith('Movement')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure', () => { | |
| test('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do i quiet sudden waves of self doub'); | |
| }); | |
| test('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: h1 "How do I quiet sudden waves of"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I quiet sudden waves of self doubt and unexpected flashes of insecurity?' || t.startsWith('How do I quiet sudden waves of self doubt and unexpected flashes of insecurity?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: header link "Learn & Study"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| 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 === 'Learn & Study' || t.startsWith('Learn & Study')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_can_i_study_for_10_hours_a_day_2', () => { | |
| test('qa_how_can_i_study_for_10_hours_a_day_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can i really study for 10 hours a day?'); | |
| }); | |
| test('qa_how_can_i_study_for_10_hours_a_day_2: h1 "Can I truly study 10 hours eac"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can I truly study 10 hours each day?' || t.startsWith('Can I truly study 10 hours each day?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_can_i_study_for_10_hours_a_day_2: header link "Learn & Focus"', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| 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 === 'Learn & Focus' || t.startsWith('Learn & Focus')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_disconnect_and_unplug', () => { | |
| test('qa_how_do_i_disconnect_and_unplug: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can i truly disconnect and unplug?'); | |
| }); | |
| test('qa_how_do_i_disconnect_and_unplug: h1 "How can I truly disconnect?"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I truly disconnect?' || t.startsWith('How can I truly disconnect?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_disconnect_and_unplug: header link "Unwind & Recharge"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| 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 === 'Unwind & Recharge' || t.startsWith('Unwind & Recharge')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning', () => { | |
| test('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can i make room and find the drive t'); | |
| }); | |
| test('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: h1 "How can I make room and find t"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I make room and find the drive to meditate at dawn?' || t.startsWith('How can I make room and find the drive to meditate at dawn?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group', () => { | |
| test('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can i stay accountable when i don\'t '); | |
| }); | |
| test('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: h1 "How can I stay accountable whe"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I stay accountable when I don\'t have anyone cheering me on right now?' || t.startsWith('How can I stay accountable when I don\'t have anyone cheering me on right now?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: header link "Post in My Journal"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| 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 === 'Post in My Journal' || t.startsWith('Post in My Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary', () => { | |
| test('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can i keep track of every little mom'); | |
| }); | |
| test('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: h1 "How can I keep track of every "', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I keep track of every moment in my day for my journal' || t.startsWith('How can I keep track of every moment in my day for my journal'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: header link "Add to My Journal"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| 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 === 'Add to My Journal' || t.startsWith('Add to My Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_stay_consistent_with_meditation', () => { | |
| test('qa_how_do_i_stay_consistent_with_meditation: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do i keep a daily meditation habit?'); | |
| }); | |
| test('qa_how_do_i_stay_consistent_with_meditation: h1 "How do I keep a daily meditati"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I keep a daily meditation habit?' || t.startsWith('How do I keep a daily meditation habit?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_stay_consistent_with_meditation: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_i_strengthen_the_mediation_effects', () => { | |
| test('qa_how_do_i_strengthen_the_mediation_effects: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can i deepen the benefits of my medi'); | |
| }); | |
| test('qa_how_do_i_strengthen_the_mediation_effects: h1 "How can I deepen my meditation"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I deepen my meditation\'s effects?' || t.startsWith('How can I deepen my meditation\'s effects?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_i_strengthen_the_mediation_effects: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_actually_disconnect_and_be_consistent_with_it', () => { | |
| test('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you truly unplug and actually kee'); | |
| }); | |
| test('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: h1 "How do you truly unplug and ac"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you truly unplug and actually keep the habit going' || t.startsWith('How do you truly unplug and actually keep the habit going'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: header link "Disconnect & Unplug"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| 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 === 'Disconnect & Unplug' || t.startsWith('Disconnect & Unplug')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning', () => { | |
| test('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you cut the sugary cereal habit w'); | |
| }); | |
| test('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: h1 "How do you stop reaching for s"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you stop reaching for sugary cereal when the morning rush gives you no time?' || t.startsWith('How do you stop reaching for sugary cereal when the morning rush gives you no time?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: header link "Start Your Day Strong"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| 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 === 'Start Your Day Strong' || t.startsWith('Start Your Day Strong')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_celebrate_after_working_out', () => { | |
| test('qa_how_do_you_celebrate_after_working_out: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you reward yourself after a tough'); | |
| }); | |
| test('qa_how_do_you_celebrate_after_working_out: h1 "How do you reward yourself aft"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you reward yourself after a workout?' || t.startsWith('How do you reward yourself after a workout?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_celebrate_after_working_out: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday', () => { | |
| test('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you stay consistent with meditati'); | |
| }); | |
| test('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: h1 "How do you stay consistent wit"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you stay consistent with meditation when the motivation fades? I keep starting strong for a f' || t.startsWith('How do you stay consistent with meditation when the motivation fades? I keep starting strong for a f'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin', () => { | |
| test('qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-decide-what-a-great-breakfast-is-i-like-how-open-this-is-because-it-makes-it-possible-to-interpret-it-as-youd-like-is-great-healthy-satisfyin/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what makes a morning meal truly “worth i'); | |
| }); | |
| test('qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin: header link "Enjoy a Real Morning"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-decide-what-a-great-breakfast-is-i-like-how-open-this-is-because-it-makes-it-possible-to-interpret-it-as-youd-like-is-great-healthy-satisfyin/'); | |
| 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 === 'Enjoy a Real Morning' || t.startsWith('Enjoy a Real Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_disconnect', () => { | |
| test('qa_how_do_you_disconnect: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you switch off?'); | |
| }); | |
| test('qa_how_do_you_disconnect: h1 "How do you switch off?"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you switch off?' || t.startsWith('How do you switch off?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_disconnect: header link "Switch Off & Recharge"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| 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 === 'Switch Off & Recharge' || t.startsWith('Switch Off & Recharge')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_find_time_to_read', () => { | |
| test('qa_how_do_you_find_time_to_read: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('when do you actually fit reading in?'); | |
| }); | |
| test('qa_how_do_you_find_time_to_read: h1 "When do you actually fit readi"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'When do you actually fit reading in?' || t.startsWith('When do you actually fit reading in?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_find_time_to_read: header link "Learn & Grow"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| 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 === 'Learn & Grow' || t.startsWith('Learn & Grow')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_keep_your_back_from_hurting_during_meditation', () => { | |
| test('qa_how_do_you_keep_your_back_from_hurting_during_meditation: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you keep your lower back from ach'); | |
| }); | |
| test('qa_how_do_you_keep_your_back_from_hurting_during_meditation: h1 "How do you keep your lower bac"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep your lower back from aching while meditating.' || t.startsWith('How do you keep your lower back from aching while meditating.'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_keep_your_back_from_hurting_during_meditation: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_maintain_your_dedication', () => { | |
| test('qa_how_do_you_maintain_your_dedication: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you keep your motivation alive?'); | |
| }); | |
| test('qa_how_do_you_maintain_your_dedication: h1 "How do you keep your motivatio"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep your motivation alive?' || t.startsWith('How do you keep your motivation alive?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_maintain_your_dedication: header link "Movement"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| 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 === 'Movement' || t.startsWith('Movement')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_make_cardio_fun', () => { | |
| test('qa_how_do_you_make_cardio_fun: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you keep cardio fun?'); | |
| }); | |
| test('qa_how_do_you_make_cardio_fun: h1 "How do you keep cardio fun?"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep cardio fun?' || t.startsWith('How do you keep cardio fun?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_make_cardio_fun: header link "Movement"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| 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 === 'Movement' || t.startsWith('Movement')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second', () => { | |
| test('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you resist checking your social f'); | |
| }); | |
| test('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: h1 "How do you resist checking you"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you resist checking your social feed real quick for a sec?' || t.startsWith('How do you resist checking your social feed real quick for a sec?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: header link "Unplug & Recharge"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| 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 === 'Unplug & Recharge' || t.startsWith('Unplug & Recharge')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_prepare_breakfast_fast', () => { | |
| test('qa_how_do_you_prepare_breakfast_fast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you make breakfast quickly?'); | |
| }); | |
| test('qa_how_do_you_prepare_breakfast_fast: h1 "How do you make breakfast quic"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you make breakfast quickly?' || t.startsWith('How do you make breakfast quickly?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_prepare_breakfast_fast: header link "Build a Morning Ritual"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| 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 === 'Build a Morning Ritual' || t.startsWith('Build a Morning Ritual')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_remember_what_you_study', () => { | |
| test('qa_how_do_you_remember_what_you_study: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you keep what you study in your h'); | |
| }); | |
| test('qa_how_do_you_remember_what_you_study: h1 "How do you keep what you study"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep what you study?' || t.startsWith('How do you keep what you study?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_remember_what_you_study: header link "Learn & Study"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| 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 === 'Learn & Study' || t.startsWith('Learn & Study')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_do_you_stick_to_the_meditation_habit', () => { | |
| test('qa_how_do_you_stick_to_the_meditation_habit: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you stay consistent with meditati'); | |
| }); | |
| test('qa_how_do_you_stick_to_the_meditation_habit: h1 "How do you keep your meditatio"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep your meditation habit alive?' || t.startsWith('How do you keep your meditation habit alive?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_do_you_stick_to_the_meditation_habit: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep', () => { | |
| test('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can a short gratitude note before bed re'); | |
| }); | |
| test('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: h1 "Can a short gratitude note bef"', async ({ page }) => { | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can a short gratitude note before bed really improve your sleep?' || t.startsWith('Can a short gratitude note before bed really improve your sleep?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: header link "Give Thanks"', async ({ page }) => { | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| 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 === 'Give Thanks' || t.startsWith('Give Thanks')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone', () => { | |
| test('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how can you break the habit of reaching '); | |
| }); | |
| test('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: h1 "How can you break the habit of"', async ({ page }) => { | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can you break the habit of reaching for your phone every few minutes?' || t.startsWith('How can you break the habit of reaching for your phone every few minutes?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: header link "Unplug & Wind Down"', async ({ page }) => { | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| 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 === 'Unplug & Wind Down' || t.startsWith('Unplug & Wind Down')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening', () => { | |
| test('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how tough is it really for people to ste'); | |
| }); | |
| test('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: h1 "How tough is it really for peo"', async ({ page }) => { | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How tough is it really for people to step away from their phones in the evening ?' || t.startsWith('How tough is it really for people to step away from their phones in the evening ?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: header link "Unplug & Wind Down"', async ({ page }) => { | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| 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 === 'Unplug & Wind Down' || t.startsWith('Unplug & Wind Down')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week', () => { | |
| test('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how does daily exercise really differ fr'); | |
| }); | |
| test('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: h1 "How does daily exercise really"', async ({ page }) => { | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How does daily exercise really differ from just 2 to 4 sessions a week?' || t.startsWith('How does daily exercise really differ from just 2 to 4 sessions a week?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_often_do_you_meditate_what_are_the_benefits_for_you', () => { | |
| test('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how often should you meditate, and is it'); | |
| }); | |
| test('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: h1 "How often should you meditate,"', async ({ page }) => { | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How often should you meditate, and is it really worth it?' || t.startsWith('How often should you meditate, and is it really worth it?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: header link "Practice"', async ({ page }) => { | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| 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 === 'Practice' || t.startsWith('Practice')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_to_concentrate_to_study_for_3_4_hours', () => { | |
| test('qa_how_to_concentrate_to_study_for_3_4_hours: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do i stay focused enough to study fo'); | |
| }); | |
| test('qa_how_to_concentrate_to_study_for_3_4_hours: h1 "How do I stay focused while st"', async ({ page }) => { | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I stay focused while studying for hours?' || t.startsWith('How do I stay focused while studying for hours?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_to_concentrate_to_study_for_3_4_hours: header link "Learn & Focus"', async ({ page }) => { | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| 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 === 'Learn & Focus' || t.startsWith('Learn & Focus')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away', () => { | |
| test('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you keep gratitude alive for the '); | |
| }); | |
| test('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: h1 "How do you keep gratitude aliv"', async ({ page }) => { | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you keep gratitude alive for the one you love the most when miles keep you apart' || t.startsWith('How do you keep gratitude alive for the one you love the most when miles keep you apart'))).toBeTruthy(); | |
| }); | |
| test('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: header link "Be Thankful"', async ({ page }) => { | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| 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 === 'Be Thankful' || t.startsWith('Be Thankful')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_how_you_practice_gratitude', () => { | |
| test('qa_how_you_practice_gratitude: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you practice gratitude?'); | |
| }); | |
| test('qa_how_you_practice_gratitude: h1 "What does gratitude look like?"', async ({ page }) => { | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What does gratitude look like?' || t.startsWith('What does gratitude look like?'))).toBeTruthy(); | |
| }); | |
| test('qa_how_you_practice_gratitude: header link "Be Thankful"', async ({ page }) => { | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| 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 === 'Be Thankful' || t.startsWith('Be Thankful')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more', () => { | |
| test('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('my life feels abundant yet i always crav'); | |
| }); | |
| test('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: h1 "My life feels abundant yet I a"', async ({ page }) => { | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'My life feels abundant yet I always crave more and more , how do I honor deep gratitude while still' || t.startsWith('My life feels abundant yet I always crave more and more , how do I honor deep gratitude while still'))).toBeTruthy(); | |
| }); | |
| test('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: header link "Be Grateful"', async ({ page }) => { | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| 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 === 'Be Grateful' || t.startsWith('Be Grateful')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations', () => { | |
| test('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i live with a big joint family, so junk '); | |
| }); | |
| test('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: h1 "I live with a big joint family"', async ({ page }) => { | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I live with a big joint family, so junk food is always around and I keep caving. Aside from clearing' || t.startsWith('I live with a big joint family, so junk food is always around and I keep caving. Aside from clearing'))).toBeTruthy(); | |
| }); | |
| test('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: header link "Build a Calm Morning"', async ({ page }) => { | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| 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 === 'Build a Calm Morning' || t.startsWith('Build a Calm Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling', () => { | |
| test('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i\'d rather skip eggs and meat every morn'); | |
| }); | |
| test('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: h1 "I\'d rather not eat eggs or mea"', async ({ page }) => { | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I\'d rather not eat eggs or meat every single morning because they sit a little heavy for me. Which o' || t.startsWith('I\'d rather not eat eggs or meat every single morning because they sit a little heavy for me. Which o'))).toBeTruthy(); | |
| }); | |
| test('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: header link "Own Your Morning Meal"', async ({ page }) => { | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| 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 === 'Own Your Morning Meal' || t.startsWith('Own Your Morning Meal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t', () => { | |
| test('qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-feel-my-thoughts-run-faster-than-i-can-write-them-down-sometimes-i-feel-i-cant-write-down-everything-im-feeling-at-the-moment-as-the-speed-at-which-i-write-doesnt-match-t/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('my mind races far ahead of my pen, and b'); | |
| }); | |
| test('qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t: header link "Write in My Journal"', async ({ page }) => { | |
| await page.goto('/qa/i-feel-my-thoughts-run-faster-than-i-can-write-them-down-sometimes-i-feel-i-cant-write-down-everything-im-feeling-at-the-moment-as-the-speed-at-which-i-write-doesnt-match-t/'); | |
| 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 === 'Write in My Journal' || t.startsWith('Write in My Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time', () => { | |
| test('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what can i do on the days when i have ze'); | |
| }); | |
| test('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: h1 "On the days when I have zero e"', async ({ page }) => { | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'On the days when I have zero energy to write or journal even a single line, and nothing feels worth' || t.startsWith('On the days when I have zero energy to write or journal even a single line, and nothing feels worth'))).toBeTruthy(); | |
| }); | |
| test('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: header link "Open My Journal Now"', async ({ page }) => { | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| 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 === 'Open My Journal Now' || t.startsWith('Open My Journal Now')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing', () => { | |
| test('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('my knees ache when i climb stairs but li'); | |
| }); | |
| test('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: h1 "My knees ache when I climb sta"', async ({ page }) => { | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'My knees ache when I climb stairs but light cycling has felt fine so far should I keep at it or rest' || t.startsWith('My knees ache when I climb stairs but light cycling has felt fine so far should I keep at it or rest'))).toBeTruthy(); | |
| }); | |
| test('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs', () => { | |
| test('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i love breakfast but i\'m craving fresh i'); | |
| }); | |
| test('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: h1 "I love breakfast but I\'m cravi"', async ({ page }) => { | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I love breakfast but I\'m craving fresh ideas. What are people eating for protein besides nuts or egg' || t.startsWith('I love breakfast but I\'m craving fresh ideas. What are people eating for protein besides nuts or egg'))).toBeTruthy(); | |
| }); | |
| test('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: header link "Own Your Morning Meal"', async ({ page }) => { | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| 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 === 'Own Your Morning Meal' || t.startsWith('Own Your Morning Meal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2', () => { | |
| test('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what\'s a fast make'); | |
| }); | |
| test('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: h1 "What\'s a fast make-ahead break"', async ({ page }) => { | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What\'s a fast make-ahead breakfast I can batch so busy mornings feel effortless?' || t.startsWith('What\'s a fast make-ahead breakfast I can batch so busy mornings feel effortless?'))).toBeTruthy(); | |
| }); | |
| test('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: header link "Fuel Your Mornings"', async ({ page }) => { | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| 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 === 'Fuel Your Mornings' || t.startsWith('Fuel Your Mornings')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian', () => { | |
| test('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are some quick, easy vegetarian bre'); | |
| }); | |
| test('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: h1 "What are some quick, easy vege"', async ({ page }) => { | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are some quick, easy vegetarian breakfast ideas?' || t.startsWith('What are some quick, easy vegetarian breakfast ideas?'))).toBeTruthy(); | |
| }); | |
| test('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: header link "Nourish Your Mornings"', async ({ page }) => { | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| 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 === 'Nourish Your Mornings' || t.startsWith('Nourish Your Mornings')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_need_some_ideas_of_journal_prompts', () => { | |
| test('qa_i_need_some_ideas_of_journal_prompts: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('looking for some fresh journal prompt id'); | |
| }); | |
| test('qa_i_need_some_ideas_of_journal_prompts: h1 "Looking for good journal promp"', async ({ page }) => { | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Looking for good journal prompt ideas' || t.startsWith('Looking for good journal prompt ideas'))).toBeTruthy(); | |
| }); | |
| test('qa_i_need_some_ideas_of_journal_prompts: header link "Write in My Journal"', async ({ page }) => { | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| 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 === 'Write in My Journal' || t.startsWith('Write in My Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th', () => { | |
| test('qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-share-a-room-with-my-mom-the-problem-is-that-she-snores-heavily-while-sleeping-i-cant-fall-asleep-because-of-that-even-if-i-manage-to-do-that-i-wake-up-several-times-during-the-night-th/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('my younger brother and i share one bedro'); | |
| }); | |
| test('qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th: header link "Unwind & Power Down"', async ({ page }) => { | |
| await page.goto('/qa/i-share-a-room-with-my-mom-the-problem-is-that-she-snores-heavily-while-sleeping-i-cant-fall-asleep-because-of-that-even-if-i-manage-to-do-that-i-wake-up-several-times-during-the-night-th/'); | |
| 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 === 'Unwind & Power Down' || t.startsWith('Unwind & Power Down')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('disconnect-unplug')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone', () => { | |
| test('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('my phone runs the meditation session i f'); | |
| }); | |
| test('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: h1 "My phone runs the meditation s"', async ({ page }) => { | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'My phone runs the meditation session I follow each morning. What can I do to keep the rest of the ph' || t.startsWith('My phone runs the meditation session I follow each morning. What can I do to keep the rest of the ph'))).toBeTruthy(); | |
| }); | |
| test('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good', () => { | |
| test('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i love the idea of keeping a journal, bu'); | |
| }); | |
| test('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: h1 "I love the idea of keeping a j"', async ({ page }) => { | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I love the idea of keeping a journal, but honestly my handwriting is messy and it puts me off. How d' || t.startsWith('I love the idea of keeping a journal, but honestly my handwriting is messy and it puts me off. How d'))).toBeTruthy(); | |
| }); | |
| test('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: header link "Journaling Practice"', async ({ page }) => { | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| 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 === 'Journaling Practice' || t.startsWith('Journaling Practice')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions', () => { | |
| test('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i really want to get into yoga but have '); | |
| }); | |
| test('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: h1 "I really want to get into yoga"', async ({ page }) => { | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I really want to get into yoga but have no idea how to begin. Any advice at all?' || t.startsWith('I really want to get into yoga but have no idea how to begin. Any advice at all?'))).toBeTruthy(); | |
| }); | |
| test('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: header link "Build a Morning Flow"', async ({ page }) => { | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| 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 === 'Build a Morning Flow' || t.startsWith('Build a Morning Flow')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_if_you_are_lazy_to_do_exercise_what_will_you_do', () => { | |
| test('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('when you feel too lazy to move your body'); | |
| }); | |
| test('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: h1 "When you feel too lazy to move"', async ({ page }) => { | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'When you feel too lazy to move, what helps you start?' || t.startsWith('When you feel too lazy to move, what helps you start?'))).toBeTruthy(); | |
| }); | |
| test('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: header link "Movement"', async ({ page }) => { | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| 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 === 'Movement' || t.startsWith('Movement')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make', () => { | |
| test('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('if a personal cook joined your morning r'); | |
| }); | |
| test('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: h1 "If a personal cook joined your"', async ({ page }) => { | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'If a personal cook joined your morning routine to make one perfect breakfast, what would you request' || t.startsWith('If a personal cook joined your morning routine to make one perfect breakfast, what would you request'))).toBeTruthy(); | |
| }); | |
| test('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: header link "Savor Your Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| 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 === 'Savor Your Breakfast' || t.startsWith('Savor Your Breakfast')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_im_out_of_ideas_what_could_be_great_vegan_breakfast', () => { | |
| test('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('running low on vegan breakfast ideas'); | |
| }); | |
| test('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: h1 "Running low on vegan breakfast"', async ({ page }) => { | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Running low on vegan breakfast ideas — what should I try?' || t.startsWith('Running low on vegan breakfast ideas — what should I try?'))).toBeTruthy(); | |
| }); | |
| test('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: header link "Master Your Mornings"', async ({ page }) => { | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| 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 === 'Master Your Mornings' || t.startsWith('Master Your Mornings')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_in_the_past_year_what_have_you_been_most_grateful_for', () => { | |
| test('qa_in_the_past_year_what_have_you_been_most_grateful_for: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('which daily habit are you most thankful '); | |
| }); | |
| test('qa_in_the_past_year_what_have_you_been_most_grateful_for: h1 "Which daily habit are you most"', async ({ page }) => { | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which daily habit are you most thankful you kept this year?' || t.startsWith('Which daily habit are you most thankful you kept this year?'))).toBeTruthy(); | |
| }); | |
| test('qa_in_the_past_year_what_have_you_been_most_grateful_for: header link "Give Thanks"', async ({ page }) => { | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| 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 === 'Give Thanks' || t.startsWith('Give Thanks')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself', () => { | |
| test('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('do you find it hard to express gratitude'); | |
| }); | |
| test('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: h1 "Do you find it hard to express"', async ({ page }) => { | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you find it hard to express gratitude? To others and yourself' || t.startsWith('Do you find it hard to express gratitude? To others and yourself'))).toBeTruthy(); | |
| }); | |
| test('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: header link "Give Thanks"', async ({ page }) => { | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| 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 === 'Give Thanks' || t.startsWith('Give Thanks')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_it_okay_to_have_a_great_breakfast_at_10', () => { | |
| test('qa_is_it_okay_to_have_a_great_breakfast_at_10: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('will a big breakfast at 10 still fit my '); | |
| }); | |
| test('qa_is_it_okay_to_have_a_great_breakfast_at_10: h1 "Will a big breakfast at 10 sti"', async ({ page }) => { | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Will a big breakfast at 10 still fit my routine?' || t.startsWith('Will a big breakfast at 10 still fit my routine?'))).toBeTruthy(); | |
| }); | |
| test('qa_is_it_okay_to_have_a_great_breakfast_at_10: header link "Fuel a Mindful Morning"', async ({ page }) => { | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| 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 === 'Fuel a Mindful Morning' || t.startsWith('Fuel a Mindful Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something', () => { | |
| test('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can you actually meditate with your eyes'); | |
| }); | |
| test('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: h1 "Can you actually meditate with"', async ({ page }) => { | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Can you actually meditate with your eyes open, and does it work as well? Honestly my concentration s' || t.startsWith('Can you actually meditate with your eyes open, and does it work as well? Honestly my concentration s'))).toBeTruthy(); | |
| }); | |
| test('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster', () => { | |
| test('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('is a short evening walk really enough on'); | |
| }); | |
| test('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: h1 "Is a short evening walk really"', async ({ page }) => { | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Is a short evening walk really enough on its own? or should I be adding a proper strength session on' || t.startsWith('Is a short evening walk really enough on its own? or should I be adding a proper strength session on'))).toBeTruthy(); | |
| }); | |
| test('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week', () => { | |
| test('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('is intermittent fasting once a week by s'); | |
| }); | |
| test('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: h1 "Is intermittent fasting once a"', async ({ page }) => { | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Is intermittent fasting once a week by skipping my morning meal actually okay?' || t.startsWith('Is intermittent fasting once a week by skipping my morning meal actually okay?'))).toBeTruthy(); | |
| }); | |
| test('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: header link "Fuel a Strong Morning"', async ({ page }) => { | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| 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 === 'Fuel a Strong Morning' || t.startsWith('Fuel a Strong Morning')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning', () => { | |
| test('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what\'s a good way to prep a healthy brea'); | |
| }); | |
| test('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: h1 "What\'s a good way to prep a he"', async ({ page }) => { | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What\'s a good way to prep a healthy breakfast the night before so my mornings feel calmer and less r' || t.startsWith('What\'s a good way to prep a healthy breakfast the night before so my mornings feel calmer and less r'))).toBeTruthy(); | |
| }); | |
| test('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: header link "Start Your Day Strong"', async ({ page }) => { | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| 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 === 'Start Your Day Strong' || t.startsWith('Start Your Day Strong')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_walking_actually_beneficial', () => { | |
| test('qa_is_walking_actually_beneficial: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('does a daily walk really help?'); | |
| }); | |
| test('qa_is_walking_actually_beneficial: h1 "Does a daily walk really help?"', async ({ page }) => { | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Does a daily walk really help?' || t.startsWith('Does a daily walk really help?'))).toBeTruthy(); | |
| }); | |
| test('qa_is_walking_actually_beneficial: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast', () => { | |
| test('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('is oatmeal topped with almond butter a g'); | |
| }); | |
| test('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: h1 "Is oatmeal topped with almond "', async ({ page }) => { | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Is oatmeal topped with almond butter a good breakfast?' || t.startsWith('Is oatmeal topped with almond butter a good breakfast?'))).toBeTruthy(); | |
| }); | |
| test('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: header link "Fuel Your Morning Right"', async ({ page }) => { | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| 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 === 'Fuel Your Morning Right' || t.startsWith('Fuel Your Morning Right')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem', () => { | |
| test('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('journaling is tough for me because every'); | |
| }); | |
| test('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: h1 "Journaling is tough for me bec"', async ({ page }) => { | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Journaling is tough for me because every page makes me confront all my old sorrows. How do I get pas' || t.startsWith('Journaling is tough for me because every page makes me confront all my old sorrows. How do I get pas'))).toBeTruthy(); | |
| }); | |
| test('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: header link "Keep a Daily Journal"', async ({ page }) => { | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| 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 === 'Keep a Daily Journal' || t.startsWith('Keep a Daily Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - work_for_teams', () => { | |
| test('work_for_teams: title matches GT', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('workplace well'); | |
| }); | |
| test('work_for_teams: h1 "Hit your stride"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Hit your stride' || t.startsWith('Hit your stride'))).toBeTruthy(); | |
| }); | |
| test('work_for_teams: h1 "With Rituvia, your team will t"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'With Rituvia, your team will thrive' || t.startsWith('With Rituvia, your team will thrive'))).toBeTruthy(); | |
| }); | |
| test('work_for_teams: h3 "Build lasting routines"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build lasting routines' || t.startsWith('Build lasting routines'))).toBeTruthy(); | |
| }); | |
| test('work_for_teams: h3 "Learn from a coach"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn from a coach' || t.startsWith('Learn from a coach'))).toBeTruthy(); | |
| }); | |
| test('work_for_teams: header link "For Teams"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| 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 === 'For Teams' || t.startsWith('For Teams')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('for-teams')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('work_for_teams: header link "The Science of Rituvia"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| 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 === 'The Science of Rituvia' || t.startsWith('The Science of Rituvia')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('science-behind-rituvia')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('work_for_teams: header link "Plans"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| 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 === 'Plans' || t.startsWith('Plans')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('plans')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('work_for_teams: header link "Get started"', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| 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 started' || t.startsWith('Get started')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('plans')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - work_plans', () => { | |
| test('work_plans: title matches GT', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('choose your plan'); | |
| }); | |
| test('work_plans: h1 "Rituvia Plans"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rituvia Plans' || t.startsWith('Rituvia Plans'))).toBeTruthy(); | |
| }); | |
| test('work_plans: h1 "5+ People"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === '5+ People' || t.startsWith('5+ People'))).toBeTruthy(); | |
| }); | |
| test('work_plans: h1 "What you\'ll get"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What you\'ll get' || t.startsWith('What you\'ll get'))).toBeTruthy(); | |
| }); | |
| test('work_plans: h1 "Rituvia premium access"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rituvia premium access' || t.startsWith('Rituvia premium access'))).toBeTruthy(); | |
| }); | |
| test('work_plans: header link "For Teams"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| 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 === 'For Teams' || t.startsWith('For Teams')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('for-teams')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('work_plans: header link "Science Behind Rituvia"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| 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 === 'Science Behind Rituvia' || t.startsWith('Science Behind Rituvia')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('science-behind-rituvia')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('work_plans: header link "Plans"', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| 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 === 'Plans' || t.startsWith('Plans')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('plans')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - work_request_a_demo', () => { | |
| test('work_request_a_demo: title matches GT', async ({ page }) => { | |
| await page.goto('/work/request-a-demo/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('rituvia for teams'); | |
| }); | |
| test('work_request_a_demo: h1 "The people you rely on, perfor"', async ({ page }) => { | |
| await page.goto('/work/request-a-demo/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The people you rely on, performing at their very best' || t.startsWith('The people you rely on, performing at their very best'))).toBeTruthy(); | |
| }); | |
| test('work_request_a_demo: h2 "Schedule a demo with our team"', async ({ page }) => { | |
| await page.goto('/work/request-a-demo/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Schedule a demo with our team' || t.startsWith('Schedule a demo with our team'))).toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_learn_study', () => { | |
| test('qa_learn_study: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('learn & study'); | |
| }); | |
| test('qa_learn_study: h1 "Learn & Study"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn & Study' || t.startsWith('Learn & Study'))).toBeTruthy(); | |
| }); | |
| test('qa_learn_study: h2 "Yes: How Do You Organize Your "', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Yes: How Do You Organize Your Daily Notes and Study Sessions' || t.startsWith('Yes: How Do You Organize Your Daily Notes and Study Sessions'))).toBeTruthy(); | |
| }); | |
| test('qa_learn_study: h2 "How do I understand tough conc"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I understand tough concepts faster?' || t.startsWith('How do I understand tough concepts faster?'))).toBeTruthy(); | |
| }); | |
| test('qa_learn_study: h2 "How do you build a routine tha"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you build a routine that actually sticks' || t.startsWith('How do you build a routine that actually sticks'))).toBeTruthy(); | |
| }); | |
| test('qa_learn_study: header link "Yes: How Do You Organize Your "', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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 === 'Yes: How Do You Organize Your Daily Notes and Study Sessions' || t.startsWith('Yes: How Do You Organize Your Daily Notes and Study Sessions')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('yes-how-do-you-manage-your-morning-notes-and-study-schedule')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_learn_study: header link "May 20, 2026 May 20, 2026"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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 === 'May 20, 2026 May 20, 2026' || t.startsWith('May 20, 2026 May 20, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('yes-how-do-you-manage-your-morning-notes-and-study-schedule')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_learn_study: header link "How do I understand tough conc"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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 === 'How do I understand tough concepts faster?' || t.startsWith('How do I understand tough concepts faster?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-to-understand-complex-things-faster')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_learn_study: header link "April 22, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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 === 'April 22, 2026 May 13, 2026' || t.startsWith('April 22, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-to-understand-complex-things-faster')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_meditate', () => { | |
| test('qa_meditate: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('meditate'); | |
| }); | |
| test('qa_meditate: h2 "I rely on an app on my phone t"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I rely on an app on my phone to guide my sessions. What can I do to reduce the chance that I get pul' || t.startsWith('I rely on an app on my phone to guide my sessions. What can I do to reduce the chance that I get pul'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate: h2 "Which apps or tools do you rec"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which apps or tools do you recommend for meditation?' || t.startsWith('Which apps or tools do you recommend for meditation?'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate: h2 "How do you actually meditate c"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you actually meditate consistently, like every single day? I really struggle with procrastina' || t.startsWith('How do you actually meditate consistently, like every single day? I really struggle with procrastina'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate: header link "I rely on an app on my phone t"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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 === 'I rely on an app on my phone to guide my sessions. What can ' || t.startsWith('I rely on an app on my phone to guide my sessions. What can ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate: header link "May 27, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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 === 'May 27, 2026 May 27, 2026' || t.startsWith('May 27, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate: header link "Which apps or tools do you rec"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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 === 'Which apps or tools do you recommend for meditation?' || t.startsWith('Which apps or tools do you recommend for meditation?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate: header link "May 20, 2026 May 20, 2026"', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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 === 'May 20, 2026 May 20, 2026' || t.startsWith('May 20, 2026 May 20, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_page_1946', () => { | |
| test('qa_page_1946: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('rituvia community'); | |
| }); | |
| test('qa_page_1946: h2 "Posts navigation"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Posts navigation' || t.startsWith('Posts navigation'))).toBeTruthy(); | |
| }); | |
| test('qa_page_1946: h3 "Do you sit down for a full, he"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you sit down for a full, hearty breakfast or grab something quick and light?' || t.startsWith('Do you sit down for a full, hearty breakfast or grab something quick and light?'))).toBeTruthy(); | |
| }); | |
| test('qa_page_1946: h3 "How can you get moving on days"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can you get moving on days you feel unmotivated?' || t.startsWith('How can you get moving on days you feel unmotivated?'))).toBeTruthy(); | |
| }); | |
| test('qa_page_1946: header link "Do you sit down for a full, he"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| 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 === 'Do you sit down for a full, hearty breakfast or grab somethi' || t.startsWith('Do you sit down for a full, hearty breakfast or grab somethi')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-make-time-for-a-full-big-breakfast-or-prepare-a-quick-small-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_1946: header link "October 8, 2019 September 5, 2"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| 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 === 'October 8, 2019 September 5, 2023' || t.startsWith('October 8, 2019 September 5, 2023')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-make-time-for-a-full-big-breakfast-or-prepare-a-quick-small-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_1946: header link "I have trouble winding down at"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| 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 === 'I have trouble winding down at night and often rely on a gui' || t.startsWith('I have trouble winding down at night and often rely on a gui')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-struggle-sometimes-to-get-to-sleep-and-often-use-a-sleep-guided-meditation-which-has-been-very-successful-however-with-the-disconnect-from-all-devices-and-unplug-do-you-think-i-have-to-stop-using-o')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_1946: header link "October 8, 2019 July 2, 2021"', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| 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 === 'October 8, 2019 July 2, 2021' || t.startsWith('October 8, 2019 July 2, 2021')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-struggle-sometimes-to-get-to-sleep-and-often-use-a-sleep-guided-meditation-which-has-been-very-successful-however-with-the-disconnect-from-all-devices-and-unplug-do-you-think-i-have-to-stop-using-o')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_page_2', () => { | |
| test('qa_page_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('rituvia community'); | |
| }); | |
| test('qa_page_2: h2 "More discussions"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'More discussions' || t.startsWith('More discussions'))).toBeTruthy(); | |
| }); | |
| test('qa_page_2: h3 "Which apps or tools do you rec"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which apps or tools do you recommend for meditation?' || t.startsWith('Which apps or tools do you recommend for meditation?'))).toBeTruthy(); | |
| }); | |
| test('qa_page_2: h3 "How do you actually switch off"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you actually switch off and stay consistent with it' || t.startsWith('How do you actually switch off and stay consistent with it'))).toBeTruthy(); | |
| }); | |
| test('qa_page_2: header link "Which apps or tools do you rec"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| 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 === 'Which apps or tools do you recommend for meditation?' || t.startsWith('Which apps or tools do you recommend for meditation?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_2: header link "May 20, 2026 May 20, 2026"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| 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 === 'May 20, 2026 May 20, 2026' || t.startsWith('May 20, 2026 May 20, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-some-good-apps-or-resources-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_2: header link "How do you actually switch off"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| 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 === 'How do you actually switch off and stay consistent with it' || t.startsWith('How do you actually switch off and stay consistent with it')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-actually-disconnect-and-be-consistent-with-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_page_2: header link "May 20, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| 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 === 'May 20, 2026 May 27, 2026' || t.startsWith('May 20, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-actually-disconnect-and-be-consistent-with-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_read', () => { | |
| test('qa_read: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('read'); | |
| }); | |
| test('qa_read: h2 "How do I read quickly and stil"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I read quickly and still get it?' || t.startsWith('How do I read quickly and still get it?'))).toBeTruthy(); | |
| }); | |
| test('qa_read: h2 "What\'s your preferred way to r"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What\'s your preferred way to read?' || t.startsWith('What\'s your preferred way to read?'))).toBeTruthy(); | |
| }); | |
| test('qa_read: h2 "Which reading format keeps you"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which reading format keeps you the most consistent lately, and why? Ebooks? Audiobooks? Paper?' || t.startsWith('Which reading format keeps you the most consistent lately, and why? Ebooks? Audiobooks? Paper?'))).toBeTruthy(); | |
| }); | |
| test('qa_read: header link "How do I read quickly and stil"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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 === 'How do I read quickly and still get it?' || t.startsWith('How do I read quickly and still get it?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-to-read-faster-and-still-understand')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_read: header link "May 6, 2026 May 27, 2026"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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 === 'May 6, 2026 May 27, 2026' || t.startsWith('May 6, 2026 May 27, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-to-read-faster-and-still-understand')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_read: header link "What\'s your preferred way to r"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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 === 'What\'s your preferred way to read?' || t.startsWith('What\'s your preferred way to read?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-is-your-favourite-way-to-read')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_read: header link "April 22, 2026 April 22, 2026"', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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 === 'April 22, 2026 April 22, 2026' || t.startsWith('April 22, 2026 April 22, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-is-your-favourite-way-to-read')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_sleep', () => { | |
| test('qa_sleep: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('sleep'); | |
| }); | |
| test('qa_sleep: h2 "Honestly… my phone is always w"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Honestly… my phone is always within reach and it\'s so easy to get hooked on it… so here\'s my questio' || t.startsWith('Honestly… my phone is always within reach and it\'s so easy to get hooked on it… so here\'s my questio'))).toBeTruthy(); | |
| }); | |
| test('qa_sleep: h2 "What are a few tips for windin"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are a few tips for winding down sooner and getting into bed earlier?' || t.startsWith('What are a few tips for winding down sooner and getting into bed earlier?'))).toBeTruthy(); | |
| }); | |
| test('qa_sleep: h2 "How long before bed should I s"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How long before bed should I step away from all my screens to make sure I actually sleep well?' || t.startsWith('How long before bed should I step away from all my screens to make sure I actually sleep well?'))).toBeTruthy(); | |
| }); | |
| test('qa_sleep: header link "Honestly… my phone is always w"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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 === 'Honestly… my phone is always within reach and it\'s so easy t' || t.startsWith('Honestly… my phone is always within reach and it\'s so easy t')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('honestly-phone-is-everywhere-at-all-times-and-can-make-you-addicted-to-it-so-my-question-how-can-i-turn-my-phone-off-at-night-without-craving-it-again-and-sleep-peacefully')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_sleep: header link "May 13, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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 === 'May 13, 2026 May 13, 2026' || t.startsWith('May 13, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('honestly-phone-is-everywhere-at-all-times-and-can-make-you-addicted-to-it-so-my-question-how-can-i-turn-my-phone-off-at-night-without-craving-it-again-and-sleep-peacefully')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_sleep: header link "What are a few tips for windin"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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 === 'What are a few tips for winding down sooner and getting into' || t.startsWith('What are a few tips for winding down sooner and getting into')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('whats-some-tips-to-get-relaxed-earlier-and-getting-to-bed-earlier')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_sleep: header link "May 6, 2026 May 6, 2026"', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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 === 'May 6, 2026 May 6, 2026' || t.startsWith('May 6, 2026 May 6, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('whats-some-tips-to-get-relaxed-earlier-and-getting-to-bed-earlier')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_stretch', () => { | |
| test('qa_stretch: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('stretch daily for better flexibility & h'); | |
| }); | |
| test('qa_stretch: h2 "I want to build a habit of gen"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I want to build a habit of gentle daily yoga because my lower back has been sore ever since a flare-' || t.startsWith('I want to build a habit of gentle daily yoga because my lower back has been sore ever since a flare-'))).toBeTruthy(); | |
| }); | |
| test('qa_stretch: h2 "What stretches help me work to"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What stretches help me work toward the splits?' || t.startsWith('What stretches help me work toward the splits?'))).toBeTruthy(); | |
| }); | |
| test('qa_stretch: h2 "What time of day works best fo"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What time of day works best for stretching?' || t.startsWith('What time of day works best for stretching?'))).toBeTruthy(); | |
| }); | |
| test('qa_stretch: header link "I want to build a habit of gen"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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 === 'I want to build a habit of gentle daily yoga because my lowe' || t.startsWith('I want to build a habit of gentle daily yoga because my lowe')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('id-like-to-get-into-the-habit-of-doing-daily-yoga-to-help-my-back-because-i-had-struggled-from-sciatica-what-are-the-best-stretches-to-do-for-this-and-to-tone-my-core-and-strengthen-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_stretch: header link "April 1, 2026 April 29, 2026"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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 === 'April 1, 2026 April 29, 2026' || t.startsWith('April 1, 2026 April 29, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('id-like-to-get-into-the-habit-of-doing-daily-yoga-to-help-my-back-because-i-had-struggled-from-sciatica-what-are-the-best-stretches-to-do-for-this-and-to-tone-my-core-and-strengthen-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_stretch: header link "What stretches help me work to"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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 === 'What stretches help me work toward the splits?' || t.startsWith('What stretches help me work toward the splits?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-the-best-stretches-to-get-splits')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_stretch: header link "March 11, 2026 March 11, 2026"', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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 === 'March 11, 2026 March 11, 2026' || t.startsWith('March 11, 2026 March 11, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-the-best-stretches-to-get-splits')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_think_about_my_purpose', () => { | |
| test('qa_think_about_my_purpose: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('reflect on my purpose'); | |
| }); | |
| test('qa_think_about_my_purpose: h1 "Reflect on My Purpose"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Reflect on My Purpose' || t.startsWith('Reflect on My Purpose'))).toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: h2 "Do you feel the pull to do som"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you feel the pull to do something rises from inside you or from the world around you? Are those t' || t.startsWith('Do you feel the pull to do something rises from inside you or from the world around you? Are those t'))).toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: h2 "How do I uncover my true purpo"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do I uncover my true purpose?' || t.startsWith('How do I uncover my true purpose?'))).toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: h2 "What keeps you going when your"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What keeps you going when your motivation runs low?' || t.startsWith('What keeps you going when your motivation runs low?'))).toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: header link "Do you feel the pull to do som"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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 === 'Do you feel the pull to do something rises from inside you o' || t.startsWith('Do you feel the pull to do something rises from inside you o')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-think-the-feeling-that-you-should-do-something-comes-from-within-or-without-are-those-things-your-true-purpose')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: header link "April 29, 2026 April 29, 2026"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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 === 'April 29, 2026 April 29, 2026' || t.startsWith('April 29, 2026 April 29, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-think-the-feeling-that-you-should-do-something-comes-from-within-or-without-are-those-things-your-true-purpose')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: header link "How do I uncover my true purpo"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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 === 'How do I uncover my true purpose?' || t.startsWith('How do I uncover my true purpose?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-find-my-real-purpose')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_think_about_my_purpose: header link "March 18, 2026 August 3, 2026"', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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 === 'March 18, 2026 August 3, 2026' || t.startsWith('March 18, 2026 August 3, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-can-i-find-my-real-purpose')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_are_some_good_apps_or_resources_for_meditation', () => { | |
| test('qa_what_are_some_good_apps_or_resources_for_meditation: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are some good apps or resources for'); | |
| }); | |
| test('qa_what_are_some_good_apps_or_resources_for_meditation: h1 "What are some good apps or res"', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are some good apps or resources for meditation?' || t.startsWith('What are some good apps or resources for meditation?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_are_some_good_apps_or_resources_for_meditation: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_do_you_have_for_breakfast', () => { | |
| test('qa_what_do_you_have_for_breakfast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how do you start your mornings?'); | |
| }); | |
| test('qa_what_do_you_have_for_breakfast: h1 "How do you start your mornings"', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you start your mornings?' || t.startsWith('How do you start your mornings?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_do_you_have_for_breakfast: header link "Build a Morning Ritual"', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| 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 === 'Build a Morning Ritual' || t.startsWith('Build a Morning Ritual')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_work_outs_to_build_different_parts_of_my_body', () => { | |
| test('qa_work_outs_to_build_different_parts_of_my_body: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('best exercises to build up specific body'); | |
| }); | |
| test('qa_work_outs_to_build_different_parts_of_my_body: h1 "Best exercises to build up spe"', async ({ page }) => { | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Best exercises to build up specific body parts' || t.startsWith('Best exercises to build up specific body parts'))).toBeTruthy(); | |
| }); | |
| test('qa_work_outs_to_build_different_parts_of_my_body: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_write_in_my_journal', () => { | |
| test('qa_write_in_my_journal: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('keep a daily journal'); | |
| }); | |
| test('qa_write_in_my_journal: h1 "Keep a Daily Journal"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Keep a Daily Journal' || t.startsWith('Keep a Daily Journal'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: h2 "How do i stay accountable on m"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do i stay accountable on my own? I don\'t really have a support group :(' || t.startsWith('How do i stay accountable on my own? I don\'t really have a support group :('))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: h2 "Which journaling methods work "', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which journaling methods work best for someone brand new to it?' || t.startsWith('Which journaling methods work best for someone brand new to it?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: h2 "Does keeping a journal actuall"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Does keeping a journal actually help with really bad anxiety? I wonder if it works for others.' || t.startsWith('Does keeping a journal actually help with really bad anxiety? I wonder if it works for others.'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: header link "How do i stay accountable on m"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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 === 'How do i stay accountable on my own? I don\'t really have a s' || t.startsWith('How do i stay accountable on my own? I don\'t really have a s')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-i-keep-myself-accountable-especially-when-i-lack-support-group')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: header link "May 3, 2026 May 24, 2026"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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 === 'May 3, 2026 May 24, 2026' || t.startsWith('May 3, 2026 May 24, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-i-keep-myself-accountable-especially-when-i-lack-support-group')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: header link "Which journaling methods work "', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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 === 'Which journaling methods work best for someone brand new to ' || t.startsWith('Which journaling methods work best for someone brand new to ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-the-best-journaling-methods-for-a-11-14-year-old-girl')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal: header link "March 22, 2026 April 15, 2026"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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 === 'March 22, 2026 April 15, 2026' || t.startsWith('March 22, 2026 April 15, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-are-the-best-journaling-methods-for-a-11-14-year-old-girl')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_write_my_to_do', () => { | |
| test('qa_write_my_to_do: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('write my to do'); | |
| }); | |
| test('qa_write_my_to_do: h2 "Are there any habits you\'d rec"', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Are there any habits you\'d recommend to make your daily to-do list more effective?' || t.startsWith('Are there any habits you\'d recommend to make your daily to-do list more effective?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: h2 "how do you handle it when you "', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'how do you handle it when you set a habit but just cant fit it in during the day because youre so sw' || t.startsWith('how do you handle it when you set a habit but just cant fit it in during the day because youre so sw'))).toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: h2 "What if you can\'t recall every"', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What if you can\'t recall everything you have to do while writing out your to-do, but the tasks come' || t.startsWith('What if you can\'t recall everything you have to do while writing out your to-do, but the tasks come'))).toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: header link "Does anyone else find there\'s "', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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 === 'Does anyone else find there\'s never enough time to write the' || t.startsWith('Does anyone else find there\'s never enough time to write the')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('does-it-ever-feel-like-you-dont-have-time-to-write-your-to-do-list-in-the-morning-im-a-parent-packing-two-lunch-boxes-driving-people-to-school-i-seem-to-do-better-writing-my-li')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: header link "April 15, 2026 April 15, 2026"', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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 === 'April 15, 2026 April 15, 2026' || t.startsWith('April 15, 2026 April 15, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('does-it-ever-feel-like-you-dont-have-time-to-write-your-to-do-list-in-the-morning-im-a-parent-packing-two-lunch-boxes-driving-people-to-school-i-seem-to-do-better-writing-my-li')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: header link "Are there any habits you\'d rec"', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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 === 'Are there any habits you\'d recommend to make your daily to-d' || t.startsWith('Are there any habits you\'d recommend to make your daily to-d')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-have-any-habits-you-recommend-to-make-your-to-do-list-more-effective')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_my_to_do: header link "March 11, 2026 March 25, 2026"', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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 === 'March 11, 2026 March 25, 2026' || t.startsWith('March 11, 2026 March 25, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-have-any-habits-you-recommend-to-make-your-to-do-list-more-effective')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule', () => { | |
| test('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('yes'); | |
| }); | |
| test('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: h1 "Yes: How Do You Keep Your Morn"', async ({ page }) => { | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Yes: How Do You Keep Your Morning Notes and Study Plan on Track?' || t.startsWith('Yes: How Do You Keep Your Morning Notes and Study Plan on Track?'))).toBeTruthy(); | |
| }); | |
| test('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: header link "Learn & Focus"', async ({ page }) => { | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| 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 === 'Learn & Focus' || t.startsWith('Learn & Focus')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn-study')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_yoga', () => { | |
| test('qa_yoga: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('yoga'); | |
| }); | |
| test('qa_yoga: h2 "How do you pick the Yoga pract"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you pick the Yoga practice that suits you?' || t.startsWith('How do you pick the Yoga practice that suits you?'))).toBeTruthy(); | |
| }); | |
| test('qa_yoga: h2 "Should you do yoga before your"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Should you do yoga before your workout? Or is it better to do yoga after?' || t.startsWith('Should you do yoga before your workout? Or is it better to do yoga after?'))).toBeTruthy(); | |
| }); | |
| test('qa_yoga: h2 "What are the best morning yoga"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are the best morning yoga poses?' || t.startsWith('What are the best morning yoga poses?'))).toBeTruthy(); | |
| }); | |
| test('qa_yoga: header link "How do you pick the Yoga pract"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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 === 'How do you pick the Yoga practice that suits you?' || t.startsWith('How do you pick the Yoga practice that suits you?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-choose-a-yoga-that-is-best-for-you')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_yoga: header link "July 16, 2025 February 25, 202"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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 === 'July 16, 2025 February 25, 2026' || t.startsWith('July 16, 2025 February 25, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-choose-a-yoga-that-is-best-for-you')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_yoga: header link "Should you do yoga before your"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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 === 'Should you do yoga before your workout? Or is it better to d' || t.startsWith('Should you do yoga before your workout? Or is it better to d')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-do-yoga-before-you-workout-or-do-you-do-yoga-after-your-workout')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_yoga: header link "May 28, 2025 June 4, 2025"', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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 === 'May 28, 2025 June 4, 2025' || t.startsWith('May 28, 2025 June 4, 2025')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-do-yoga-before-you-workout-or-do-you-do-yoga-after-your-workout')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_eat_a_great_breakfast_page_2', () => { | |
| test('qa_eat_a_great_breakfast_page_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('fuel up with breakfast'); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: h1 "Fuel Up With Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fuel Up With Breakfast' || t.startsWith('Fuel Up With Breakfast'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: h2 "Mornings are hectic and I don\'"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mornings are hectic and I don\'t have time for elaborate meals. Are there simple breakfast options th' || t.startsWith('Mornings are hectic and I don\'t have time for elaborate meals. Are there simple breakfast options th'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: h2 "Has anyone found really fast b"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Has anyone found really fast breakfasts that are still packed with protein?' || t.startsWith('Has anyone found really fast breakfasts that are still packed with protein?'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: h2 "I keep reaching for plain toas"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I keep reaching for plain toast every morning and it\'s getting a little dull… any other filling opti' || t.startsWith('I keep reaching for plain toast every morning and it\'s getting a little dull… any other filling opti'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: header link "Mornings are hectic and I don\'"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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 === 'Mornings are hectic and I don\'t have time for elaborate meal' || t.startsWith('Mornings are hectic and I don\'t have time for elaborate meal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-hate-having-to-do-a-lot-to-prepare-breakfast-in-the-morning-are-there-easy-options-that-are-still-beneficial')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: header link "May 13, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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 === 'May 13, 2026 May 13, 2026' || t.startsWith('May 13, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-hate-having-to-do-a-lot-to-prepare-breakfast-in-the-morning-are-there-easy-options-that-are-still-beneficial')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: header link "Has anyone found really fast b"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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 === 'Has anyone found really fast breakfasts that are still packe' || t.startsWith('Has anyone found really fast breakfasts that are still packe')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('does-anyone-have-any-super-quick-breakfasts-which-contain-protein')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_2: header link "I keep reaching for plain toas"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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 === 'I keep reaching for plain toast every morning and it\'s getti' || t.startsWith('I keep reaching for plain toast every morning and it\'s getti')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('ive-been-eating-eggs-a-lot-and-its-kinda-getting-a-little-sickening-any-other-good-breakfast-choices')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_eat_a_great_breakfast_page_482', () => { | |
| test('qa_eat_a_great_breakfast_page_482: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('eat a great breakfast'); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: h1 "Eat a Great Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Eat a Great Breakfast' || t.startsWith('Eat a Great Breakfast'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: h2 "I\'m a really slow starter in t"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I\'m a really slow starter in the mornings and often don\'t sit down to eat until almost two hours aft' || t.startsWith('I\'m a really slow starter in the mornings and often don\'t sit down to eat until almost two hours aft'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: h2 "Does intermittent fasting stil"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Does intermittent fasting still fit with this habit? In a month or two I\'d love to shift toward that' || t.startsWith('Does intermittent fasting still fit with this habit? In a month or two I\'d love to shift toward that'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: h2 "Page navigation"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Page navigation' || t.startsWith('Page navigation'))).toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: header link "I\'m a really slow starter in t"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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 === 'I\'m a really slow starter in the mornings and often don\'t si' || t.startsWith('I\'m a really slow starter in the mornings and often don\'t si')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-a-slow-pace-and-it-usually-takes-me-2-hours-to-start-breakfast-does-it-still-count-as-breakfast-or-should-i-try-to-do-it-within-an-hour-of-waking-up-what-are-your-guys-suggestions')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: header link "February 4, 2019 December 19, "', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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 === 'February 4, 2019 December 19, 2022' || t.startsWith('February 4, 2019 December 19, 2022')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-a-slow-pace-and-it-usually-takes-me-2-hours-to-start-breakfast-does-it-still-count-as-breakfast-or-should-i-try-to-do-it-within-an-hour-of-waking-up-what-are-your-guys-suggestions')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: header link "Does intermittent fasting stil"', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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 === 'Does intermittent fasting still fit with this habit? In a mo' || t.startsWith('Does intermittent fasting still fit with this habit? In a mo')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('can-intermittent-fasting-be-included-in-this-habit-id-eventually-like-to-move-to-that-habit-of-eating-in-a-month-or-so-and-i-know-that-my-first-meal-of-the-day-would-likely-be-around-12-1pm')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_eat_a_great_breakfast_page_482: header link "February 4, 2019 September 6, "', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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 === 'February 4, 2019 September 6, 2023' || t.startsWith('February 4, 2019 September 6, 2023')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('can-intermittent-fasting-be-included-in-this-habit-id-eventually-like-to-move-to-that-habit-of-eating-in-a-month-or-so-and-i-know-that-my-first-meal-of-the-day-would-likely-be-around-12-1pm')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_exercise_page_2', () => { | |
| test('qa_exercise_page_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('exercise'); | |
| }); | |
| test('qa_exercise_page_2: h1 "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Exercise' || t.startsWith('Exercise'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: h2 "What keeps you motivated to ge"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What keeps you motivated to get moving first thing each morning?' || t.startsWith('What keeps you motivated to get moving first thing each morning?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: h2 "I have long-term pain in my lo"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I have long-term pain in my lower back but I recently started jogging and the ache has not worsened,' || t.startsWith('I have long-term pain in my lower back but I recently started jogging and the ache has not worsened,'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: h2 "How do you get an exercise hab"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you get an exercise habit off the ground and actually stick with it, and which movements do y' || t.startsWith('How do you get an exercise habit off the ground and actually stick with it, and which movements do y'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: header link "What keeps you motivated to ge"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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 === 'What keeps you motivated to get moving first thing each morn' || t.startsWith('What keeps you motivated to get moving first thing each morn')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-do-you-find-motivates-you-in-the-morning-to-exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: header link "May 13, 2026 May 13, 2026"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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 === 'May 13, 2026 May 13, 2026' || t.startsWith('May 13, 2026 May 13, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('what-do-you-find-motivates-you-in-the-morning-to-exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: header link "I have long-term pain in my lo"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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 === 'I have long-term pain in my lower back but I recently starte' || t.startsWith('I have long-term pain in my lower back but I recently starte')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_2: header link "May 6, 2026 May 6, 2026"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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 === 'May 6, 2026 May 6, 2026' || t.startsWith('May 6, 2026 May 6, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_exercise_page_411', () => { | |
| test('qa_exercise_page_411: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('exercise'); | |
| }); | |
| test('qa_exercise_page_411: h1 "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Exercise' || t.startsWith('Exercise'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: h2 "How can I stay active when my "', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How can I stay active when my job already leaves me exhausted? (9am -7 pm)' || t.startsWith('How can I stay active when my job already leaves me exhausted? (9am -7 pm)'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: h2 "How do you get into running th"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you get into running through the winter when it is freezing? Is there an alternative?' || t.startsWith('How do you get into running through the winter when it is freezing? Is there an alternative?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: h2 "What are a few good options fo"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are a few good options for eight minute or fairly quick workouts?' || t.startsWith('What are a few good options for eight minute or fairly quick workouts?'))).toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: header link "How can I stay active when my "', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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 === 'How can I stay active when my job already leaves me exhauste' || t.startsWith('How can I stay active when my job already leaves me exhauste')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-i-keep-up-my-exercise-if-my-work-makes-me-tired-already-9am-7-pm')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: header link "February 4, 2019 May 6, 2020"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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 === 'February 4, 2019 May 6, 2020' || t.startsWith('February 4, 2019 May 6, 2020')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-i-keep-up-my-exercise-if-my-work-makes-me-tired-already-9am-7-pm')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: header link "How do you get into running th"', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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 === 'How do you get into running through the winter when it is fr' || t.startsWith('How do you get into running through the winter when it is fr')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-start-running-in-the-winter-when-it-is-cold-any-alternative-to-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_exercise_page_411: header link "February 4, 2019 December 19, "', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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 === 'February 4, 2019 December 19, 2022' || t.startsWith('February 4, 2019 December 19, 2022')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-start-running-in-the-winter-when-it-is-cold-any-alternative-to-it')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_meditate_page_2', () => { | |
| test('qa_meditate_page_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('meditate'); | |
| }); | |
| test('qa_meditate_page_2: h1 "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Meditate' || t.startsWith('Meditate'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: h2 "Which posture works best when "', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which posture works best when you meditate?' || t.startsWith('Which posture works best when you meditate?'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: h2 "Would you mind sharing your go"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Would you mind sharing your go-to meditation practice, whether it runs long or short?' || t.startsWith('Would you mind sharing your go-to meditation practice, whether it runs long or short?'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: h2 "How often do you sit for medit"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How often do you sit for meditation each week?' || t.startsWith('How often do you sit for meditation each week?'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: header link "Which posture works best when "', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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 === 'Which posture works best when you meditate?' || t.startsWith('Which posture works best when you meditate?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('which-poisture-is-favourable-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: header link "January 28, 2026 January 28, 2"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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 === 'January 28, 2026 January 28, 2026' || t.startsWith('January 28, 2026 January 28, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('which-poisture-is-favourable-for-meditation')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: header link "Would you mind sharing your go"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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 === 'Would you mind sharing your go-to meditation practice, wheth' || t.startsWith('Would you mind sharing your go-to meditation practice, wheth')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('can-you-please-describe-your-favorite-meditation-long-or-short-form-is-ok')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_2: header link "January 14, 2026 February 4, 2"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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 === 'January 14, 2026 February 4, 2026' || t.startsWith('January 14, 2026 February 4, 2026')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('can-you-please-describe-your-favorite-meditation-long-or-short-form-is-ok')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_meditate_page_239', () => { | |
| test('qa_meditate_page_239: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('meditate'); | |
| }); | |
| test('qa_meditate_page_239: h1 "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Meditate' || t.startsWith('Meditate'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: h2 "Post navigation"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Post navigation' || t.startsWith('Post navigation'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: h3 "Recent Questions"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Recent Questions' || t.startsWith('Recent Questions'))).toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: header link "I usually meditate in bed befo"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| 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 === 'I usually meditate in bed before I drift off or to help me f' || t.startsWith('I usually meditate in bed before I drift off or to help me f')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-usually-meditate-in-bed-before-i-go-to-sleep-or-to-help-me-fall-asleep-but-lately-i-have-been-finding-i-have-no-concentration-while-meditating-and-just-get-distracted-by-thoughts-with-little-succes')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: header link "November 3, 2019 September 8, "', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| 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 === 'November 3, 2019 September 8, 2023' || t.startsWith('November 3, 2019 September 8, 2023')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-usually-meditate-in-bed-before-i-go-to-sleep-or-to-help-me-fall-asleep-but-lately-i-have-been-finding-i-have-no-concentration-while-meditating-and-just-get-distracted-by-thoughts-with-little-succes')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: nav link "Back"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back' || t.startsWith('Back')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('238')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_meditate_page_239: nav link "Page 1"', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Page 1' || t.startsWith('Page 1')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far', () => { | |
| test('qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/should-my-daily-journal-be-more-than-just-my-productivity-and-daily-accomplishments-i-feel-like-maybe-i-should-enter-in-some-of-my-feelings-or-thoughts-but-i-havent-really-done-that-so-far/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('is it okay if my journal becomes more th'); | |
| }); | |
| test('qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far: header link "Share in My Journal"', async ({ page }) => { | |
| await page.goto('/qa/should-my-daily-journal-be-more-than-just-my-productivity-and-daily-accomplishments-i-feel-like-maybe-i-should-enter-in-some-of-my-feelings-or-thoughts-but-i-havent-really-done-that-so-far/'); | |
| 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 === 'Share in My Journal' || t.startsWith('Share in My Journal')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_are_some_good_meal_ideas_for_breakfast', () => { | |
| test('qa_what_are_some_good_meal_ideas_for_breakfast: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what are the best meals to enjoy at brea'); | |
| }); | |
| test('qa_what_are_some_good_meal_ideas_for_breakfast: h1 "What are the best meals to enj"', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What are the best meals to enjoy at breakfast?' || t.startsWith('What are the best meals to enjoy at breakfast?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_are_some_good_meal_ideas_for_breakfast: header link "Enjoy a Great Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| 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 === 'Enjoy a Great Breakfast' || t.startsWith('Enjoy a Great Breakfast')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl', () => { | |
| test('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('which journaling methods work best for a'); | |
| }); | |
| test('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: h1 "Which journaling methods work "', async ({ page }) => { | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which journaling methods work best for an 11-14 year old girl?' || t.startsWith('Which journaling methods work best for an 11-14 year old girl?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: header link "Add a Journal Entry"', async ({ page }) => { | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| 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 === 'Add a Journal Entry' || t.startsWith('Add a Journal Entry')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('write-in-my-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_breakfast_keeps_you_the_fullest_longest', () => { | |
| test('qa_what_breakfast_keeps_you_the_fullest_longest: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('which breakfast keeps hunger away the lo'); | |
| }); | |
| test('qa_what_breakfast_keeps_you_the_fullest_longest: h1 "Which breakfast keeps hunger a"', async ({ page }) => { | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which breakfast keeps hunger away the longest?' || t.startsWith('Which breakfast keeps hunger away the longest?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_breakfast_keeps_you_the_fullest_longest: header link "Master Your Mornings"', async ({ page }) => { | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| 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 === 'Master Your Mornings' || t.startsWith('Master Your Mornings')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_do_you_find_motivates_you_in_the_morning_to_exercise', () => { | |
| test('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what keeps you motivated to move your bo'); | |
| }); | |
| test('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: h1 "What keeps you motivated to mo"', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What keeps you motivated to move your body each morning?' || t.startsWith('What keeps you motivated to move your body each morning?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before', () => { | |
| test('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('which breakfast do you crave so much tha'); | |
| }); | |
| test('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: h1 "Which breakfast do you crave s"', async ({ page }) => { | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which breakfast do you crave so much that you\'re already planning it the evening before?' || t.startsWith('Which breakfast do you crave so much that you\'re already planning it the evening before?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: header link "Master Your Breakfast"', async ({ page }) => { | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| 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 === 'Master Your Breakfast' || t.startsWith('Master Your Breakfast')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('eat-a-great-breakfast')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters', () => { | |
| test('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how long should you meditate, and does m'); | |
| }); | |
| test('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: h1 "How long should you meditate, "', async ({ page }) => { | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How long should you meditate, and does morning or night truly change the results?' || t.startsWith('How long should you meditate, and does morning or night truly change the results?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like', () => { | |
| test('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how is meditating the correct way actual'); | |
| }); | |
| test('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: h1 "How is meditating the correct "', async ({ page }) => { | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How is meditating the correct way actually supposed to feel ?' || t.startsWith('How is meditating the correct way actually supposed to feel ?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine', () => { | |
| test('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('which morning workout do you enjoy most '); | |
| }); | |
| test('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: h1 "Which morning workout do you e"', async ({ page }) => { | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which morning workout do you enjoy most in your daily routine?' || t.startsWith('Which morning workout do you enjoy most in your daily routine?'))).toBeTruthy(); | |
| }); | |
| test('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: header link "Exercise"', async ({ page }) => { | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| 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 === 'Exercise' || t.startsWith('Exercise')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('exercise')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you', () => { | |
| test('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('when you sit down to meditate, where doe'); | |
| }); | |
| test('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: h1 "When you sit down to meditate,"', async ({ page }) => { | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'When you sit down to meditate, where does your attention usually go? Do you keep coming back to the' || t.startsWith('When you sit down to meditate, where does your attention usually go? Do you keep coming back to the'))).toBeTruthy(); | |
| }); | |
| test('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them', () => { | |
| test('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('what tiny habit are you most proud of bu'); | |
| }); | |
| test('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: h1 "What tiny habit are you most p"', async ({ page }) => { | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What tiny habit are you most proud of building lately? share it!' || t.startsWith('What tiny habit are you most proud of building lately? share it!'))).toBeTruthy(); | |
| }); | |
| test('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: header link "Small Wins"', async ({ page }) => { | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| 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 === 'Small Wins' || t.startsWith('Small Wins')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('be-grateful')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_why_do_we_need_to_meditate', () => { | |
| test('qa_why_do_we_need_to_meditate: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('why does meditation matter'); | |
| }); | |
| test('qa_why_do_we_need_to_meditate: h1 "Why does meditation matter"', async ({ page }) => { | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Why does meditation matter' || t.startsWith('Why does meditation matter'))).toBeTruthy(); | |
| }); | |
| test('qa_why_do_we_need_to_meditate: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic', () => { | |
| test('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('hoping you could add guided meditations '); | |
| }); | |
| test('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: h1 "Hoping you could add guided me"', async ({ page }) => { | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Hoping you could add guided meditations that focus on manifestation as a theme here' || t.startsWith('Hoping you could add guided meditations that focus on manifestation as a theme here'))).toBeTruthy(); | |
| }); | |
| test('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: header link "Meditate"', async ({ page }) => { | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| 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 === 'Meditate' || t.startsWith('Meditate')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('meditate')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_write_in_my_journal_page_2', () => { | |
| test('qa_write_in_my_journal_page_2: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('keeping a journal'); | |
| }); | |
| test('qa_write_in_my_journal_page_2: h1 "Keeping a Journal"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Keeping a Journal' || t.startsWith('Keeping a Journal'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: h2 "I have a question about those "', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I have a question about those days when you just don’t feel like writing or journaling even a single' || t.startsWith('I have a question about those days when you just don’t feel like writing or journaling even a single'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: h2 "Do you use a template when you"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you use a template when you write, or do you just freewrite?' || t.startsWith('Do you use a template when you write, or do you just freewrite?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: h2 "Have you ever turned your jour"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Have you ever turned your journal into a “Hate Book,” a spot to pour out all the negative feelings?' || t.startsWith('Have you ever turned your journal into a “Hate Book,” a spot to pour out all the negative feelings?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: header link "I have a question about those "', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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 === 'I have a question about those days when you just don’t feel ' || t.startsWith('I have a question about those days when you just don’t feel ')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: header link "December 10, 2025 December 10,"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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 === 'December 10, 2025 December 10, 2025' || t.startsWith('December 10, 2025 December 10, 2025')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: header link "Do you use a template when you"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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 === 'Do you use a template when you write, or do you just freewri' || t.startsWith('Do you use a template when you write, or do you just freewri')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-use-structure-when-you-write-or-do-you-just-write')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_2: header link "November 26, 2025 November 26,"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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 === 'November 26, 2025 November 26, 2025' || t.startsWith('November 26, 2025 November 26, 2025')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('do-you-use-structure-when-you-write-or-do-you-just-write')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - qa_write_in_my_journal_page_63', () => { | |
| test('qa_write_in_my_journal_page_63: title matches GT', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('keep a daily journal'); | |
| }); | |
| test('qa_write_in_my_journal_page_63: h1 "Keep a Daily Journal"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Keep a Daily Journal' || t.startsWith('Keep a Daily Journal'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: h2 "Do you ever worry there is too"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do you ever worry there is too much heaviness in your journal? Or that someone might stumble across' || t.startsWith('Do you ever worry there is too much heaviness in your journal? Or that someone might stumble across'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: h2 "How do you put your feelings i"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How do you put your feelings into a journal?' || t.startsWith('How do you put your feelings into a journal?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: h2 "Which pocket notebooks hold up"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Which pocket notebooks hold up best over time?' || t.startsWith('Which pocket notebooks hold up best over time?'))).toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: header link "Do you ever worry there is too"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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 === 'Do you ever worry there is too much heaviness in your journa' || t.startsWith('Do you ever worry there is too much heaviness in your journa')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('are-you-ever-afraid-theres-too-much-sadness-in-your-journal-or-that-someone-might-see-it-one-day-and-you-might-have-an-audience-to-your-writing')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: header link "September 12, 2019 December 19"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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 === 'September 12, 2019 December 19, 2022' || t.startsWith('September 12, 2019 December 19, 2022')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('are-you-ever-afraid-theres-too-much-sadness-in-your-journal-or-that-someone-might-see-it-one-day-and-you-might-have-an-audience-to-your-writing')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: header link "How do you put your feelings i"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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 === 'How do you put your feelings into a journal?' || t.startsWith('How do you put your feelings into a journal?')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-write-your-feelings-in-a-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('qa_write_in_my_journal_page_63: header link "May 13, 2019 December 19, 2022"', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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 === 'May 13, 2019 December 19, 2022' || t.startsWith('May 13, 2019 December 19, 2022')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-do-you-write-your-feelings-in-a-journal')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - Routing', () => { | |
| test('navigate to clarify via "Focus Planner"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="clarify"]').first(); | |
| expect(await link.count(), 'nav link to clarify exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('clarify'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('What our members say about Rituvia'); | |
| }); | |
| test('navigate to science_behind_rituvia via "Studies"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="science-behind-rituvia"]').first(); | |
| expect(await link.count(), 'nav link to science_behind_rituvia exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('science-behind-rituvia'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('A Rituvia Story'); | |
| }); | |
| }); | |