Datasets:
Download web/klaravo.example/tests/static/content.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 248 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/klaravo.example/tests/static/content.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/klaravo.example/tests/static/content.scripted.spec.ts
-
curl -L -o content.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/klaravo.example/tests/static/content.scripted.spec.ts
248 kB
| import { test, expect } from '@playwright/test'; | |
| test.describe('Functional - homepage', () => { | |
| test('homepage: h1 "Feeling buried by your project"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Feeling buried by your projects? It doesn\'t have to be.' || t.startsWith('Feeling buried by your projects? It doesn\'t have to be.'))).toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - about', () => { | |
| test('about: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/about/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('about: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/about/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('about: footer link "Support"', async ({ page }) => { | |
| await page.goto('/about/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('about: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/about/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - accessibility', () => { | |
| test('accessibility: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/accessibility/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('accessibility: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/accessibility/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('accessibility: footer link "Support"', async ({ page }) => { | |
| await page.goto('/accessibility/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('accessibility: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/accessibility/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - agents', () => { | |
| test('agents: h1 "Agent-ready from the start"', async ({ page }) => { | |
| await page.goto('/agents/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Agent-ready from the start' || t.startsWith('Agent-ready from the start'))).toBeTruthy(); | |
| }); | |
| test('agents: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/agents/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('agents: nav link "Proven in the wild"', async ({ page }) => { | |
| await page.goto('/agents/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Proven in the wild' || t.startsWith('Proven in the wild')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('agents: nav link "Features"', async ({ page }) => { | |
| await page.goto('/agents/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('agents: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/agents/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - apps', () => { | |
| test('apps: h1 "Klaravo is everywhere"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo is everywhere' || t.startsWith('Klaravo is everywhere'))).toBeTruthy(); | |
| }); | |
| test('apps: h2 "Mac and Windows"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mac and Windows' || t.startsWith('Mac and Windows'))).toBeTruthy(); | |
| }); | |
| test('apps: h2 "iOS and Android"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'iOS and Android' || t.startsWith('iOS and Android'))).toBeTruthy(); | |
| }); | |
| test('apps: h2 "On the web"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'On the web' || t.startsWith('On the web'))).toBeTruthy(); | |
| }); | |
| test('apps: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('apps: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('apps: footer link "Support"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('apps: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/apps/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - before_and_after', () => { | |
| test('before_and_after: h1 "Worlds apart"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Worlds apart' || t.startsWith('Worlds apart'))).toBeTruthy(); | |
| }); | |
| test('before_and_after: h2 "Before switching to Klaravo"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Before switching to Klaravo' || t.startsWith('Before switching to Klaravo'))).toBeTruthy(); | |
| }); | |
| test('before_and_after: h2 "After switching to Klaravo"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'After switching to Klaravo' || t.startsWith('After switching to Klaravo'))).toBeTruthy(); | |
| }); | |
| test('before_and_after: h4 "Did those tools work? Nope. He"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const texts = (await page.locator('h4').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Did those tools work? Nope. Here’s a taste of what our customers told us when we asked how it felt t' || t.startsWith('Did those tools work? Nope. Here’s a taste of what our customers told us when we asked how it felt t'))).toBeTruthy(); | |
| }); | |
| test('before_and_after: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('before_and_after: header link "We\'ve got another 980 quotes j"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We\'ve got another 980 quotes just like these.' || t.startsWith('We\'ve got another 980 quotes just like these.')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('before_and_after: header link "try Klaravo"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'try Klaravo' || t.startsWith('try Klaravo')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('pricing')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('before_and_after: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/before-and-after/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - books', () => { | |
| test('books: h1 "Books from our team"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Books from our team' || t.startsWith('Books from our team'))).toBeTruthy(); | |
| }); | |
| test('books: h2 "Momentum"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Momentum' || t.startsWith('Momentum'))).toBeTruthy(); | |
| }); | |
| test('books: h2 "Calm Is a Competitive Advantag"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Calm Is a Competitive Advantage at Work' || t.startsWith('Calm Is a Competitive Advantage at Work'))).toBeTruthy(); | |
| }); | |
| test('books: h2 "REBOOT"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'REBOOT' || t.startsWith('REBOOT'))).toBeTruthy(); | |
| }); | |
| test('books: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('books: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('books: nav link "Features"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('books: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/books/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - classes', () => { | |
| test('classes: h1 "Join a free live class today"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Join a free live class today' || t.startsWith('Join a free live class today'))).toBeTruthy(); | |
| }); | |
| test('classes: h2 "Intro to Klaravo"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Intro to Klaravo' || t.startsWith('Intro to Klaravo'))).toBeTruthy(); | |
| }); | |
| test('classes: h2 "Become a Pro"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Become a Pro' || t.startsWith('Become a Pro'))).toBeTruthy(); | |
| }); | |
| test('classes: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('classes: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('classes: nav link "Features"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('classes: nav link "Plans"', async ({ page }) => { | |
| await page.goto('/classes/'); | |
| const links = page.locator('nav 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 nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - cloud_exit', () => { | |
| test('cloud_exit: h1 "We moved off-cloud"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We moved off-cloud' || t.startsWith('We moved off-cloud'))).toBeTruthy(); | |
| }); | |
| test('cloud_exit: h2 "Leaving the cloud should save "', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Leaving the cloud should save us about \$10 million over five years.' || t.startsWith('Leaving the cloud should save us about \$10 million over five years.'))).toBeTruthy(); | |
| }); | |
| test('cloud_exit: h2 "The full story of our cloud ex"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The full story of our cloud exit' || t.startsWith('The full story of our cloud exit'))).toBeTruthy(); | |
| }); | |
| test('cloud_exit: h2 "Our cloud exit hit the news"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our cloud exit hit the news' || t.startsWith('Our cloud exit hit the news'))).toBeTruthy(); | |
| }); | |
| test('cloud_exit: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('cloud_exit: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('cloud_exit: footer link "Support"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('cloud_exit: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/cloud-exit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community', () => { | |
| test('community: h2 "Meet teams a lot like yours"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Meet teams a lot like yours' || t.startsWith('Meet teams a lot like yours'))).toBeTruthy(); | |
| }); | |
| test('community: h2 "Be part of the conversation"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Be part of the conversation' || t.startsWith('Be part of the conversation'))).toBeTruthy(); | |
| }); | |
| test('community: h2 "An occasional perk…?"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'An occasional perk…?' || t.startsWith('An occasional perk…?'))).toBeTruthy(); | |
| }); | |
| test('community: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('community: footer link "Support"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - help', () => { | |
| test('help: h2 "Klaravo 3 & 4"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo 3 & 4' || t.startsWith('Klaravo 3 & 4'))).toBeTruthy(); | |
| }); | |
| test('help: h2 "Klaravo 2"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo 2' || t.startsWith('Klaravo 2'))).toBeTruthy(); | |
| }); | |
| test('help: h2 "Klaravo Classic"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Classic' || t.startsWith('Klaravo Classic'))).toBeTruthy(); | |
| }); | |
| test('help: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('help: nav link "Customer stories"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customer stories' || t.startsWith('Customer stories')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('help: nav link "Features"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('help: nav link "Routes"', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Routes' || t.startsWith('Routes')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - hill_charts', () => { | |
| test('hill_charts: h1 "Summit Charts: See where proje"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Summit Charts: See where projects really stand' || t.startsWith('Summit Charts: See where projects really stand'))).toBeTruthy(); | |
| }); | |
| test('hill_charts: h2 "The idea: work is like a climb"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The idea: work is like a climb' || t.startsWith('The idea: work is like a climb'))).toBeTruthy(); | |
| }); | |
| test('hill_charts: h2 "A Summit Chart from a real pro"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A Summit Chart from a real project' || t.startsWith('A Summit Chart from a real project'))).toBeTruthy(); | |
| }); | |
| test('hill_charts: h2 "Keeping an eye on progress ove"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Keeping an eye on progress over time' || t.startsWith('Keeping an eye on progress over time'))).toBeTruthy(); | |
| }); | |
| test('hill_charts: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('hill_charts: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('hill_charts: footer link "Support"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('hill_charts: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/hill-charts/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - integrations', () => { | |
| test('integrations: h1 "Integrations for Klaravo"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Integrations for Klaravo' || t.startsWith('Integrations for Klaravo'))).toBeTruthy(); | |
| }); | |
| test('integrations: h2 "Mobile and Desktop Apps"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mobile and Desktop Apps' || t.startsWith('Mobile and Desktop Apps'))).toBeTruthy(); | |
| }); | |
| test('integrations: h2 "Time Tracking, Billing, and Bo"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Time Tracking, Billing, and Bookkeeping' || t.startsWith('Time Tracking, Billing, and Bookkeeping'))).toBeTruthy(); | |
| }); | |
| test('integrations: h2 "Insights, Dashboards & Plannin"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Insights, Dashboards & Planning' || t.startsWith('Insights, Dashboards & Planning'))).toBeTruthy(); | |
| }); | |
| test('integrations: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('integrations: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('integrations: nav link "Features"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('integrations: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/integrations/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - justletmedomyjob', () => { | |
| test('justletmedomyjob: h1 "There\'s too much noise in the "', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'There\'s too much noise in the workday.' || t.startsWith('There\'s too much noise in the workday.'))).toBeTruthy(); | |
| }); | |
| test('justletmedomyjob: h2 "LET THE WORK GET DONE."', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'LET THE WORK GET DONE.' || t.startsWith('LET THE WORK GET DONE.'))).toBeTruthy(); | |
| }); | |
| test('justletmedomyjob: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('justletmedomyjob: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('justletmedomyjob: footer link "Support"', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('justletmedomyjob: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/justletmedomyjob/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn', () => { | |
| test('learn: h1 "Klaravo Basics"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Basics' || t.startsWith('Klaravo Basics'))).toBeTruthy(); | |
| }); | |
| test('learn: h1 "Beyond the Basics"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Beyond the Basics' || t.startsWith('Beyond the Basics'))).toBeTruthy(); | |
| }); | |
| test('learn: h1 "Quick Tips"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Quick Tips' || t.startsWith('Quick Tips'))).toBeTruthy(); | |
| }); | |
| test('learn: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Results in the wild"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Results in the wild' || t.startsWith('Results in the wild')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Features"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - new', () => { | |
| test('new: h2 "Summit View"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Summit View' || t.startsWith('Summit View'))).toBeTruthy(); | |
| }); | |
| test('new: h2 "Set client access in templates"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Set client access in templates' || t.startsWith('Set client access in templates'))).toBeTruthy(); | |
| }); | |
| test('new: h2 "Do more with Shared Links"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do more with Shared Links' || t.startsWith('Do more with Shared Links'))).toBeTruthy(); | |
| }); | |
| test('new: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('new: nav link "Proven in practice"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Proven in practice' || t.startsWith('Proven in practice')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('new: nav link "Features"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('new: nav link "Tours"', async ({ page }) => { | |
| await page.goto('/new/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tours' || t.startsWith('Tours')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - overkill', () => { | |
| test('overkill: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/overkill/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('overkill: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/overkill/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('overkill: footer link "Support"', async ({ page }) => { | |
| await page.goto('/overkill/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('overkill: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/overkill/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - paths', () => { | |
| test('paths: h1 "The people’s path to Klaravo"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The people’s path to Klaravo' || t.startsWith('The people’s path to Klaravo'))).toBeTruthy(); | |
| }); | |
| test('paths: h2 "Marcus Elwood"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Marcus Elwood' || t.startsWith('Marcus Elwood'))).toBeTruthy(); | |
| }); | |
| test('paths: h2 "Nadia Oster"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Nadia Oster' || t.startsWith('Nadia Oster'))).toBeTruthy(); | |
| }); | |
| test('paths: h2 "Theo Vance"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Theo Vance' || t.startsWith('Theo Vance'))).toBeTruthy(); | |
| }); | |
| test('paths: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('paths: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('paths: nav link "Features"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('paths: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/paths/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - pricing', () => { | |
| test('pricing: h1 "Choose the plan that\'s right f"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose the plan that\'s right for you.' || t.startsWith('Choose the plan that\'s right for you.'))).toBeTruthy(); | |
| }); | |
| test('pricing: h2 "Klaravo Free"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Free' || t.startsWith('Klaravo Free'))).toBeTruthy(); | |
| }); | |
| test('pricing: h2 "Klaravo Plus"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Plus' || t.startsWith('Klaravo Plus'))).toBeTruthy(); | |
| }); | |
| test('pricing: h2 "Klaravo Pro Unlimited"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Pro Unlimited' || t.startsWith('Klaravo Pro Unlimited'))).toBeTruthy(); | |
| }); | |
| test('pricing: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('pricing: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('pricing: nav link "Features"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('pricing: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - shapeup', () => { | |
| test('shapeup: title matches GT', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('even keel'); | |
| }); | |
| test('shapeup: h2 "Orientation"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Orientation' || t.startsWith('Orientation'))).toBeTruthy(); | |
| }); | |
| test('shapeup: h2 "Part 1: Framing"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Part 1: Framing' || t.startsWith('Part 1: Framing'))).toBeTruthy(); | |
| }); | |
| test('shapeup: h2 "Part 2: Choosing"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Part 2: Choosing' || t.startsWith('Part 2: Choosing'))).toBeTruthy(); | |
| }); | |
| test('shapeup: footer link "How to Apply the Even Keel Met"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How to Apply the Even Keel Method in Klaravo' || t.startsWith('How to Apply the Even Keel Method in Klaravo')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('4.0-appendix-01')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('shapeup: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('shapeup: nav link "Even Keel"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Even Keel' || t.startsWith('Even Keel')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('shapeup')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('shapeup: nav link "Foreword by Priya Naidu"', async ({ page }) => { | |
| await page.goto('/shapeup/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Foreword by Priya Naidu' || t.startsWith('Foreword by Priya Naidu')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('0.1-foreword')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - small', () => { | |
| test('small: h1 "Small teams welcome"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Small teams welcome' || t.startsWith('Small teams welcome'))).toBeTruthy(); | |
| }); | |
| test('small: h2 "We\'re for the everyday million"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We\'re for the everyday millions' || t.startsWith('We\'re for the everyday millions'))).toBeTruthy(); | |
| }); | |
| test('small: h2 "Don\'t be big\'s pawn"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Don\'t be big\'s pawn' || t.startsWith('Don\'t be big\'s pawn'))).toBeTruthy(); | |
| }); | |
| test('small: h2 "Tools and lessons from the sma"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tools and lessons from the small-business trenches' || t.startsWith('Tools and lessons from the small-business trenches'))).toBeTruthy(); | |
| }); | |
| test('small: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('small: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('small: footer link "Support"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('small: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/small/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - underdogs', () => { | |
| test('underdogs: h1 "We\'re in the underdogs\' corner"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We\'re in the underdogs\' corner' || t.startsWith('We\'re in the underdogs\' corner'))).toBeTruthy(); | |
| }); | |
| test('underdogs: h2 "What\'s their edge?"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What\'s their edge?' || t.startsWith('What\'s their edge?'))).toBeTruthy(); | |
| }); | |
| test('underdogs: h2 "And what\'s yours?"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'And what\'s yours?' || t.startsWith('And what\'s yours?'))).toBeTruthy(); | |
| }); | |
| test('underdogs: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('underdogs: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('underdogs: footer link "Support"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('underdogs: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/underdogs/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - features_card_table', () => { | |
| test('features_card_table: h1 "Tired of fighting your tools? "', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tired of fighting your tools? Work shouldn\'t feel this hard.' || t.startsWith('Tired of fighting your tools? Work shouldn\'t feel this hard.'))).toBeTruthy(); | |
| }); | |
| test('features_card_table: h2 "Let\'s take a quick tour."', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Let\'s take a quick tour.' || t.startsWith('Let\'s take a quick tour.'))).toBeTruthy(); | |
| }); | |
| test('features_card_table: h2 "You wouldn\'t be here if the wa"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'You wouldn\'t be here if the way you\'ve been working still worked. It\'s time for Klaravo.' || t.startsWith('You wouldn\'t be here if the way you\'ve been working still worked. It\'s time for Klaravo.'))).toBeTruthy(); | |
| }); | |
| test('features_card_table: h3 "Ten seconds after you sign up,"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ten seconds after you sign up, clarity arrives.' || t.startsWith('Ten seconds after you sign up, clarity arrives.'))).toBeTruthy(); | |
| }); | |
| test('features_card_table: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('features_card_table: nav link "Stories from teams"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stories from teams' || t.startsWith('Stories from 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('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('features_card_table: nav link "Features"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('features_card_table: nav link "Paths"', async ({ page }) => { | |
| await page.goto('/features/card-table/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Paths' || t.startsWith('Paths')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - guides_group_chat_problems', () => { | |
| test('guides_group_chat_problems: h2 "Group chat feels like sitting "', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Group chat feels like sitting in an all-day meeting, with random attendees, and no agenda' || t.startsWith('Group chat feels like sitting in an all-day meeting, with random attendees, and no agenda'))).toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: h2 "The upsides of chat"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The upsides of chat' || t.startsWith('The upsides of chat'))).toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: h2 "The downsides of chat"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The downsides of chat' || t.startsWith('The downsides of chat'))).toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: footer link "Support"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('guides_group_chat_problems: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/guides/group-chat-problems/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - guides_how_we_communicate', () => { | |
| test('guides_how_we_communicate: h1 "The Klaravo Guide to Internal "', async ({ page }) => { | |
| await page.goto('/guides/how-we-communicate/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The Klaravo Guide to Internal Communication' || t.startsWith('The Klaravo Guide to Internal Communication'))).toBeTruthy(); | |
| }); | |
| test('guides_how_we_communicate: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/guides/how-we-communicate/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('guides_how_we_communicate: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/guides/how-we-communicate/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('guides_how_we_communicate: footer link "Support"', async ({ page }) => { | |
| await page.goto('/guides/how-we-communicate/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('guides_how_we_communicate: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/guides/how-we-communicate/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - guides_how_we_make_decisions', () => { | |
| test('guides_how_we_make_decisions: h2 "Guiding principles and how we "', async ({ page }) => { | |
| await page.goto('/guides/how-we-make-decisions/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Guiding principles and how we think' || t.startsWith('Guiding principles and how we think'))).toBeTruthy(); | |
| }); | |
| test('guides_how_we_make_decisions: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/guides/how-we-make-decisions/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('guides_how_we_make_decisions: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/guides/how-we-make-decisions/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('guides_how_we_make_decisions: footer link "Support"', async ({ page }) => { | |
| await page.goto('/guides/how-we-make-decisions/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('guides_how_we_make_decisions: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/guides/how-we-make-decisions/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - guides_seven_shipping_principles', () => { | |
| test('guides_seven_shipping_principles: h1 "Seven Principles We Ship By"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Seven Principles We Ship By' || t.startsWith('Seven Principles We Ship By'))).toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: h2 "We ship only solid work"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We ship only solid work' || t.startsWith('We ship only solid work'))).toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: h2 "We ship once we\'re confident"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We ship once we\'re confident' || t.startsWith('We ship once we\'re confident'))).toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: h2 "We ship only when the work is "', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We ship only when the work is done' || t.startsWith('We ship only when the work is done'))).toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: footer link "Support"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('guides_seven_shipping_principles: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/guides/seven-shipping-principles/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - guides_why_we_choose_profit', () => { | |
| test('guides_why_we_choose_profit: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/guides/why-we-choose-profit/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('guides_why_we_choose_profit: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/guides/why-we-choose-profit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('guides_why_we_choose_profit: footer link "Support"', async ({ page }) => { | |
| await page.goto('/guides/why-we-choose-profit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('guides_why_we_choose_profit: footer link "Policies"', async ({ page }) => { | |
| await page.goto('/guides/why-we-choose-profit/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Policies' || t.startsWith('Policies')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('policies')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_benefits_and_perks', () => { | |
| test('handbook_benefits_and_perks: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('perks & benefits'); | |
| }); | |
| test('handbook_benefits_and_perks: h1 "Perks & Benefits"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Perks & Benefits' || t.startsWith('Perks & Benefits'))).toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: h2 "Health Coverage"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Health Coverage' || t.startsWith('Health Coverage'))).toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: h2 "Your Retirement"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your Retirement' || t.startsWith('Your Retirement'))).toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: nav link "How We Build →"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How We Build →' || t.startsWith('How We Build →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('how-we-work')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_benefits_and_perks: nav link "Finding Your Feet"', async ({ page }) => { | |
| await page.goto('/handbook/benefits-and-perks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Finding Your Feet' || t.startsWith('Finding Your Feet')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_code_of_conduct', () => { | |
| test('handbook_code_of_conduct: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('code of conduct'); | |
| }); | |
| test('handbook_code_of_conduct: h1 "Code of Conduct"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Code of Conduct' || t.startsWith('Code of Conduct'))).toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: h2 "Politics at work"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Politics at work' || t.startsWith('Politics at work'))).toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: h2 "Some Definitions & Resources"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Some Definitions & Resources' || t.startsWith('Some Definitions & Resources'))).toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: nav link "State Leave Provisions →"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'State Leave Provisions →' || t.startsWith('State Leave Provisions →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('state-fmla')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_code_of_conduct: nav link "Getting Started"', async ({ page }) => { | |
| await page.goto('/handbook/code-of-conduct/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Started' || t.startsWith('Getting Started')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_getting_started', () => { | |
| test('handbook_getting_started: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('getting oriented'); | |
| }); | |
| test('handbook_getting_started: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: h2 "Your First Days Here"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Days Here' || t.startsWith('Your First Days Here'))).toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: h2 "Welcome"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Welcome' || t.startsWith('Welcome'))).toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: nav link "Perks & Wellbeing →"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Perks & Wellbeing →' || t.startsWith('Perks & Wellbeing →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('benefits-and-perks')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_getting_started: nav link "Getting Oriented"', async ({ page }) => { | |
| await page.goto('/handbook/getting-started/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Oriented' || t.startsWith('Getting Oriented')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_how_we_work', () => { | |
| test('handbook_how_we_work: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how we run'); | |
| }); | |
| test('handbook_how_we_work: h1 "How We Run"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How We Run' || t.startsWith('How We Run'))).toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: h2 "Anywhere"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Anywhere' || t.startsWith('Anywhere'))).toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: h2 "Cycles"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Cycles' || t.startsWith('Cycles'))).toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: nav link "Building a Career →"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Building a Career →' || t.startsWith('Building a Career →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('making-a-career')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_how_we_work: nav link "Your First Days"', async ({ page }) => { | |
| await page.goto('/handbook/how-we-work/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Days' || t.startsWith('Your First Days')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_making_a_career', () => { | |
| test('handbook_making_a_career: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('growing a career'); | |
| }); | |
| test('handbook_making_a_career: h1 "Growing a Career"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Growing a Career' || t.startsWith('Growing a Career'))).toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: h2 "Your Opening Year"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your Opening Year' || t.startsWith('Your Opening Year'))).toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: h2 "Craft & Titles"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Craft & Titles' || t.startsWith('Craft & Titles'))).toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: nav link "Our Routines →"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our Routines →' || t.startsWith('Our Routines →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('our-rituals')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_making_a_career: nav link "Your First Days"', async ({ page }) => { | |
| await page.goto('/handbook/making-a-career/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Days' || t.startsWith('Your First Days')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_managing_work_devices', () => { | |
| test('handbook_managing_work_devices: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('handling work devices'); | |
| }); | |
| test('handbook_managing_work_devices: h1 "Handling Work Devices"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Handling Work Devices' || t.startsWith('Handling Work Devices'))).toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: h2 "Handling code and secrets"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Handling code and secrets' || t.startsWith('Handling code and secrets'))).toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: h2 "Mobile devices and Panorama"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Mobile devices and Panorama' || t.startsWith('Mobile devices and Panorama'))).toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: nav link "Our Internal Tooling →"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our Internal Tooling →' || t.startsWith('Our Internal Tooling →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('our-internal-systems')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_managing_work_devices: nav link "Getting Settled"', async ({ page }) => { | |
| await page.goto('/handbook/managing-work-devices/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Settled' || t.startsWith('Getting Settled')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_moonlighting', () => { | |
| test('handbook_moonlighting: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('a few words on side work'); | |
| }); | |
| test('handbook_moonlighting: h1 "A Few Words on Side Work"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A Few Words on Side Work' || t.startsWith('A Few Words on Side Work'))).toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: h2 "Not OK"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Not OK' || t.startsWith('Not OK'))).toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: h2 "As a rule"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'As a rule' || t.startsWith('As a rule'))).toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: nav link "Working Together →"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Working Together →' || t.startsWith('Working Together →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('code-of-conduct')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_moonlighting: nav link "Getting Settled"', async ({ page }) => { | |
| await page.goto('/handbook/moonlighting/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Settled' || t.startsWith('Getting Settled')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_our_internal_systems', () => { | |
| test('handbook_our_internal_systems: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('our internal systems'); | |
| }); | |
| test('handbook_our_internal_systems: h1 "Our Internal Systems"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our Internal Systems' || t.startsWith('Our Internal Systems'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: h2 "Ledgerly"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ledgerly' || t.startsWith('Ledgerly'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: h2 "Cinder"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Cinder' || t.startsWith('Cinder'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: nav link "A Word On Side Projects →"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A Word On Side Projects →' || t.startsWith('A Word On Side Projects →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('moonlighting')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_our_internal_systems: nav link "Getting Started"', async ({ page }) => { | |
| await page.goto('/handbook/our-internal-systems/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Started' || t.startsWith('Getting Started')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_our_rituals', () => { | |
| test('handbook_our_rituals: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('our rhythms'); | |
| }); | |
| test('handbook_our_rituals: h1 "Our Rhythms"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our Rhythms' || t.startsWith('Our Rhythms'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: h2 "Retreats"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Retreats' || t.startsWith('Retreats'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: h2 "All Hands"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'All Hands' || t.startsWith('All Hands'))).toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: nav link "Handling Your Devices →"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Handling Your Devices →' || t.startsWith('Handling Your Devices →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('managing-work-devices')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_our_rituals: nav link "Getting Oriented"', async ({ page }) => { | |
| await page.goto('/handbook/our-rituals/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Oriented' || t.startsWith('Getting Oriented')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_severance', () => { | |
| test('handbook_severance: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('severance overview'); | |
| }); | |
| test('handbook_severance: h1 "Severance Overview"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Severance Overview' || t.startsWith('Severance Overview'))).toBeTruthy(); | |
| }); | |
| test('handbook_severance: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_severance: h2 "Preface"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Preface' || t.startsWith('Preface'))).toBeTruthy(); | |
| }); | |
| test('handbook_severance: h3 "Your First Days"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Days' || t.startsWith('Your First Days'))).toBeTruthy(); | |
| }); | |
| test('handbook_severance: nav link "Design Team Titles →"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Design Team Titles →' || t.startsWith('Design Team Titles →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('titles-for-designers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_severance: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_severance: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_severance: nav link "Your First Days"', async ({ page }) => { | |
| await page.goto('/handbook/severance/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Days' || t.startsWith('Your First Days')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_state_fmla', () => { | |
| test('handbook_state_fmla: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('leave benefits by state'); | |
| }); | |
| test('handbook_state_fmla: h1 "Leave Benefits by State"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Leave Benefits by State' || t.startsWith('Leave Benefits by State'))).toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: h2 "Medical and Family Leave in Ca"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Medical and Family Leave in California' || t.startsWith('Medical and Family Leave in California'))).toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: h2 "Medical and Family Leave in Co"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Medical and Family Leave in Colorado' || t.startsWith('Medical and Family Leave in Colorado'))).toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: nav link "Severance Packages →"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Severance Packages →' || t.startsWith('Severance Packages →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('severance')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_state_fmla: nav link "Your First Weeks"', async ({ page }) => { | |
| await page.goto('/handbook/state-fmla/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Weeks' || t.startsWith('Your First Weeks')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_titles_for_designers', () => { | |
| test('handbook_titles_for_designers: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('design career levels'); | |
| }); | |
| test('handbook_titles_for_designers: h1 "Design Career Levels"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Design Career Levels' || t.startsWith('Design Career Levels'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: h2 "Designer (L2)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Designer (L2)' || t.startsWith('Designer (L2)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: h2 "Senior Designer (L3)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Senior Designer (L3)' || t.startsWith('Senior Designer (L3)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: nav link "Roles for Ops →"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Roles for Ops →' || t.startsWith('Roles for Ops →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('titles-for-ops')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_designers: nav link "Getting Oriented"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-designers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Oriented' || t.startsWith('Getting Oriented')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_titles_for_ops', () => { | |
| test('handbook_titles_for_ops: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('ops team titles'); | |
| }); | |
| test('handbook_titles_for_ops: h1 "Ops Team Titles"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ops Team Titles' || t.startsWith('Ops Team Titles'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: h2 "Entry SRE (L1)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Entry SRE (L1)' || t.startsWith('Entry SRE (L1)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: h2 "SRE (L2)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'SRE (L2)' || t.startsWith('SRE (L2)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: nav link "Titles for Programmers →"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Titles for Programmers →' || t.startsWith('Titles for Programmers →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('titles-for-programmers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_ops: nav link "Getting Started"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-ops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Started' || t.startsWith('Getting Started')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_titles_for_programmers', () => { | |
| test('handbook_titles_for_programmers: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('programmer job levels'); | |
| }); | |
| test('handbook_titles_for_programmers: h1 "Programmer Job Levels"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Programmer Job Levels' || t.startsWith('Programmer Job Levels'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: h2 "Managing the Programmers"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Managing the Programmers' || t.startsWith('Managing the Programmers'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: h2 "Junior Programmer (L1)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Junior Programmer (L1)' || t.startsWith('Junior Programmer (L1)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: nav link "Titles for QA →"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Titles for QA →' || t.startsWith('Titles for QA →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('titles-for-qa')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_programmers: nav link "Getting Started"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-programmers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Started' || t.startsWith('Getting Started')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_titles_for_qa', () => { | |
| test('handbook_titles_for_qa: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('qa job titles'); | |
| }); | |
| test('handbook_titles_for_qa: h1 "QA Job Titles"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'QA Job Titles' || t.startsWith('QA Job Titles'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: h2 "Senior QA Analyst (L3)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Senior QA Analyst (L3)' || t.startsWith('Senior QA Analyst (L3)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: h2 "Lead QA Analyst (L4)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Lead QA Analyst (L4)' || t.startsWith('Lead QA Analyst (L4)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: nav link "Roles in Support →"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Roles in Support →' || t.startsWith('Roles in Support →')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('titles-for-support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_qa: nav link "Getting Oriented"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-qa/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Getting Oriented' || t.startsWith('Getting Oriented')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - handbook_titles_for_support', () => { | |
| test('handbook_titles_for_support: title matches GT', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('levels for the support team'); | |
| }); | |
| test('handbook_titles_for_support: h1 "Support Team Titles"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support Team Titles' || t.startsWith('Support Team Titles'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: h1 "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: h2 "Associate Support Specialist ("', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Associate Support Specialist (L1)' || t.startsWith('Associate Support Specialist (L1)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: h2 "Support Specialist (L2)"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support Specialist (L2)' || t.startsWith('Support Specialist (L2)'))).toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: nav link "Back to Klaravo.com"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Back to Klaravo.com' || t.startsWith('Back to Klaravo.com')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: nav link "Klaravo Employee Handbook"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Employee Handbook' || t.startsWith('Klaravo Employee Handbook')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('handbook')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: nav link "Your First Week"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your First Week' || t.startsWith('Your First Week')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('getting-started')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('handbook_titles_for_support: nav link "Health & Benefits"', async ({ page }) => { | |
| await page.goto('/handbook/titles-for-support/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Health & Benefits' || t.startsWith('Health & Benefits')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('benefits-and-perks')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_06_23', () => { | |
| test('newsletter_2023_06_23: h1 "What’s new at Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What’s new at Klaravo' || t.startsWith('What’s new at Klaravo'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: h2 "New features we added"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'New features we added' || t.startsWith('New features we added'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: h2 "Ideas we’ve shared"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas we’ve shared' || t.startsWith('Ideas we’ve shared'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: h2 "What we’re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we’re excited about' || t.startsWith('What we’re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_06_23: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-06-23/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_07_06', () => { | |
| test('newsletter_2023_07_06: h1 "Rewinding time, going self-hos"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rewinding time, going self-hosted, and a handy tool we made' || t.startsWith('Rewinding time, going self-hosted, and a handy tool we made'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: h2 "Features we\'ve shipped"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features we\'ve shipped' || t.startsWith('Features we\'ve shipped'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: h2 "Thoughts we\'ve shared"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts we\'ve shared' || t.startsWith('Thoughts we\'ve shared'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: h2 "Things we\'re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'re excited about' || t.startsWith('Things we\'re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_06: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-06/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_07_17', () => { | |
| test('newsletter_2023_07_17: h1 "Reply to everyone, don\'t mista"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Reply to everyone, don\'t mistake stalking for selling, and knowing when to try AI' || t.startsWith('Reply to everyone, don\'t mistake stalking for selling, and knowing when to try AI'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: h2 "Features we\'ve shipped"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features we\'ve shipped' || t.startsWith('Features we\'ve shipped'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: h2 "Thoughts we\'ve posted"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts we\'ve posted' || t.startsWith('Thoughts we\'ve posted'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: h2 "What we\'re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we\'re excited about' || t.startsWith('What we\'re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_07_17: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-07-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_08_03', () => { | |
| test('newsletter_2023_08_03: h1 "Why do educators love working "', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Why do educators love working in Klaravo?' || t.startsWith('Why do educators love working in Klaravo?'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: h2 "Features we\'ve shipped"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features we\'ve shipped' || t.startsWith('Features we\'ve shipped'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: h2 "Thoughts we\'ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts we\'ve written' || t.startsWith('Thoughts we\'ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: h2 "Things that have us excited"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things that have us excited' || t.startsWith('Things that have us excited'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_03: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-03/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_08_17', () => { | |
| test('newsletter_2023_08_17: h1 "What did we build in the last "', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What did we build in the last six weeks?' || t.startsWith('What did we build in the last six weeks?'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: h2 "Things we\'ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'ve written' || t.startsWith('Things we\'ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: h2 "Things that have us excited"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things that have us excited' || t.startsWith('Things that have us excited'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: h3 "Shareable Folder Links"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Shareable Folder Links' || t.startsWith('Shareable Folder Links'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_17: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_08_31', () => { | |
| test('newsletter_2023_08_31: h1 "A New Cycle, New Kickoff"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A New Cycle, New Kickoff' || t.startsWith('A New Cycle, New Kickoff'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: h2 "Things we’ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we’ve written' || t.startsWith('Things we’ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: h2 "Stuff we’re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stuff we’re excited about' || t.startsWith('Stuff we’re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: h3 "Klaravo datacenter overview"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo datacenter overview' || t.startsWith('Klaravo datacenter overview'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_08_31: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-08-31/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_09_18', () => { | |
| test('newsletter_2023_09_18: h1 "A calmer approach starts right"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A calmer approach starts right here' || t.startsWith('A calmer approach starts right here'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: h2 "Things we\'ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'ve written' || t.startsWith('Things we\'ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: h2 "What we\'re looking forward to"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we\'re looking forward to' || t.startsWith('What we\'re looking forward to'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: h3 "Cutting TypeScript"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Cutting TypeScript' || t.startsWith('Cutting TypeScript'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_09_18: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-09-18/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_10_19', () => { | |
| test('newsletter_2023_10_19: h1 "Shelves, and how we built it"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Shelves, and how we built it' || t.startsWith('Shelves, and how we built it'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: h2 "Notes we\'ve published"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Notes we\'ve published' || t.startsWith('Notes we\'ve published'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: h2 "Stuff we\'re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Stuff we\'re excited about' || t.startsWith('Stuff we\'re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: h3 "How “Huddle” becomes “Chat”"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How “Huddle” becomes “Chat”' || t.startsWith('How “Huddle” becomes “Chat”'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_10_19: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-10-19/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_11_02', () => { | |
| test('newsletter_2023_11_02: h1 "All about your feed!"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'All about your feed!' || t.startsWith('All about your feed!'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: h2 "Ideas we’ve shared"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas we’ve shared' || t.startsWith('Ideas we’ve shared'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: h2 "What has us excited lately"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What has us excited lately' || t.startsWith('What has us excited lately'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: h6 "Newsletter • November 2, 2023"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const texts = (await page.locator('h6').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter • November 2, 2023' || t.startsWith('Newsletter • November 2, 2023'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_02: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-02/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_11_17', () => { | |
| test('newsletter_2023_11_17: h1 "Making remote work calmer"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Making remote work calmer' || t.startsWith('Making remote work calmer'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: h2 "Notes worth sharing"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Notes worth sharing' || t.startsWith('Notes worth sharing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: h2 "Things we\'re looking toward"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'re looking toward' || t.startsWith('Things we\'re looking toward'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: h3 "Do less than your rivals"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Do less than your rivals' || t.startsWith('Do less than your rivals'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_17: footer link "Contact"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Contact' || t.startsWith('Contact')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_11_30', () => { | |
| test('newsletter_2023_11_30: h1 "Small wins and steady resets"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Small wins and steady resets' || t.startsWith('Small wins and steady resets'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: h2 "Ideas worth sharing"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas worth sharing' || t.startsWith('Ideas worth sharing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: h2 "What we\'re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we\'re excited about' || t.startsWith('What we\'re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: h6 "Newsletter • November 30, 2023"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const texts = (await page.locator('h6').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter • November 30, 2023' || t.startsWith('Newsletter • November 30, 2023'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_11_30: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-11-30/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2023_12_19', () => { | |
| test('newsletter_2023_12_19: h1 "A small thank-you"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A small thank-you' || t.startsWith('A small thank-you'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: h2 "Thoughts we\'ve posted"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts we\'ve posted' || t.startsWith('Thoughts we\'ve posted'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: h2 "What we\'re excited about now"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we\'re excited about now' || t.startsWith('What we\'re excited about now'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: h3 "Sit with it for a while"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Sit with it for a while' || t.startsWith('Sit with it for a while'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2023_12_19: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2023-12-19/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_01_04', () => { | |
| test('newsletter_2024_01_04: h1 "A New Year, a New Start"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A New Year, a New Start' || t.startsWith('A New Year, a New Start'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: h2 "Things we’ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we’ve written' || t.startsWith('Things we’ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: h2 "What we’re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we’re excited about' || t.startsWith('What we’re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: h3 "Cars and strategy"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Cars and strategy' || t.startsWith('Cars and strategy'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_04: footer link "Help"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-04/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Help' || t.startsWith('Help')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_01_18', () => { | |
| test('newsletter_2024_01_18: h1 "Our ground rules"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our ground rules' || t.startsWith('Our ground rules'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: h2 "Things we\'ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'ve written' || t.startsWith('Things we\'ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: h2 "Things we can\'t wait for"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we can\'t wait for' || t.startsWith('Things we can\'t wait for'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: h3 "Sailing the calm or the open s"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Sailing the calm or the open sea' || t.startsWith('Sailing the calm or the open sea'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_01_18: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-01-18/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_02_01', () => { | |
| test('newsletter_2024_02_01: h1 "Going live"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Going live' || t.startsWith('Going live'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: h2 "Thoughts we’ve shared"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts we’ve shared' || t.startsWith('Thoughts we’ve shared'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: h2 "Things we’re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we’re excited about' || t.startsWith('Things we’re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: h3 "We need a right to compute"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We need a right to compute' || t.startsWith('We need a right to compute'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_02_01: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-02-01/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_03_14', () => { | |
| test('newsletter_2024_03_14: h1 "Time to get serious about cost"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Time to get serious about costs' || t.startsWith('Time to get serious about costs'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: h2 "Ideas worth sharing"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas worth sharing' || t.startsWith('Ideas worth sharing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: h2 "What has us excited lately"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What has us excited lately' || t.startsWith('What has us excited lately'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: h3 "1. Keep a constant eye on expe"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === '1. Keep a constant eye on expenses' || t.startsWith('1. Keep a constant eye on expenses'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_03_14: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-03-14/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_04_04', () => { | |
| test('newsletter_2024_04_04: h1 "Rethinking your hustle"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Rethinking your hustle' || t.startsWith('Rethinking your hustle'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: h2 "Ideas worth passing on"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas worth passing on' || t.startsWith('Ideas worth passing on'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: h2 "What has us excited lately"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What has us excited lately' || t.startsWith('What has us excited lately'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: h3 "A Fresh Look at Platform Choic"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A Fresh Look at Platform Choices' || t.startsWith('A Fresh Look at Platform Choices'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_04_04: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-04-04/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_05_17', () => { | |
| test('newsletter_2024_05_17: h1 "Frame Up — it’s not just for p"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Frame Up — it’s not just for products' || t.startsWith('Frame Up — it’s not just for products'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: h2 "Setting the limits"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Setting the limits' || t.startsWith('Setting the limits'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: h2 "Framing the work"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Framing the work' || t.startsWith('Framing the work'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: h2 "Passing the work to the team"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Passing the work to the team' || t.startsWith('Passing the work to the team'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_17: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-17/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_05_31', () => { | |
| test('newsletter_2024_05_31: h1 "The meetings you dread, and ho"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The meetings you dread, and how to dodge them' || t.startsWith('The meetings you dread, and how to dodge them'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: h2 "Thoughts worth sharing"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Thoughts worth sharing' || t.startsWith('Thoughts worth sharing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: h2 "What we\'re excited about"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What we\'re excited about' || t.startsWith('What we\'re excited about'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: h3 "The Weekly Sync"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The Weekly Sync' || t.startsWith('The Weekly Sync'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_05_31: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-05-31/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_06_13', () => { | |
| test('newsletter_2024_06_13: h1 "What’s ahead?"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What’s ahead?' || t.startsWith('What’s ahead?'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: h2 "Ideas we’ve been sharing"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas we’ve been sharing' || t.startsWith('Ideas we’ve been sharing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: h2 "Things we can’t wait to share"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we can’t wait to share' || t.startsWith('Things we can’t wait to share'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: h3 "Take your cues outside"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Take your cues outside' || t.startsWith('Take your cues outside'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_06_13: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-06-13/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_07_15', () => { | |
| test('newsletter_2024_07_15: h1 "The case for writing"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The case for writing' || t.startsWith('The case for writing'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: h2 "Things we\'ve written"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things we\'ve written' || t.startsWith('Things we\'ve written'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: h2 "A few things we love lately"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few things we love lately' || t.startsWith('A few things we love lately'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: h3 "What will you make?"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'What will you make?' || t.startsWith('What will you make?'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_15: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-15/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_07_29', () => { | |
| test('newsletter_2024_07_29: h1 "Keep it lighter than you think"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Keep it lighter than you think' || t.startsWith('Keep it lighter than you think'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: h2 "Ideas worth passing on"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ideas worth passing on' || t.startsWith('Ideas worth passing on'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: h2 "Things that have us excited"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Things that have us excited' || t.startsWith('Things that have us excited'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: h3 "(Literally) Moving with Klarav"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === '(Literally) Moving with Klaravo' || t.startsWith('(Literally) Moving with Klaravo'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_07_29: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-07-29/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_09_09', () => { | |
| test('newsletter_2024_09_09: h1 "How we work"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How we work' || t.startsWith('How we work'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: h2 "A few recent updates and notes"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few recent updates and notes' || t.startsWith('A few recent updates and notes'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: h3 "Give Nudges a Name"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Give Nudges a Name' || t.startsWith('Give Nudges a Name'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: h3 "Journal for Ora Calendar"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Journal for Ora Calendar' || t.startsWith('Journal for Ora Calendar'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_09_09: footer link "Help"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-09-09/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Help' || t.startsWith('Help')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_10_01', () => { | |
| test('newsletter_2024_10_01: h1 "The quiet power of the smaller"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The quiet power of the smaller fix' || t.startsWith('The quiet power of the smaller fix'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: h2 "A few updates from our team"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few updates from our team' || t.startsWith('A few updates from our team'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: h3 "New in Ora: Float Up Now"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'New in Ora: Float Up Now' || t.startsWith('New in Ora: Float Up Now'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: h3 "Bridge Native, Steady Queue, a"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Bridge Native, Steady Queue, and Anchor 2.0 releases' || t.startsWith('Bridge Native, Steady Queue, and Anchor 2.0 releases'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_01: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-01/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_10_29', () => { | |
| test('newsletter_2024_10_29: h1 "Our best retreat yet"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Our best retreat yet' || t.startsWith('Our best retreat yet'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: h2 "A few recent updates and news"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few recent updates and news' || t.startsWith('A few recent updates and news'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: h3 "New in Klaravo: Do more with P"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'New in Klaravo: Do more with Public Links' || t.startsWith('New in Klaravo: Do more with Public Links'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: h3 "Klaravo Office Hours"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Office Hours' || t.startsWith('Klaravo Office Hours'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_10_29: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-10-29/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2024_11_22', () => { | |
| test('newsletter_2024_11_22: h1 "Grow only when it truly hurts"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Grow only when it truly hurts' || t.startsWith('Grow only when it truly hurts'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: h2 "A few recent updates"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few recent updates' || t.startsWith('A few recent updates'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: h3 "New in Ora: Sweep Through New"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'New in Ora: Sweep Through New' || t.startsWith('New in Ora: Sweep Through New'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: h3 "New in Ora: Accessibility impr"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'New in Ora: Accessibility improvements to Ora Calendar' || t.startsWith('New in Ora: Accessibility improvements to Ora Calendar'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2024_11_22: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2024-11-22/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2025_01_13', () => { | |
| test('newsletter_2025_01_13: h1 "Solve the whole problem"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Solve the whole problem' || t.startsWith('Solve the whole problem'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: h2 "A few updates and ideas we\'ve "', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'A few updates and ideas we\'ve shared:' || t.startsWith('A few updates and ideas we\'ve shared:'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: h3 "Klaravo Office Hours"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Office Hours' || t.startsWith('Klaravo Office Hours'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: h3 "Klaravo Dev Blog"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo Dev Blog' || t.startsWith('Klaravo Dev Blog'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_01_13: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-01-13/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - newsletter_2025_12_11', () => { | |
| test('newsletter_2025_12_11: h1 "Introducing Verve, new from No"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Introducing Verve, new from Nordhaven' || t.startsWith('Introducing Verve, new from Nordhaven'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_12_11: h6 "Newsletter • December 11, 2025"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const texts = (await page.locator('h6').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter • December 11, 2025' || t.startsWith('Newsletter • December 11, 2025'))).toBeTruthy(); | |
| }); | |
| test('newsletter_2025_12_11: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_12_11: header link "Newsletter"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const links = page.locator('header a, [role="banner"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Newsletter' || t.startsWith('Newsletter')), 'link text in header').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('newsletter')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_12_11: footer link "Klaravo™"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo™' || t.startsWith('Klaravo™')), 'link text in footer').toBeTruthy(); | |
| }); | |
| test('newsletter_2025_12_11: footer link "Support"', async ({ page }) => { | |
| await page.goto('/newsletter/2025-12-11/'); | |
| const links = page.locator('footer a, [role="contentinfo"] a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Support' || t.startsWith('Support')), 'link text in footer').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('support')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - support_testimonials', () => { | |
| test('support_testimonials: h1 "At Klaravo, customer service i"', async ({ page }) => { | |
| await page.goto('/support/testimonials/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'At Klaravo, customer service isn’t an afterthought, it’s one of our very best features.' || t.startsWith('At Klaravo, customer service isn’t an afterthought, it’s one of our very best features.'))).toBeTruthy(); | |
| }); | |
| test('support_testimonials: nav link "Klaravo"', async ({ page }) => { | |
| await page.goto('/support/testimonials/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Klaravo' || t.startsWith('Klaravo')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('support_testimonials: nav link "Proven in practice"', async ({ page }) => { | |
| await page.goto('/support/testimonials/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Proven in practice' || t.startsWith('Proven in practice')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('customers')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('support_testimonials: nav link "Features"', async ({ page }) => { | |
| await page.goto('/support/testimonials/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features' || t.startsWith('Features')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('#features')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('support_testimonials: nav link "Tours"', async ({ page }) => { | |
| await page.goto('/support/testimonials/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tours' || t.startsWith('Tours')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('paths')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - Routing', () => { | |
| test('navigate to paths via "Paths"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="paths"]').first(); | |
| expect(await link.count(), 'nav link to paths exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('paths'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('The people’s path to Klaravo'); | |
| }); | |
| test('navigate to pricing via "Pricing"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="pricing"]').first(); | |
| expect(await link.count(), 'nav link to pricing exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('pricing'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('Choose the plan that\'s right for you.'); | |
| }); | |
| test('navigate to underdogs via "built for smaller, faster-movi"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="underdogs"]').first(); | |
| expect(await link.count(), 'nav link to underdogs exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('underdogs'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('We\'re in the underdogs\' corner'); | |
| }); | |
| }); | |