Datasets:
Download web/buildara.example/tests/static/content.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 221 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/buildara.example/tests/static/content.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/buildara.example/tests/static/content.scripted.spec.ts
-
curl -L -o content.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/buildara.example/tests/static/content.scripted.spec.ts
221 kB
| import { test, expect } from '@playwright/test'; | |
| test.describe('Functional - homepage', () => { | |
| test('homepage: h1 "Your ideas. Your network. Your"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your ideas. Your network. Your cloud.' || t.startsWith('Your ideas. Your network. Your cloud.'))).toBeTruthy(); | |
| }); | |
| test('homepage: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('homepage: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('homepage: h2 "Manage your privacy"', async ({ page }) => { | |
| await page.goto('/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your privacy' || t.startsWith('Manage your privacy'))).toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Learn"', 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 === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Topics"', 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 === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Build"', 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 === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('homepage: nav link "Capabilities"', 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 === 'Capabilities' || t.startsWith('Capabilities')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('capabilities')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - build', () => { | |
| test('build: h1 "Build Boldly"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build Boldly' || t.startsWith('Build Boldly'))).toBeTruthy(); | |
| }); | |
| test('build: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('build: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('build: h2 "Manage privacy choices"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage privacy choices' || t.startsWith('Manage privacy choices'))).toBeTruthy(); | |
| }); | |
| test('build: nav link "Home"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('build: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build: nav link "Capabilities"', async ({ page }) => { | |
| await page.goto('/build/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Capabilities' || t.startsWith('Capabilities')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('capabilities')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - build_capabilities', () => { | |
| test('build_capabilities: title matches GT', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('capabilities'); | |
| }); | |
| test('build_capabilities: h1 "Cloud Capabilities by Region"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Cloud Capabilities by Region' || t.startsWith('Cloud Capabilities by Region'))).toBeTruthy(); | |
| }); | |
| test('build_capabilities: h1 "Features and benefits"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Features and benefits' || t.startsWith('Features and benefits'))).toBeTruthy(); | |
| }); | |
| test('build_capabilities: h2 "Choose how we use cookies"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose how we use cookies' || t.startsWith('Choose how we use cookies'))).toBeTruthy(); | |
| }); | |
| test('build_capabilities: h2 "Fine-tune your cookie settings"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie settings' || t.startsWith('Fine-tune your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('build_capabilities: nav link "Home"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('build_capabilities: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_capabilities: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_capabilities: nav link "Build"', async ({ page }) => { | |
| await page.goto('/build/capabilities/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - build_tools', () => { | |
| test('build_tools: title matches GT', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('toolbox'); | |
| }); | |
| test('build_tools: h1 "Toolbox"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Toolbox' || t.startsWith('Toolbox'))).toBeTruthy(); | |
| }); | |
| test('build_tools: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('build_tools: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('build_tools: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('build_tools: nav link "Home"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('build_tools: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_tools: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_tools: nav link "Build"', async ({ page }) => { | |
| await page.goto('/build/tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - build_workshops', () => { | |
| test('build_workshops: title matches GT', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('workshops'); | |
| }); | |
| test('build_workshops: h1 "Bootcamps"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Bootcamps' || t.startsWith('Bootcamps'))).toBeTruthy(); | |
| }); | |
| test('build_workshops: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('build_workshops: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('build_workshops: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('build_workshops: nav link "Home"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('build_workshops: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_workshops: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('build_workshops: nav link "Build"', async ({ page }) => { | |
| await page.goto('/build/workshops/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community', () => { | |
| test('community: h1 "Buildara programs"', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Buildara programs' || t.startsWith('Buildara programs'))).toBeTruthy(); | |
| }); | |
| test('community: h2 "Choose your cookie settings"', 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 === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community: h2 "Personalize cookie settings"', 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 === 'Personalize cookie settings' || t.startsWith('Personalize cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community: h2 "Your privacy choices"', 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 === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('community: nav link "Home"', 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 === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community: nav link "Learn"', 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 === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community: nav link "Topics"', 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 === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community: nav link "Build"', 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 === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - connect', () => { | |
| test('connect: title matches GT', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('connect'); | |
| }); | |
| test('connect: h1 "Connect"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Connect' || t.startsWith('Connect'))).toBeTruthy(); | |
| }); | |
| test('connect: h1 "Local Builder Days"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Local Builder Days' || t.startsWith('Local Builder Days'))).toBeTruthy(); | |
| }); | |
| test('connect: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('connect: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('connect: nav link "Home"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('connect: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect: nav link "Build"', async ({ page }) => { | |
| await page.goto('/connect/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn', () => { | |
| test('learn: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('learn'); | |
| }); | |
| test('learn: h1 "Learn and grow"', 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 === 'Learn and grow' || t.startsWith('Learn and grow'))).toBeTruthy(); | |
| }); | |
| test('learn: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn: nav link "Home"', 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 === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Topics"', 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 === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Build"', 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 === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn: nav link "Capabilities"', 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 === 'Capabilities' || t.startsWith('Capabilities')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('capabilities')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - wishlist', () => { | |
| test('wishlist: title matches GT', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('wishlist'); | |
| }); | |
| test('wishlist: h1 "Idea Wishlist"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Idea Wishlist' || t.startsWith('Idea Wishlist'))).toBeTruthy(); | |
| }); | |
| test('wishlist: h2 "Set your cookie preferences no"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Set your cookie preferences now' || t.startsWith('Set your cookie preferences now'))).toBeTruthy(); | |
| }); | |
| test('wishlist: h2 "Manage your cookie settings"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie settings' || t.startsWith('Manage your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('wishlist: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('wishlist: nav link "Home"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('wishlist: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('wishlist: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('wishlist: nav link "Build"', async ({ page }) => { | |
| await page.goto('/wishlist/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@sablefennimore', () => { | |
| test('community_@sablefennimore: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@sablefennimore'); | |
| }); | |
| test('community_@sablefennimore: h1 "Priya Nandel"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Priya Nandel' || t.startsWith('Priya Nandel'))).toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: h2 "Fine-tune cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune cookie preferences' || t.startsWith('Fine-tune cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@sablefennimore: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@sablefennimore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@yquarles', () => { | |
| test('community_@yquarles: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@yquarles'); | |
| }); | |
| test('community_@yquarles: h1 "Okafor, Delani"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Okafor, Delani' || t.startsWith('Okafor, Delani'))).toBeTruthy(); | |
| }); | |
| test('community_@yquarles: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@yquarles: h2 "Manage your cookie choices"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie choices' || t.startsWith('Manage your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('community_@yquarles: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('community_@yquarles: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@yquarles: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@yquarles: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@yquarles: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@yquarles/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@bryn', () => { | |
| test('community_@bryn: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@devnova_dev'); | |
| }); | |
| test('community_@bryn: h1 "Riley Danforth"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Riley Danforth' || t.startsWith('Riley Danforth'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn: h2 "Customize your cookie choices"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize your cookie choices' || t.startsWith('Customize your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn: h2 "Control your privacy"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Control your privacy' || t.startsWith('Control your privacy'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@bryn: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bryn: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bryn: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@bryn/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@bziltmore', () => { | |
| test('community_@bziltmore: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@bziltmore'); | |
| }); | |
| test('community_@bziltmore: h1 "Marcus Vale"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Marcus Vale' || t.startsWith('Marcus Vale'))).toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: h2 "Choose how we use your cookies"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose how we use your cookies' || t.startsWith('Choose how we use your cookies'))).toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: h2 "Manage your privacy"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your privacy' || t.startsWith('Manage your privacy'))).toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bziltmore: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@bziltmore/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@bryn5797', () => { | |
| test('community_@bryn5797: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@anavela27'); | |
| }); | |
| test('community_@bryn5797: h1 "Ana Vela"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Ana Vela' || t.startsWith('Ana Vela'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: h2 "Fine-tune cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune cookie preferences' || t.startsWith('Fine-tune cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@bryn5797: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@bryn5797/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@isoltzilt', () => { | |
| test('community_@isoltzilt: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@isoltzilt'); | |
| }); | |
| test('community_@isoltzilt: h1 "Elena Marlowe"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Elena Marlowe' || t.startsWith('Elena Marlowe'))).toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: h2 "Choose your cookie settings he"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings here' || t.startsWith('Choose your cookie settings here'))).toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: h2 "Manage your privacy"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your privacy' || t.startsWith('Manage your privacy'))).toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@isoltzilt: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@isoltzilt/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@vesnam', () => { | |
| test('community_@vesnam: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@devmaria'); | |
| }); | |
| test('community_@vesnam: h1 "Amara Feldstein"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Amara Feldstein' || t.startsWith('Amara Feldstein'))).toBeTruthy(); | |
| }); | |
| test('community_@vesnam: h2 "Choose how cookies are used"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose how cookies are used' || t.startsWith('Choose how cookies are used'))).toBeTruthy(); | |
| }); | |
| test('community_@vesnam: h2 "Fine-tune your cookie settings"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie settings' || t.startsWith('Fine-tune your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community_@vesnam: h2 "Manage your privacy"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your privacy' || t.startsWith('Manage your privacy'))).toBeTruthy(); | |
| }); | |
| test('community_@vesnam: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@vesnam: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@vesnam: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@vesnam: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@vesnam/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_@jossdraymoor', () => { | |
| test('community_@jossdraymoor: title matches GT', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('@codemaven'); | |
| }); | |
| test('community_@jossdraymoor: h1 "Jordan"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Jordan' || t.startsWith('Jordan'))).toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: h2 "Adjust your cookie choices"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie choices' || t.startsWith('Adjust your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_@jossdraymoor: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/@jossdraymoor/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_community_builders', () => { | |
| test('community_community_builders: title matches GT', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('builder voices'); | |
| }); | |
| test('community_community_builders: h1 "The Buildara Builders"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'The Buildara Builders' || t.startsWith('The Buildara Builders'))).toBeTruthy(); | |
| }); | |
| test('community_community_builders: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_community_builders: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community_community_builders: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_community_builders: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_community_builders: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_community_builders: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_community_builders: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_heroes', () => { | |
| test('community_heroes: title matches GT', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('heroes'); | |
| }); | |
| test('community_heroes: h1 "Standout voices shaping our co"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Standout voices shaping our community' || t.startsWith('Standout voices shaping our community'))).toBeTruthy(); | |
| }); | |
| test('community_heroes: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_heroes: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community_heroes: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_heroes: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_heroes: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_heroes: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_heroes: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_student_builder_groups', () => { | |
| test('community_student_builder_groups: title matches GT', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('student builder groups'); | |
| }); | |
| test('community_student_builder_groups: h1 "Buildara Student Builders"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Buildara Student Builders' || t.startsWith('Buildara Student Builders'))).toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_student_builder_groups: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/student-builder-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - community_user_groups', () => { | |
| test('community_user_groups: title matches GT', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('developer user groups'); | |
| }); | |
| test('community_user_groups: h1 "Buildara Groups"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Buildara Groups' || t.startsWith('Buildara Groups'))).toBeTruthy(); | |
| }); | |
| test('community_user_groups: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_user_groups: h2 "Customize cookie preferences"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie preferences' || t.startsWith('Customize cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('community_user_groups: h2 "Control your privacy"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Control your privacy' || t.startsWith('Control your privacy'))).toBeTruthy(); | |
| }); | |
| test('community_user_groups: nav link "Home"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('community_user_groups: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_user_groups: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('community_user_groups: nav link "Build"', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - connect_events', () => { | |
| test('connect_events: title matches GT', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('events'); | |
| }); | |
| test('connect_events: h1 "Events"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Events' || t.startsWith('Events'))).toBeTruthy(); | |
| }); | |
| test('connect_events: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('connect_events: h2 "Manage your cookie settings"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie settings' || t.startsWith('Manage your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('connect_events: h2 "Manage privacy choices"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage privacy choices' || t.startsWith('Manage privacy choices'))).toBeTruthy(); | |
| }); | |
| test('connect_events: nav link "Home"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('connect_events: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect_events: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect_events: nav link "Build"', async ({ page }) => { | |
| await page.goto('/connect/events/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - connect_spaces', () => { | |
| test('connect_spaces: title matches GT', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('circles'); | |
| }); | |
| test('connect_spaces: h1 "Circles"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Circles' || t.startsWith('Circles'))).toBeTruthy(); | |
| }); | |
| test('connect_spaces: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('connect_spaces: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('connect_spaces: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('connect_spaces: nav link "Home"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('connect_spaces: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect_spaces: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('connect_spaces: nav link "Build"', async ({ page }) => { | |
| await page.goto('/connect/spaces/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics', () => { | |
| test('learn_topics: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('topics'); | |
| }); | |
| test('learn_topics: h1 "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics'))).toBeTruthy(); | |
| }); | |
| test('learn_topics: h2 "Manage your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie settings' || t.startsWith('Manage your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics: h2 "Your privacy controls"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy controls' || t.startsWith('Your privacy controls'))).toBeTruthy(); | |
| }); | |
| test('learn_topics: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics: nav link "Capabilities"', async ({ page }) => { | |
| await page.goto('/learn/topics/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Capabilities' || t.startsWith('Capabilities')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('capabilities')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge', () => { | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: title matches GT', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('buildara buildfest 6.0'); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: h1 "HackFest with Nimbex 6.0 - Stu"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'HackFest with Nimbex 6.0 - Student Builder Challenge' || t.startsWith('HackFest with Nimbex 6.0 - Student Builder Challenge'))).toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: h2 "Customize your cookie choices"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize your cookie choices' || t.startsWith('Customize your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_39o4Vnul5AhN5XHb3SCqxD9ahTL_hackon_with_amazon_60_student_builder_challenge: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/39o4Vnul5AhN5XHb3SCqxD9ahTL/hackon-with-amazon-60-student-builder-challenge/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison', () => { | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('evaluating ai agents'); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: h1 "How to Benchmark AI Agents: A "', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How to Benchmark AI Agents: A 3 Framework Showdown' || t.startsWith('How to Benchmark AI Agents: A 3 Framework Showdown'))).toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: h2 "Choose how cookies are used"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose how cookies are used' || t.startsWith('Choose how cookies are used'))).toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: h2 "Tailor your cookie choices"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tailor your cookie choices' || t.startsWith('Tailor your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3DxDNoUd7d9TAH91QkJEAwXZflG_how_to_evaluate_ai_agents_3_framework_comparison: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3DxDNoUd7d9TAH91QkJEAwXZflG/how-to-evaluate-ai-agents-3-framework-comparison/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day', () => { | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('buildara summit amsterdam attendee exclu'); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: h1 "Buildara Summit Amsterdam Atte"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Buildara Summit Amsterdam Attendee Exclusive: Builder Question of the Day' || t.startsWith('Buildara Summit Amsterdam Attendee Exclusive: Builder Question of the Day'))).toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: h2 "Customize cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie settings' || t.startsWith('Customize cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3E6WMwQSkjtXCHz68qE9nTYR1Se_aws_summit_amsterdam_attendee_exclusive_builder_question_of_the_day: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3E6WMwQSkjtXCHz68qE9nTYR1Se/aws-summit-amsterdam-attendee-exclusive-builder-question-of-the-day/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk', () => { | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('building a nimbex study buddy with mcp +'); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: h1 "Crafting a Nimbex Study Buddy "', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Crafting a Nimbex Study Buddy with MCP + Filament Agents SDK' || t.startsWith('Crafting a Nimbex Study Buddy with MCP + Filament Agents SDK'))).toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: h2 "Manage your cookie choices"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie choices' || t.startsWith('Manage your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EBFSHQD6b0TBD6hJnOM8h5p1B3_building_an_aws_study_buddy_with_mcp_strands_agents_sdk: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EBFSHQD6b0TBD6hJnOM8h5p1B3/building-an-aws-study-buddy-with-mcp-strands-agents-sdk/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition', () => { | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('buildara builders spotlight'); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: h1 "Buildara Creators Spotlight: M"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Buildara Creators Spotlight: May 18th' || t.startsWith('Buildara Creators Spotlight: May 18th'))).toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EBkyEtD0XKD2JqcnKpDLf8Nq73_aws_community_builders_spotlight_may_18th_edition: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EBkyEtD0XKD2JqcnKpDLf8Nq73/aws-community-builders-spotlight-may-18th-edition/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios', () => { | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('resolvendo congelamentos do terminal no '); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: h1 "Investigando por que o Flow CL"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Investigando por que o Flow CLI Congela o Terminal ao Abrir Pastas Binárias' || t.startsWith('Investigando por que o Flow CLI Congela o Terminal ao Abrir Pastas Binárias'))).toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: h2 "Fine-tune cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune cookie preferences' || t.startsWith('Fine-tune cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EDYxmF9szUdDRIs0UYD1y31xxO_depurando_travamentos_do_terminal_no_kiro_cli_causados_por_arquivos_binarios: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EDYxmF9szUdDRIs0UYD1y31xxO/depurando-travamentos-do-terminal-no-kiro-cli-causados-por-arquivos-binarios/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder', () => { | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('how i shipped a production'); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: h1 "I Built a Production-Grade E-C"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I Built a Production-Grade E-Commerce Platform in 3 Months — an AI Assistant Was My Co-Founder' || t.startsWith('I Built a Production-Grade E-Commerce Platform in 3 Months — an AI Assistant Was My Co-Founder'))).toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EFzloOszRiAWRMbI3zRdeCVREV_i_built_a_production_grade_e_commerce_platform_in_3_months_github_copilot_was_my_co_founder: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EFzloOszRiAWRMbI3zRdeCVREV/i-built-a-production-grade-e-commerce-platform-in-3-months-github-copilot-was-my-co-founder/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates', () => { | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('i hand'); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: h1 "I Hand-Coded My Entire Portfol"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'I Hand-Coded My Entire Portfolio. No Shortcuts.' || t.startsWith('I Hand-Coded My Entire Portfolio. No Shortcuts.'))).toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: h2 "Fine-tune cookie preferences"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune cookie preferences' || t.startsWith('Fine-tune cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EH5yjrhmZNLypXilefNezY3s1p_i_coded_my_portfolio_from_scratch_no_templates: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EH5yjrhmZNLypXilefNezY3s1p/i-coded-my-portfolio-from-scratch-no-templates/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026', () => { | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('meet our newest buildara heroes'); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: h1 "Meet Our Newest Buildara Heroe"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Meet Our Newest Buildara Heroes – May 2026' || t.startsWith('Meet Our Newest Buildara Heroes – May 2026'))).toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: h2 "Customize cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie settings' || t.startsWith('Customize cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EJcio15l8cEfd5gzrCatbq9UNX_meet_our_newest_aws_heroes_may_2026: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EJcio15l8cEfd5gzrCatbq9UNX/meet-our-newest-aws-heroes-may-2026/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector', () => { | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('why developers have become the prime tar'); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: h1 "How Developers Became the Late"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'How Developers Became the Latest Attack Surface' || t.startsWith('How Developers Became the Latest Attack Surface'))).toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EKAYvEA9SaP3eHCoJnAA8z6DUW_software_engineers_are_the_new_attack_vector: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EKAYvEA9SaP3eHCoJnAA8z6DUW/software-engineers-are-the-new-attack-vector/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial', () => { | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: title matches GT', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('can machines out'); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: h1 "Human or Machine Intelligence:"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Human or Machine Intelligence: Which One Thinks Better?' || t.startsWith('Human or Machine Intelligence: Which One Thinks Better?'))).toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: nav link "Home"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('content_3EKElxnlEZmgM1JIyjtAfDWcRUC_which_intelligence_is_smarter_natural_or_artificial: nav link "Build"', async ({ page }) => { | |
| await page.goto('/content/3EKElxnlEZmgM1JIyjtAfDWcRUC/which-intelligence-is-smarter-natural-or-artificial/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_agentic_ai', () => { | |
| test('learn_topics_agentic_ai: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('agentic ai'); | |
| }); | |
| test('learn_topics_agentic_ai: h1 "Agentic AI"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Agentic AI' || t.startsWith('Agentic AI'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: h2 "Tailor your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tailor your cookie preferences' || t.startsWith('Tailor your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_agentic_ai: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/agentic-ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_ai', () => { | |
| test('learn_topics_ai: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#ai'); | |
| }); | |
| test('learn_topics_ai: h2 "Set your cookie preferences he"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Set your cookie preferences here' || t.startsWith('Set your cookie preferences here'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: h2 "We couldn\'t save your cookie"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We couldn\'t save your cookie' || t.startsWith('We couldn\'t save your cookie'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_ai_for_developers', () => { | |
| test('learn_topics_ai_for_developers: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#ai'); | |
| }); | |
| test('learn_topics_ai_for_developers: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: h2 "Customize cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie settings' || t.startsWith('Customize cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: h2 "Unable to save cookie preferen"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Unable to save cookie preferences' || t.startsWith('Unable to save cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_ai_for_developers: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/ai-for-developers/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_artificial_intelligence', () => { | |
| test('learn_topics_artificial_intelligence: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#artificial'); | |
| }); | |
| test('learn_topics_artificial_intelligence: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: h2 "Your privacy controls"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy controls' || t.startsWith('Your privacy controls'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: h2 "Couldn\'t save your cookie sett"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Couldn\'t save your cookie settings' || t.startsWith('Couldn\'t save your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_artificial_intelligence: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/artificial-intelligence/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_aspiring_developer', () => { | |
| test('learn_topics_aspiring_developer: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#aspiring'); | |
| }); | |
| test('learn_topics_aspiring_developer: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: h2 "We could not save your cookie"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We could not save your cookie' || t.startsWith('We could not save your cookie'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aspiring_developer: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/aspiring-developer/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_aws_community', () => { | |
| test('learn_topics_aws_community: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#builder'); | |
| }); | |
| test('learn_topics_aws_community: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: h2 "Tailor your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tailor your cookie choices' || t.startsWith('Tailor your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: h2 "We couldn\'t save your cookie s"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We couldn\'t save your cookie settings' || t.startsWith('We couldn\'t save your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_aws_community_builders', () => { | |
| test('learn_topics_aws_community_builders: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#buildara'); | |
| }); | |
| test('learn_topics_aws_community_builders: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: h2 "Fine-tune your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Fine-tune your cookie choices' || t.startsWith('Fine-tune your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: h2 "We were unable to save your co"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We were unable to save your cookie' || t.startsWith('We were unable to save your cookie'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_community_builders: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-community-builders/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_aws_heroes', () => { | |
| test('learn_topics_aws_heroes: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#buildara'); | |
| }); | |
| test('learn_topics_aws_heroes: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: h2 "Customize your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize your cookie choices' || t.startsWith('Customize your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: h2 "We couldn\'t save your cookie c"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We couldn\'t save your cookie choices' || t.startsWith('We couldn\'t save your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_aws_heroes: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/aws-heroes/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_coding', () => { | |
| test('learn_topics_coding: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#coding'); | |
| }); | |
| test('learn_topics_coding: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: h2 "Manage your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie settings' || t.startsWith('Manage your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: h2 "Could not save cookie preferen"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Could not save cookie preferences' || t.startsWith('Could not save cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_coding: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_community', () => { | |
| test('learn_topics_community: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#community'); | |
| }); | |
| test('learn_topics_community: h2 "Set your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Set your cookie preferences' || t.startsWith('Set your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_community: h2 "Manage cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage cookie preferences' || t.startsWith('Manage cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_community: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_community: h2 "Saving your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Saving your cookie preferences failed' || t.startsWith('Saving your cookie preferences failed'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_community: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_community: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_community: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_community: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/community/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_developer_productivity', () => { | |
| test('learn_topics_developer_productivity: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#developer'); | |
| }); | |
| test('learn_topics_developer_productivity: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: h2 "Customize cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie preferences' || t.startsWith('Customize cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: h2 "Unable to save cookie preferen"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Unable to save cookie preferences' || t.startsWith('Unable to save cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_productivity: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-productivity/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_developer_tools', () => { | |
| test('learn_topics_developer_tools: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('developer tools'); | |
| }); | |
| test('learn_topics_developer_tools: h1 "Developer Tools"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Developer Tools' || t.startsWith('Developer Tools'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: h2 "Adjust your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie preferences' || t.startsWith('Adjust your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_developer_tools: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/developer-tools/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_javascript', () => { | |
| test('learn_topics_javascript: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#javascript'); | |
| }); | |
| test('learn_topics_javascript: h2 "Set your cookie preferences he"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Set your cookie preferences here' || t.startsWith('Set your cookie preferences here'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: h2 "Manage privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage privacy choices' || t.startsWith('Manage privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: h2 "We couldn\'t save your cookie c"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'We couldn\'t save your cookie choices' || t.startsWith('We couldn\'t save your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_javascript: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/javascript/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_programming', () => { | |
| test('learn_topics_programming: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#programming'); | |
| }); | |
| test('learn_topics_programming: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: h2 "Adjust your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie settings' || t.startsWith('Adjust your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: h2 "Manage privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage privacy choices' || t.startsWith('Manage privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: h2 "Could not save your cookie set"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Could not save your cookie settings' || t.startsWith('Could not save your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_programming: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/programming/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_project', () => { | |
| test('learn_topics_project: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#project'); | |
| }); | |
| test('learn_topics_project: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_project: h2 "Customize your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize your cookie choices' || t.startsWith('Customize your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_project: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_project: h2 "Could not save your cookie cho"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Could not save your cookie choices' || t.startsWith('Could not save your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_project: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_project: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_project: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_project: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/project/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_students', () => { | |
| test('learn_topics_students: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#students'); | |
| }); | |
| test('learn_topics_students: h2 "Choose your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie preferences' || t.startsWith('Choose your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_students: h2 "Tailor your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Tailor your cookie preferences' || t.startsWith('Tailor your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_students: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_students: h2 "Unable to store cookie prefere"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Unable to store cookie preferences' || t.startsWith('Unable to store cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_students: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_students: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_students: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_students: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/students/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_technology_frameworks', () => { | |
| test('learn_topics_technology_frameworks: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#technology'); | |
| }); | |
| test('learn_topics_technology_frameworks: h2 "Choose your cookie settings"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Choose your cookie settings' || t.startsWith('Choose your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: h2 "Adjust your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Adjust your cookie choices' || t.startsWith('Adjust your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: h2 "Could not save your cookie set"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Could not save your cookie settings' || t.startsWith('Could not save your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_technology_frameworks: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/technology-frameworks/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_vibe_coding', () => { | |
| test('learn_topics_vibe_coding: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#vibe'); | |
| }); | |
| test('learn_topics_vibe_coding: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: h2 "Customize cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize cookie preferences' || t.startsWith('Customize cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: h2 "Your privacy choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy choices' || t.startsWith('Your privacy choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: h2 "Unable to save cookie preferen"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Unable to save cookie preferences' || t.startsWith('Unable to save cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_vibe_coding: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/vibe-coding/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - learn_topics_web_development', () => { | |
| test('learn_topics_web_development: title matches GT', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const t = (await page.title()).toLowerCase(); | |
| expect(t).toContain('#web'); | |
| }); | |
| test('learn_topics_web_development: h2 "Manage your cookie preferences"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Manage your cookie preferences' || t.startsWith('Manage your cookie preferences'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: h2 "Customize your cookie choices"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Customize your cookie choices' || t.startsWith('Customize your cookie choices'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: h2 "Your privacy options"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Your privacy options' || t.startsWith('Your privacy options'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: h2 "Could not save your cookie set"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Could not save your cookie settings' || t.startsWith('Could not save your cookie settings'))).toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: nav link "Home"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Home' || t.startsWith('Home')), 'link text in nav').toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: nav link "Learn"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Learn' || t.startsWith('Learn')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('learn')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: nav link "Topics"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Topics' || t.startsWith('Topics')), 'link text in nav').toBeTruthy(); | |
| const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); | |
| expect(hrefs.some(h => h.includes('topics')), 'href fragment present').toBeTruthy(); | |
| }); | |
| test('learn_topics_web_development: nav link "Build"', async ({ page }) => { | |
| await page.goto('/learn/topics/web-development/'); | |
| const links = page.locator('nav a'); | |
| const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); | |
| expect(texts.some(t => t === 'Build' || t.startsWith('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('build')), 'href fragment present').toBeTruthy(); | |
| }); | |
| }); | |
| test.describe('Functional - Routing', () => { | |
| test('navigate to learn via "Learn"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="learn"]').first(); | |
| expect(await link.count(), 'nav link to learn exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('learn'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('Learn and grow'); | |
| }); | |
| test('navigate to learn_topics via "Topics"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="topics"]').first(); | |
| expect(await link.count(), 'nav link to learn_topics exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('topics'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('Topics'); | |
| }); | |
| test('navigate to build via "Build"', async ({ page }) => { | |
| await page.goto('/'); | |
| const link = page.locator('a[href*="build"]').first(); | |
| expect(await link.count(), 'nav link to build exists').toBeGreaterThan(0); | |
| await link.click(); | |
| await page.waitForTimeout(1200); | |
| expect(page.url().toLowerCase(), 'URL changed to destination').toContain('build'); | |
| const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); | |
| expect(bodyText, 'destination distinctive content shown').toContain('Build Boldly'); | |
| }); | |
| }); | |