RecreationBench / web /veridara.example /tests /static /content.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 95)
2960382 verified
Raw History Blame Contribute Delete
191 kB
import { test, expect } from '@playwright/test';
test.describe('Functional - homepage', () => {
test('homepage: title matches GT', async ({ page }) => {
await page.goto('/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veridara discovery');
});
test('homepage: h2 "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!'))).toBeTruthy();
});
test('homepage: header link "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('homepage: header link "Veridara DiscoveryVeridara"', async ({ page }) => {
await page.goto('/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara DiscoveryVeridara' || t.startsWith('Veridara DiscoveryVeridara')), 'link text in header').toBeTruthy();
});
test('homepage: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - accessibility_statement', () => {
test('accessibility_statement: title matches GT', async ({ page }) => {
await page.goto('/accessibility-statement/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('accessibility statement');
});
test('accessibility_statement: h1 "Accessibility Statement"', async ({ page }) => {
await page.goto('/accessibility-statement/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Accessibility Statement' || t.startsWith('Accessibility Statement'))).toBeTruthy();
});
test('accessibility_statement: h2 "Making the wonders of science "', async ({ page }) => {
await page.goto('/accessibility-statement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Making the wonders of science open to all' || t.startsWith('Making the wonders of science open to all'))).toBeTruthy();
});
test('accessibility_statement: h2 "Web Content Accessibility Guid"', async ({ page }) => {
await page.goto('/accessibility-statement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Web Content Accessibility Guidelines (WCAG) 2.2' || t.startsWith('Web Content Accessibility Guidelines (WCAG) 2.2'))).toBeTruthy();
});
test('accessibility_statement: h2 "Adjusting your set-up to fit y"', async ({ page }) => {
await page.goto('/accessibility-statement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Adjusting your set-up to fit your needs' || t.startsWith('Adjusting your set-up to fit your needs'))).toBeTruthy();
});
test('accessibility_statement: header link "Veridara Science NewsV"', async ({ page }) => {
await page.goto('/accessibility-statement/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Science NewsV' || t.startsWith('Veridara Science NewsV')), 'link text in header').toBeTruthy();
});
test('accessibility_statement: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/accessibility-statement/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - aging', () => {
test('aging: title matches GT', async ({ page }) => {
await page.goto('/aging/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('aging & longevity');
});
test('aging: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/aging/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. SUBSCRIBE NOW!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. SUBSCRIBE NOW!'))).toBeTruthy();
});
test('aging: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/aging/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('aging: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/aging/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - alcohol', () => {
test('alcohol: title matches GT', async ({ page }) => {
await page.goto('/alcohol/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('alcohol research');
});
test('alcohol: h2 "SAVE 44% ON UNLIMITED ACCESS. "', async ({ page }) => {
await page.goto('/alcohol/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON UNLIMITED ACCESS. SUBSCRIBE TODAY!' || t.startsWith('SAVE 44% ON UNLIMITED ACCESS. SUBSCRIBE TODAY!'))).toBeTruthy();
});
test('alcohol: header link "VeridaraV"', async ({ page }) => {
await page.goto('/alcohol/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('alcohol: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/alcohol/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - allergies', () => {
test('allergies: title matches GT', async ({ page }) => {
await page.goto('/allergies/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('allergies coverage');
});
test('allergies: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/allergies/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS—SUBSCRIBE NOW!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS—SUBSCRIBE NOW!'))).toBeTruthy();
});
test('allergies: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/allergies/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('allergies: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/allergies/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - alternative_medicine', () => {
test('alternative_medicine: title matches GT', async ({ page }) => {
await page.goto('/alternative-medicine/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('alternative medicine coverage');
});
test('alternative_medicine: h1 "Alternative medicine"', async ({ page }) => {
await page.goto('/alternative-medicine/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Alternative medicine' || t.startsWith('Alternative medicine'))).toBeTruthy();
});
test('alternative_medicine: h2 "SAVE 44% ON A FULL-ACCESS MEMB"', async ({ page }) => {
await page.goto('/alternative-medicine/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON A FULL-ACCESS MEMBERSHIP. JOIN NOW!' || t.startsWith('SAVE 44% ON A FULL-ACCESS MEMBERSHIP. JOIN NOW!'))).toBeTruthy();
});
test('alternative_medicine: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/alternative-medicine/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('alternative_medicine: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/alternative-medicine/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - alzheimer_s_disease', () => {
test('alzheimer_s_disease: title matches GT', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('alzheimer\'s disease research');
});
test('alzheimer_s_disease: h1 "Alzheimer\'s Disease"', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Alzheimer\'s Disease' || t.startsWith('Alzheimer\'s Disease'))).toBeTruthy();
});
test('alzheimer_s_disease: h2 "SUBSCRIBE NOW AND SAVE 44% ON "', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SUBSCRIBE NOW AND SAVE 44% ON ALL-ACCESS PLANS!' || t.startsWith('SUBSCRIBE NOW AND SAVE 44% ON ALL-ACCESS PLANS!'))).toBeTruthy();
});
test('alzheimer_s_disease: header link "VeridaraV"', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('alzheimer_s_disease: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
test('alzheimer_s_disease: footer link "News"', async ({ page }) => {
await page.goto('/alzheimer-s-disease/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'News' || t.startsWith('News')), 'link text in footer').toBeTruthy();
});
});
test.describe('Functional - anxiety', () => {
test('anxiety: title matches GT', async ({ page }) => {
await page.goto('/anxiety/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('anxiety coverage');
});
test('anxiety: h2 "GET 44% OFF UNLIMITED SUBSCRIP"', async ({ page }) => {
await page.goto('/anxiety/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED SUBSCRIPTIONS. SAVE TODAY!' || t.startsWith('GET 44% OFF UNLIMITED SUBSCRIPTIONS. SAVE TODAY!'))).toBeTruthy();
});
test('anxiety: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/anxiety/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('anxiety: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/anxiety/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - autism', () => {
test('autism: title matches GT', async ({ page }) => {
await page.goto('/autism/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('autism research');
});
test('autism: h2 "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/autism/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. SAVE TODAY!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. SAVE TODAY!'))).toBeTruthy();
});
test('autism: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/autism/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('autism: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/autism/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - behavior', () => {
test('behavior: title matches GT', async ({ page }) => {
await page.goto('/behavior/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('behavior');
});
test('behavior: h2 "GET 44% OFF UNLIMITED SUBSCRIP"', async ({ page }) => {
await page.goto('/behavior/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED SUBSCRIPTIONS. SAVE NOW!' || t.startsWith('GET 44% OFF UNLIMITED SUBSCRIPTIONS. SAVE NOW!'))).toBeTruthy();
});
test('behavior: header link "VeridaraV"', async ({ page }) => {
await page.goto('/behavior/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('behavior: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/behavior/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - biology', () => {
test('biology: title matches GT', async ({ page }) => {
await page.goto('/biology/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('biology coverage');
});
test('biology: h2 "SAVE 44% ON UNLIMITED DIGITAL "', async ({ page }) => {
await page.goto('/biology/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON UNLIMITED DIGITAL ACCESS. JOIN NOW!' || t.startsWith('SAVE 44% ON UNLIMITED DIGITAL ACCESS. JOIN NOW!'))).toBeTruthy();
});
test('biology: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/biology/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('biology: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/biology/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - bird_flu', () => {
test('bird_flu: title matches GT', async ({ page }) => {
await page.goto('/bird-flu/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('bird flu coverage');
});
test('bird_flu: h2 "SAVE 44% ON A FULL-ACCESS MEMB"', async ({ page }) => {
await page.goto('/bird-flu/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON A FULL-ACCESS MEMBERSHIP. JOIN TODAY!' || t.startsWith('SAVE 44% ON A FULL-ACCESS MEMBERSHIP. JOIN TODAY!'))).toBeTruthy();
});
test('bird_flu: header link "VeridaraV"', async ({ page }) => {
await page.goto('/bird-flu/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('bird_flu: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/bird-flu/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - cancer', () => {
test('cancer: title matches GT', async ({ page }) => {
await page.goto('/cancer/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cancer research');
});
test('cancer: h2 "UNLOCK EVERY STORY AT 44% OFF."', async ({ page }) => {
await page.goto('/cancer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'UNLOCK EVERY STORY AT 44% OFF. SUBSCRIBE TODAY!' || t.startsWith('UNLOCK EVERY STORY AT 44% OFF. SUBSCRIBE TODAY!'))).toBeTruthy();
});
test('cancer: header link "VeridaraV"', async ({ page }) => {
await page.goto('/cancer/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('cancer: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/cancer/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - chemistry', () => {
test('chemistry: title matches GT', async ({ page }) => {
await page.goto('/chemistry/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('chemistry news');
});
test('chemistry: h2 "GET 44% OFF UNLIMITED ACCESS. "', async ({ page }) => {
await page.goto('/chemistry/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED ACCESS. SUBSCRIBE TODAY!' || t.startsWith('GET 44% OFF UNLIMITED ACCESS. SUBSCRIBE TODAY!'))).toBeTruthy();
});
test('chemistry: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/chemistry/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('chemistry: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/chemistry/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - cloning', () => {
test('cloning: title matches GT', async ({ page }) => {
await page.goto('/cloning/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('genomes');
});
test('cloning: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/cloning/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('cloning: header link "VeridaraV"', async ({ page }) => {
await page.goto('/cloning/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('cloning: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/cloning/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - coffee', () => {
test('coffee: title matches GT', async ({ page }) => {
await page.goto('/coffee/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('coffee science');
});
test('coffee: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/coffee/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('coffee: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/coffee/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('coffee: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/coffee/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - cognition', () => {
test('cognition: title matches GT', async ({ page }) => {
await page.goto('/cognition/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cognition');
});
test('cognition: h2 "GET 44% OFF ALL UNLIMITED MEMB"', async ({ page }) => {
await page.goto('/cognition/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL UNLIMITED MEMBERSHIPS. JOIN NOW!' || t.startsWith('GET 44% OFF ALL UNLIMITED MEMBERSHIPS. JOIN NOW!'))).toBeTruthy();
});
test('cognition: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/cognition/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('cognition: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/cognition/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - consciousness', () => {
test('consciousness: title matches GT', async ({ page }) => {
await page.goto('/consciousness/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('consciousness coverage');
});
test('consciousness: h2 "GET 40% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/consciousness/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 40% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 40% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('consciousness: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/consciousness/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('consciousness: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/consciousness/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - diet', () => {
test('diet: title matches GT', async ({ page }) => {
await page.goto('/diet/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('diet & nutrition');
});
test('diet: h1 "Diet"', async ({ page }) => {
await page.goto('/diet/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Diet' || t.startsWith('Diet'))).toBeTruthy();
});
test('diet: h2 "TAKE 44% OFF EVERY UNLIMITED P"', async ({ page }) => {
await page.goto('/diet/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'TAKE 44% OFF EVERY UNLIMITED PLAN. JOIN US NOW!' || t.startsWith('TAKE 44% OFF EVERY UNLIMITED PLAN. JOIN US NOW!'))).toBeTruthy();
});
test('diet: header link "VeridaraV"', async ({ page }) => {
await page.goto('/diet/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('diet: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/diet/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
test('diet: footer link "News"', async ({ page }) => {
await page.goto('/diet/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'News' || t.startsWith('News')), 'link text in footer').toBeTruthy();
});
});
test.describe('Functional - discussions', () => {
test('discussions: title matches GT', async ({ page }) => {
await page.goto('/discussions/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('community discussions');
});
test('discussions: h1 "Discussions"', async ({ page }) => {
await page.goto('/discussions/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Discussions' || t.startsWith('Discussions'))).toBeTruthy();
});
test('discussions: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/discussions/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('discussions: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/discussions/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world', () => {
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: title matches GT', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('can a shape that exists only in pure mat');
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: h1 "Can a shape that exists only i"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Can a shape that exists only in pure mathematics count as "real" if it could never be built anywhere' || t.startsWith('Can a shape that exists only in pure mathematics count as "real" if it could never be built anywhere'))).toBeTruthy();
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: h2 "Join This Conversation"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Join This Conversation' || t.startsWith('Join This Conversation'))).toBeTruthy();
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: h2 "Articles Behind This Thread"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Articles Behind This Thread' || t.startsWith('Articles Behind This Thread'))).toBeTruthy();
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: h2 "More Conversations"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More Conversations' || t.startsWith('More Conversations'))).toBeTruthy();
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('discussions_do_you_think_impossible_objects_from_mathematics_are_real_even_if_they_cant_be_constructed_in_our_world: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/discussions/do-you-think-impossible-objects-from-mathematics-are-real-even-if-they-cant-be-constructed-in-our-world/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have', () => {
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: title matches GT', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('which scientifically advanced gadget or ');
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: h1 "Which scientifically advanced "', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Which scientifically advanced gadget or prized possession would you most love to own?' || t.startsWith('Which scientifically advanced gadget or prized possession would you most love to own?'))).toBeTruthy();
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: h2 "Respond to This Discussion"', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Respond to This Discussion' || t.startsWith('Respond to This Discussion'))).toBeTruthy();
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: h2 "Stories in This Discussion"', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories in This Discussion' || t.startsWith('Stories in This Discussion'))).toBeTruthy();
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: h2 "More Discussions"', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More Discussions' || t.startsWith('More Discussions'))).toBeTruthy();
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('discussions_what_is_the_most_scientifically_advanced_gadget_or_other_possession_would_you_love_to_have: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/discussions/what-is-the-most-scientifically-advanced-gadget-or-other-possession-would-you-love-to-have/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - environment', () => {
test('environment: title matches GT', async ({ page }) => {
await page.goto('/environment/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('the environment');
});
test('environment: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/environment/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('environment: header link "Veridara Science NewsV"', async ({ page }) => {
await page.goto('/environment/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Science NewsV' || t.startsWith('Veridara Science NewsV')), 'link text in header').toBeTruthy();
});
test('environment: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/environment/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - games', () => {
test('games: title matches GT', async ({ page }) => {
await page.goto('/games/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veridara games');
});
test('games: h1 "Games"', async ({ page }) => {
await page.goto('/games/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Games' || t.startsWith('Games'))).toBeTruthy();
});
test('games: h2 "Logic Puzzles"', async ({ page }) => {
await page.goto('/games/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Logic Puzzles' || t.startsWith('Logic Puzzles'))).toBeTruthy();
});
test('games: h2 "Lettercraft"', async ({ page }) => {
await page.goto('/games/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Lettercraft' || t.startsWith('Lettercraft'))).toBeTruthy();
});
test('games: h2 "Discovery Crosswords"', async ({ page }) => {
await page.goto('/games/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Discovery Crosswords' || t.startsWith('Discovery Crosswords'))).toBeTruthy();
});
test('games: header link "Veridara DiscoveriesV"', async ({ page }) => {
await page.goto('/games/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara DiscoveriesV' || t.startsWith('Veridara DiscoveriesV')), 'link text in header').toBeTruthy();
});
test('games: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/games/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - games_math_puzzles_latest', () => {
test('games_math_puzzles_latest: title matches GT', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('math puzzle');
});
test('games_math_puzzles_latest: h1 "Math Puzzle: A careful partiti"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Math Puzzle: A careful partition' || t.startsWith('Math Puzzle: A careful partition'))).toBeTruthy();
});
test('games_math_puzzles_latest: h1 "Trending Stories"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Trending Stories' || t.startsWith('Trending Stories'))).toBeTruthy();
});
test('games_math_puzzles_latest: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('games_math_puzzles_latest: footer link "Anders Volkmar"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Anders Volkmar' || t.startsWith('Anders Volkmar')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('anders-volkmar')), 'href fragment present').toBeTruthy();
});
test('games_math_puzzles_latest: footer link "More by Anders Volkmar"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Anders Volkmar' || t.startsWith('More by Anders Volkmar')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('anders-volkmar')), 'href fragment present').toBeTruthy();
});
test('games_math_puzzles_latest: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/games/math-puzzles/latest/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - getsciam', () => {
test('getsciam: title matches GT', async ({ page }) => {
await page.goto('/getsciam/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('discover the ideas redefining our world');
});
test('getsciam: h1 "Explore the Ideas Reshaping Ou"', async ({ page }) => {
await page.goto('/getsciam/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Explore the Ideas Reshaping Our World' || t.startsWith('Explore the Ideas Reshaping Our World'))).toBeTruthy();
});
test('getsciam: h2 "Digital"', async ({ page }) => {
await page.goto('/getsciam/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Digital' || t.startsWith('Digital'))).toBeTruthy();
});
test('getsciam: h2 "Unlimited"', async ({ page }) => {
await page.goto('/getsciam/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Unlimited' || t.startsWith('Unlimited'))).toBeTruthy();
});
test('getsciam: h2 "Compare Plans"', async ({ page }) => {
await page.goto('/getsciam/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Compare Plans' || t.startsWith('Compare Plans'))).toBeTruthy();
});
test('getsciam: header link "VeridaraV"', async ({ page }) => {
await page.goto('/getsciam/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('getsciam: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/getsciam/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - getsciam_gift', () => {
test('getsciam_gift: title matches GT', async ({ page }) => {
await page.goto('/getsciam/gift/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veridara gift subscriptions');
});
test('getsciam_gift: h1 "Veridara Gift Subscriptions"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Gift Subscriptions' || t.startsWith('Veridara Gift Subscriptions'))).toBeTruthy();
});
test('getsciam_gift: h2 "Digital"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Digital' || t.startsWith('Digital'))).toBeTruthy();
});
test('getsciam_gift: h2 "Unlimited"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Unlimited' || t.startsWith('Unlimited'))).toBeTruthy();
});
test('getsciam_gift: h2 "Compare Plans"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Compare Plans' || t.startsWith('Compare Plans'))).toBeTruthy();
});
test('getsciam_gift: header link "VeridaraV"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('getsciam_gift: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/getsciam/gift/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - health', () => {
test('health: title matches GT', async ({ page }) => {
await page.goto('/health/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('health & medicine');
});
test('health: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/health/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('health: header link "VeridaraV"', async ({ page }) => {
await page.goto('/health/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('health: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/health/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - hiv', () => {
test('hiv: title matches GT', async ({ page }) => {
await page.goto('/hiv/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('hiv news');
});
test('hiv: h2 "SAVE 44% ON UNLIMITED ACCESS S"', async ({ page }) => {
await page.goto('/hiv/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON UNLIMITED ACCESS SUBSCRIPTIONS. JOIN' || t.startsWith('SAVE 44% ON UNLIMITED ACCESS SUBSCRIPTIONS. JOIN'))).toBeTruthy();
});
test('hiv: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/hiv/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('hiv: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/hiv/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - issue_sa_2026_05_01', () => {
test('issue_sa_2026_05_01: title matches GT', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veridara, volume 47, issue 3');
});
test('issue_sa_2026_05_01: h2 "May 2026"', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'May 2026' || t.startsWith('May 2026'))).toBeTruthy();
});
test('issue_sa_2026_05_01: h2 "Features"', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Features' || t.startsWith('Features'))).toBeTruthy();
});
test('issue_sa_2026_05_01: h2 "Field Notes"', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Field Notes' || t.startsWith('Field Notes'))).toBeTruthy();
});
test('issue_sa_2026_05_01: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('issue_sa_2026_05_01: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/issue/sa/2026/05-01/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - issue_special_editions_2026_03_03', () => {
test('issue_special_editions_2026_03_03: title matches GT', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veridara special editions volume 35, iss');
});
test('issue_special_editions_2026_03_03: h1 "VD Special Editions"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VD Special Editions' || t.startsWith('VD Special Editions'))).toBeTruthy();
});
test('issue_special_editions_2026_03_03: h2 "March 2026"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'March 2026' || t.startsWith('March 2026'))).toBeTruthy();
});
test('issue_special_editions_2026_03_03: h2 "Featured"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Featured' || t.startsWith('Featured'))).toBeTruthy();
});
test('issue_special_editions_2026_03_03: h2 "Departments"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Departments' || t.startsWith('Departments'))).toBeTruthy();
});
test('issue_special_editions_2026_03_03: header link "VeridaraV"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('issue_special_editions_2026_03_03: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/issue/special-editions/2026/03-03/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - issues', () => {
test('issues: title matches GT', async ({ page }) => {
await page.goto('/issues/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('back issues archive');
});
test('issues: h1 "Archive"', async ({ page }) => {
await page.goto('/issues/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Archive' || t.startsWith('Archive'))).toBeTruthy();
});
test('issues: h2 "2025-2027"', async ({ page }) => {
await page.goto('/issues/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '2025-2027' || t.startsWith('2025-2027'))).toBeTruthy();
});
test('issues: h3 "Veridara Magazine"', async ({ page }) => {
await page.goto('/issues/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Magazine' || t.startsWith('Veridara Magazine'))).toBeTruthy();
});
test('issues: h3 "Special Edition"', async ({ page }) => {
await page.goto('/issues/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Special Edition' || t.startsWith('Special Edition'))).toBeTruthy();
});
test('issues: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/issues/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('issues: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/issues/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - latest', () => {
test('latest: title matches GT', async ({ page }) => {
await page.goto('/latest/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('latest science');
});
test('latest: h1 "Recent Stories"', async ({ page }) => {
await page.goto('/latest/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recent Stories' || t.startsWith('Recent Stories'))).toBeTruthy();
});
test('latest: header link "VeridaraV"', async ({ page }) => {
await page.goto('/latest/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('latest: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/latest/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - math', () => {
test('math: title matches GT', async ({ page }) => {
await page.goto('/math/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('math stories');
});
test('math: h1 "Math"', async ({ page }) => {
await page.goto('/math/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Math' || t.startsWith('Math'))).toBeTruthy();
});
test('math: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/math/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('math: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/math/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('math: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/math/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - mediakit', () => {
test('mediakit: title matches GT', async ({ page }) => {
await page.goto('/mediakit/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('home');
});
test('mediakit: h1 "Mediakit"', async ({ page }) => {
await page.goto('/mediakit/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Mediakit' || t.startsWith('Mediakit'))).toBeTruthy();
});
test('mediakit: h2 "Home"', async ({ page }) => {
await page.goto('/mediakit/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Home' || t.startsWith('Home'))).toBeTruthy();
});
test('mediakit: header link "Mediakit"', async ({ page }) => {
await page.goto('/mediakit/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Mediakit' || t.startsWith('Mediakit')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('mediakit')), 'href fragment present').toBeTruthy();
});
test('mediakit: nav link "Download Media Kit"', async ({ page }) => {
await page.goto('/mediakit/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Download Media Kit' || t.startsWith('Download Media Kit')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('2026-sciam-media-kit.pdf')), 'href fragment present').toBeTruthy();
});
test('mediakit: nav link "Privacy Policy"', async ({ page }) => {
await page.goto('/mediakit/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Privacy Policy' || t.startsWith('Privacy Policy')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('privacy-policy')), 'href fragment present').toBeTruthy();
});
test('mediakit: footer link "RSS"', async ({ page }) => {
await page.goto('/mediakit/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'RSS' || t.startsWith('RSS')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('sitemap')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - mind_and_brain', () => {
test('mind_and_brain: title matches GT', async ({ page }) => {
await page.goto('/mind-and-brain/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('mind & brain');
});
test('mind_and_brain: h2 "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/mind-and-brain/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('mind_and_brain: header link "The Veridara ReportV"', async ({ page }) => {
await page.goto('/mind-and-brain/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Veridara ReportV' || t.startsWith('The Veridara ReportV')), 'link text in header').toBeTruthy();
});
test('mind_and_brain: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/mind-and-brain/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_about_scientific_american', () => {
test('page_about_scientific_american: title matches GT', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('about veridara');
});
test('page_about_scientific_american: h1 "About Veridara Science"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'About Veridara Science' || t.startsWith('About Veridara Science'))).toBeTruthy();
});
test('page_about_scientific_american: h2 "Related"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Related' || t.startsWith('Related'))).toBeTruthy();
});
test('page_about_scientific_american: header link "VeridaraV"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('page_about_scientific_american: nav link "About"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'About' || t.startsWith('About')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('about-scientific-american')), 'href fragment present').toBeTruthy();
});
test('page_about_scientific_american: nav link "Masthead"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Masthead' || t.startsWith('Masthead')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('masthead')), 'href fragment present').toBeTruthy();
});
test('page_about_scientific_american: nav link "Standards and Ethics"', async ({ page }) => {
await page.goto('/page/about-scientific-american/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Standards and Ethics' || t.startsWith('Standards and Ethics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('standards-and-ethics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_contact_us_customer_service', () => {
test('page_contact_us_customer_service: title matches GT', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('get in touch');
});
test('page_contact_us_customer_service: h1 "General Contact Details"', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'General Contact Details' || t.startsWith('General Contact Details'))).toBeTruthy();
});
test('page_contact_us_customer_service: h1 "Content Permissions"', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Content Permissions' || t.startsWith('Content Permissions'))).toBeTruthy();
});
test('page_contact_us_customer_service: h1 "Customer Service"', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Customer Service' || t.startsWith('Customer Service'))).toBeTruthy();
});
test('page_contact_us_customer_service: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('page_contact_us_customer_service: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/contact-us/customer-service/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_international', () => {
test('page_international: title matches GT', async ({ page }) => {
await page.goto('/page/international/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('international editions');
});
test('page_international: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/page/international/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('page_international: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/international/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_privacy_policy', () => {
test('page_privacy_policy: title matches GT', async ({ page }) => {
await page.goto('/page/privacy-policy/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('privacy policy');
});
test('page_privacy_policy: h1 "Privacy Notice"', async ({ page }) => {
await page.goto('/page/privacy-policy/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Privacy Notice' || t.startsWith('Privacy Notice'))).toBeTruthy();
});
test('page_privacy_policy: header link "Veridara Media GroupV"', async ({ page }) => {
await page.goto('/page/privacy-policy/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Media GroupV' || t.startsWith('Veridara Media GroupV')), 'link text in header').toBeTruthy();
});
test('page_privacy_policy: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/privacy-policy/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_return_refund_policy', () => {
test('page_return_refund_policy: title matches GT', async ({ page }) => {
await page.goto('/page/return-refund-policy/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('return & refund policy');
});
test('page_return_refund_policy: header link "VeridaraV"', async ({ page }) => {
await page.goto('/page/return-refund-policy/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('page_return_refund_policy: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/return-refund-policy/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_terms_of_use', () => {
test('page_terms_of_use: title matches GT', async ({ page }) => {
await page.goto('/page/terms-of-use/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('terms of use');
});
test('page_terms_of_use: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/page/terms-of-use/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('page_terms_of_use: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/terms-of-use/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - page_us_state_privacy_rights', () => {
test('page_us_state_privacy_rights: title matches GT', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('us state privacy rights');
});
test('page_us_state_privacy_rights: h2 "1. HOW WE COLLECT AND USE YOUR"', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '1. HOW WE COLLECT AND USE YOUR PERSONAL INFORMATION' || t.startsWith('1. HOW WE COLLECT AND USE YOUR PERSONAL INFORMATION'))).toBeTruthy();
});
test('page_us_state_privacy_rights: h2 "2. SOURCES OF YOUR PERSONAL IN"', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '2. SOURCES OF YOUR PERSONAL INFORMATION' || t.startsWith('2. SOURCES OF YOUR PERSONAL INFORMATION'))).toBeTruthy();
});
test('page_us_state_privacy_rights: h2 "3. SELLING OR SHARING PERSONAL"', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '3. SELLING OR SHARING PERSONAL INFORMATION' || t.startsWith('3. SELLING OR SHARING PERSONAL INFORMATION'))).toBeTruthy();
});
test('page_us_state_privacy_rights: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('page_us_state_privacy_rights: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/page/us-state-privacy-rights/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - pain', () => {
test('pain: title matches GT', async ({ page }) => {
await page.goto('/pain/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('pain');
});
test('pain: h2 "GET 40% OFF UNLIMITED SUBSCRIP"', async ({ page }) => {
await page.goto('/pain/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 40% OFF UNLIMITED SUBSCRIPTIONS. JOIN TODAY!' || t.startsWith('GET 40% OFF UNLIMITED SUBSCRIPTIONS. JOIN TODAY!'))).toBeTruthy();
});
test('pain: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/pain/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('pain: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/pain/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science', () => {
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('25 years of fauveon');
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: h1 "The fans who went from collect"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The fans who went from collecting Fauveon to studying bugs and fossils' || t.startsWith('The fans who went from collecting Fauveon to studying bugs and fossils'))).toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: h1 "Popular Stories"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Popular Stories' || t.startsWith('Popular Stories'))).toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: h2 "Why We Must Stand Behind Scien"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Why We Must Stand Behind Science' || t.startsWith('Why We Must Stand Behind Science'))).toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: header link "VeridaraV"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: header link "SAVE 44% ON A FULL-YEAR MEMBER"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON A FULL-YEAR MEMBERSHIP. JOIN TODAY!' || t.startsWith('SAVE 44% ON A FULL-YEAR MEMBERSHIP. JOIN TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: footer link "Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marisol Ferrante' || t.startsWith('Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_30_years_of_pokemon_how_the_japanese_franchise_mirrors_real_world_science: footer link "More by Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/30-years-of-pokemon-how-the-japanese-franchise-mirrors-real-world-science/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Marisol Ferrante' || t.startsWith('More by Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities', () => {
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('public health specialists sound the alar');
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: h1 "Specialists caution that many "', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Specialists caution that many communities badly underrate the threat.' || t.startsWith('Specialists caution that many communities badly underrate the threat.'))).toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: h1 "Trending Stories"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Trending Stories' || t.startsWith('Trending Stories'))).toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: h2 "Now Is the Moment to Defend Sc"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Now Is the Moment to Defend Science' || t.startsWith('Now Is the Moment to Defend Science'))).toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: header link "VeridaraV"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: header link "SAVE 44% ON EVERY UNLIMITED ME"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON EVERY UNLIMITED MEMBERSHIP TODAY!' || t.startsWith('SAVE 44% ON EVERY UNLIMITED MEMBERSHIP TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: footer link "Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marisol Ferrante' || t.startsWith('Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_health_experts_warn_of_rising_measles_cases_in_undervaccinated_communities: footer link "More by Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/health-experts-warn-of-rising-measles-cases-in-undervaccinated-communities/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Marisol Ferrante' || t.startsWith('More by Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the', () => {
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('the odyssey ii mission worked');
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: h1 "Odyssey proves OSSA can return"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Odyssey proves OSSA can return to the moon. Now comes the hard question: Why?' || t.startsWith('Odyssey proves OSSA can return to the moon. Now comes the hard question: Why?'))).toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: h1 "Popular Stories"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Popular Stories' || t.startsWith('Popular Stories'))).toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: h2 "More From This Report"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More From This Report' || t.startsWith('More From This Report'))).toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: h2 "Now Is the Moment to Back Scie"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Now Is the Moment to Back Science' || t.startsWith('Now Is the Moment to Back Science'))).toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: header link "VeridaraV"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: header link "GET 44% OFF ALL DIGITAL MEMBER"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL DIGITAL MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF ALL DIGITAL MEMBERSHIPS. JOIN TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: footer link "Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marisol Ferrante' || t.startsWith('Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_the_artemis_ii_mission_worked_but_should_we_really_keep_returning_to_the: footer link "More by Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/the-artemis-ii-mission-worked-but-should-we-really-keep-returning-to-the/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Marisol Ferrante' || t.startsWith('More by Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind', () => {
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('this sci');
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: h1 "Marlowe Vance talks cosmic wha"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marlowe Vance talks cosmic whales, AI and reinventing a classic' || t.startsWith('Marlowe Vance talks cosmic whales, AI and reinventing a classic'))).toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: h1 "Popular Stories"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Popular Stories' || t.startsWith('Popular Stories'))).toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: h2 "Now Is the Moment to Defend Sc"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Now Is the Moment to Defend Science' || t.startsWith('Now Is the Moment to Defend Science'))).toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: header link "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: footer link "Nora Valente"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Nora Valente' || t.startsWith('Nora Valente')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('brianne-kane')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_this_sci_fi_twist_on_moby_dick_will_blow_your_mind: footer link "More by Nora Valente"', async ({ page }) => {
await page.goto('/podcast/episode/this-sci-fi-twist-on-moby-dick-will-blow-your-mind/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Nora Valente' || t.startsWith('More by Nora Valente')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('brianne-kane')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day', () => {
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('how birds became the sole dinosaurs to e');
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: h1 "The dinosaurs outside your win"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The dinosaurs outside your window: how birds pulled through the asteroid that doomed all the rest' || t.startsWith('The dinosaurs outside your window: how birds pulled through the asteroid that doomed all the rest'))).toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: h1 "Top Stories Now"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Top Stories Now' || t.startsWith('Top Stories Now'))).toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: h2 "Stand With Science When It Mat"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stand With Science When It Matters' || t.startsWith('Stand With Science When It Matters'))).toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: header link "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: footer link "Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marisol Ferrante' || t.startsWith('Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_why_birds_were_the_only_dinosaurs_to_survive_earths_worst_day: footer link "More by Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/why-birds-were-the-only-dinosaurs-to-survive-earths-worst-day/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Marisol Ferrante' || t.startsWith('More by Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - pressroom', () => {
test('pressroom: title matches GT', async ({ page }) => {
await page.goto('/pressroom/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('press & media center');
});
test('pressroom: h1 "Pressroom"', async ({ page }) => {
await page.goto('/pressroom/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Pressroom' || t.startsWith('Pressroom'))).toBeTruthy();
});
test('pressroom: h2 "Media Inquiries"', async ({ page }) => {
await page.goto('/pressroom/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Media Inquiries' || t.startsWith('Media Inquiries'))).toBeTruthy();
});
test('pressroom: h2 "Expert Directory"', async ({ page }) => {
await page.goto('/pressroom/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Expert Directory' || t.startsWith('Expert Directory'))).toBeTruthy();
});
test('pressroom: h2 "Press Releases"', async ({ page }) => {
await page.goto('/pressroom/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Press Releases' || t.startsWith('Press Releases'))).toBeTruthy();
});
test('pressroom: header link "Veridara NewsroomV"', async ({ page }) => {
await page.goto('/pressroom/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara NewsroomV' || t.startsWith('Veridara NewsroomV')), 'link text in header').toBeTruthy();
});
test('pressroom: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/pressroom/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - reports', () => {
test('reports: title matches GT', async ({ page }) => {
await page.goto('/reports/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('reports & features');
});
test('reports: h2 "The Science of Flight"', async ({ page }) => {
await page.goto('/reports/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Science of Flight' || t.startsWith('The Science of Flight'))).toBeTruthy();
});
test('reports: h2 "Innovations In: Liver Disease"', async ({ page }) => {
await page.goto('/reports/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Innovations In: Liver Disease' || t.startsWith('Innovations In: Liver Disease'))).toBeTruthy();
});
test('reports: h2 "The Science of Zero"', async ({ page }) => {
await page.goto('/reports/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Science of Zero' || t.startsWith('The Science of Zero'))).toBeTruthy();
});
test('reports: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/reports/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('reports: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/reports/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - section_opinion', () => {
test('section_opinion: title matches GT', async ({ page }) => {
await page.goto('/section/opinion/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('opinion & analysis');
});
test('section_opinion: h1 "Opinion"', async ({ page }) => {
await page.goto('/section/opinion/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Opinion' || t.startsWith('Opinion'))).toBeTruthy();
});
test('section_opinion: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/section/opinion/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('section_opinion: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/section/opinion/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - social_sciences', () => {
test('social_sciences: title matches GT', async ({ page }) => {
await page.goto('/social-sciences/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('social sciences');
});
test('social_sciences: h2 "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/social-sciences/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('social_sciences: header link "VeridaraV"', async ({ page }) => {
await page.goto('/social-sciences/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('social_sciences: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/social-sciences/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - space_and_physics', () => {
test('space_and_physics: title matches GT', async ({ page }) => {
await page.goto('/space-and-physics/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('space & physics');
});
test('space_and_physics: h2 "SAVE 44% ON EVERY UNLIMITED ME"', async ({ page }) => {
await page.goto('/space-and-physics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON EVERY UNLIMITED MEMBERSHIP. ACT NOW!' || t.startsWith('SAVE 44% ON EVERY UNLIMITED MEMBERSHIP. ACT NOW!'))).toBeTruthy();
});
test('space_and_physics: header link "VeridaraV"', async ({ page }) => {
await page.goto('/space-and-physics/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('space_and_physics: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/space-and-physics/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - standards_and_ethics', () => {
test('standards_and_ethics: title matches GT', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('editorial standards and ethics');
});
test('standards_and_ethics: h1 "Standards and Ethics"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Standards and Ethics' || t.startsWith('Standards and Ethics'))).toBeTruthy();
});
test('standards_and_ethics: h2 "Related"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Related' || t.startsWith('Related'))).toBeTruthy();
});
test('standards_and_ethics: h2 "Our Mission"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Our Mission' || t.startsWith('Our Mission'))).toBeTruthy();
});
test('standards_and_ethics: h2 "Ethics and Transparency"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Ethics and Transparency' || t.startsWith('Ethics and Transparency'))).toBeTruthy();
});
test('standards_and_ethics: header link "VeridaraV"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('standards_and_ethics: nav link "About"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'About' || t.startsWith('About')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('about-scientific-american')), 'href fragment present').toBeTruthy();
});
test('standards_and_ethics: nav link "Masthead"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Masthead' || t.startsWith('Masthead')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('masthead')), 'href fragment present').toBeTruthy();
});
test('standards_and_ethics: nav link "Standards and Ethics"', async ({ page }) => {
await page.goto('/standards-and-ethics/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Standards and Ethics' || t.startsWith('Standards and Ethics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('standards-and-ethics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - technology', () => {
test('technology: title matches GT', async ({ page }) => {
await page.goto('/technology/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('technology');
});
test('technology: h2 "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/technology/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN TODAY!'))).toBeTruthy();
});
test('technology: header link "VeridaraV"', async ({ page }) => {
await page.goto('/technology/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('technology: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/technology/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - travel', () => {
test('travel: title matches GT', async ({ page }) => {
await page.goto('/travel/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('upcoming departures');
});
test('travel: h1 "2027 Total Eclipse Egyptian Vo"', async ({ page }) => {
await page.goto('/travel/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '2027 Total Eclipse Egyptian Voyage' || t.startsWith('2027 Total Eclipse Egyptian Voyage'))).toBeTruthy();
});
test('travel: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/travel/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('travel: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/travel/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - videos', () => {
test('videos: title matches GT', async ({ page }) => {
await page.goto('/videos/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('videos');
});
test('videos: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/videos/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('videos: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/videos/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - article_how_to_build_a_space_hotel', () => {
test('article_how_to_build_a_space_hotel: title matches GT', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('how to engineer a luxury space hotel');
});
test('article_how_to_build_a_space_hotel: h1 "Space hotels are almost here"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Space hotels are almost here' || t.startsWith('Space hotels are almost here'))).toBeTruthy();
});
test('article_how_to_build_a_space_hotel: h1 "Featured Stories"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Featured Stories' || t.startsWith('Featured Stories'))).toBeTruthy();
});
test('article_how_to_build_a_space_hotel: h2 "Recommended Reading"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Reading' || t.startsWith('Recommended Reading'))).toBeTruthy();
});
test('article_how_to_build_a_space_hotel: h2 "Now Is the Moment to Defend Sc"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Now Is the Moment to Defend Science' || t.startsWith('Now Is the Moment to Defend Science'))).toBeTruthy();
});
test('article_how_to_build_a_space_hotel: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('article_how_to_build_a_space_hotel: header link "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!' || t.startsWith('GET 44% OFF ALL-ACCESS MEMBERSHIPS. JOIN NOW!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('article_how_to_build_a_space_hotel: footer link "Cassandra Whitfield"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cassandra Whitfield' || t.startsWith('Cassandra Whitfield')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('jonathan-ocallaghan')), 'href fragment present').toBeTruthy();
});
test('article_how_to_build_a_space_hotel: footer link "More from Cassandra Whitfield"', async ({ page }) => {
await page.goto('/article/how-to-build-a-space-hotel/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More from Cassandra Whitfield' || t.startsWith('More from Cassandra Whitfield')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('jonathan-ocallaghan')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface', () => {
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: title matches GT', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('distant orbiter tracks a mysterious tide');
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: h1 "What is this swift-moving band"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'What is this swift-moving band of shadow drifting across Kael?' || t.startsWith('What is this swift-moving band of shadow drifting across Kael?'))).toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: h1 "Popular Stories"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Popular Stories' || t.startsWith('Popular Stories'))).toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: h2 "The Case for Championing Scien"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Case for Championing Science' || t.startsWith('The Case for Championing Science'))).toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: header link "GET 44% OFF UNLIMITED MEMBERSH"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!' || t.startsWith('GET 44% OFF UNLIMITED MEMBERSHIPS. JOIN TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: footer link "Nadia Whitlock"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Nadia Whitlock' || t.startsWith('Nadia Whitlock')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('joseph-howlett')), 'href fragment present').toBeTruthy();
});
test('article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface: footer link "More by Nadia Whitlock"', async ({ page }) => {
await page.goto('/article/mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Nadia Whitlock' || t.startsWith('More by Nadia Whitlock')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('joseph-howlett')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_alex_sugiura', () => {
test('author_alex_sugiura: title matches GT', async ({ page }) => {
await page.goto('/author/alex-sugiura/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by devin marlowe');
});
test('author_alex_sugiura: h1 "Stories by Devin Marlowe"', async ({ page }) => {
await page.goto('/author/alex-sugiura/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Devin Marlowe' || t.startsWith('Stories by Devin Marlowe'))).toBeTruthy();
});
test('author_alex_sugiura: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/alex-sugiura/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_alex_sugiura: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/alex-sugiura/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_andrea_thompson', () => {
test('author_andrea_thompson: title matches GT', async ({ page }) => {
await page.goto('/author/andrea-thompson/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by elena marchetti');
});
test('author_andrea_thompson: h1 "Stories by Elena Marchetti"', async ({ page }) => {
await page.goto('/author/andrea-thompson/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Elena Marchetti' || t.startsWith('Stories by Elena Marchetti'))).toBeTruthy();
});
test('author_andrea_thompson: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/author/andrea-thompson/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('author_andrea_thompson: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/andrea-thompson/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_claire_cameron', () => {
test('author_claire_cameron: title matches GT', async ({ page }) => {
await page.goto('/author/claire-cameron/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by mara ellison');
});
test('author_claire_cameron: h1 "Stories by Mara Ellison"', async ({ page }) => {
await page.goto('/author/claire-cameron/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Mara Ellison' || t.startsWith('Stories by Mara Ellison'))).toBeTruthy();
});
test('author_claire_cameron: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/author/claire-cameron/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('author_claire_cameron: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/claire-cameron/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_cody_cottier', () => {
test('author_cody_cottier: title matches GT', async ({ page }) => {
await page.goto('/author/cody-cottier/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by rowan halsey');
});
test('author_cody_cottier: h1 "Stories by Rowan Halsey"', async ({ page }) => {
await page.goto('/author/cody-cottier/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Rowan Halsey' || t.startsWith('Stories by Rowan Halsey'))).toBeTruthy();
});
test('author_cody_cottier: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/cody-cottier/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_cody_cottier: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/cody-cottier/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_dan_vergano', () => {
test('author_dan_vergano: title matches GT', async ({ page }) => {
await page.goto('/author/dan-vergano/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by nina alvaro');
});
test('author_dan_vergano: h1 "Stories by Nina Alvaro"', async ({ page }) => {
await page.goto('/author/dan-vergano/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Nina Alvaro' || t.startsWith('Stories by Nina Alvaro'))).toBeTruthy();
});
test('author_dan_vergano: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/dan-vergano/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_dan_vergano: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/dan-vergano/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_eric_sullivan', () => {
test('author_eric_sullivan: title matches GT', async ({ page }) => {
await page.goto('/author/eric-sullivan/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('articles by dana whitmore');
});
test('author_eric_sullivan: h1 "Stories by Dana Whitmore"', async ({ page }) => {
await page.goto('/author/eric-sullivan/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Dana Whitmore' || t.startsWith('Stories by Dana Whitmore'))).toBeTruthy();
});
test('author_eric_sullivan: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/author/eric-sullivan/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('author_eric_sullivan: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/eric-sullivan/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_jackie_flynn_mogensen', () => {
test('author_jackie_flynn_mogensen: title matches GT', async ({ page }) => {
await page.goto('/author/jackie-flynn-mogensen/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by dana rourke whitfield');
});
test('author_jackie_flynn_mogensen: h1 "Stories by Dana Rourke Whitfie"', async ({ page }) => {
await page.goto('/author/jackie-flynn-mogensen/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Dana Rourke Whitfield' || t.startsWith('Stories by Dana Rourke Whitfield'))).toBeTruthy();
});
test('author_jackie_flynn_mogensen: header link "Veridara SciencesV"', async ({ page }) => {
await page.goto('/author/jackie-flynn-mogensen/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara SciencesV' || t.startsWith('Veridara SciencesV')), 'link text in header').toBeTruthy();
});
test('author_jackie_flynn_mogensen: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/jackie-flynn-mogensen/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_jeanna_bryner', () => {
test('author_jeanna_bryner: title matches GT', async ({ page }) => {
await page.goto('/author/jeanna-bryner/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by marisol vance');
});
test('author_jeanna_bryner: h1 "Stories by Marisol Vance"', async ({ page }) => {
await page.goto('/author/jeanna-bryner/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Marisol Vance' || t.startsWith('Stories by Marisol Vance'))).toBeTruthy();
});
test('author_jeanna_bryner: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/jeanna-bryner/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_jeanna_bryner: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/jeanna-bryner/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_jonathan_ocallaghan', () => {
test('author_jonathan_ocallaghan: title matches GT', async ({ page }) => {
await page.goto('/author/jonathan-ocallaghan/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by cassandra whitfield');
});
test('author_jonathan_ocallaghan: h1 "Stories by Cassandra Whitfield"', async ({ page }) => {
await page.goto('/author/jonathan-ocallaghan/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Cassandra Whitfield' || t.startsWith('Stories by Cassandra Whitfield'))).toBeTruthy();
});
test('author_jonathan_ocallaghan: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/jonathan-ocallaghan/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_jonathan_ocallaghan: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/jonathan-ocallaghan/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_joseph_howlett', () => {
test('author_joseph_howlett: title matches GT', async ({ page }) => {
await page.goto('/author/joseph-howlett/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('articles by nadia whitlock');
});
test('author_joseph_howlett: h1 "Stories by Nadia Whitlock"', async ({ page }) => {
await page.goto('/author/joseph-howlett/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Nadia Whitlock' || t.startsWith('Stories by Nadia Whitlock'))).toBeTruthy();
});
test('author_joseph_howlett: header link "Veridara NewsroomV"', async ({ page }) => {
await page.goto('/author/joseph-howlett/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara NewsroomV' || t.startsWith('Veridara NewsroomV')), 'link text in header').toBeTruthy();
});
test('author_joseph_howlett: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/joseph-howlett/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_k_r_callaway', () => {
test('author_k_r_callaway: title matches GT', async ({ page }) => {
await page.goto('/author/k-r-callaway/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by t. l. ravenna');
});
test('author_k_r_callaway: h1 "Stories by T. L. Ravenna"', async ({ page }) => {
await page.goto('/author/k-r-callaway/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by T. L. Ravenna' || t.startsWith('Stories by T. L. Ravenna'))).toBeTruthy();
});
test('author_k_r_callaway: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/k-r-callaway/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_k_r_callaway: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/k-r-callaway/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_kate_wong', () => {
test('author_kate_wong: title matches GT', async ({ page }) => {
await page.goto('/author/kate-wong/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by kira vale');
});
test('author_kate_wong: h1 "Stories by Kira Vale"', async ({ page }) => {
await page.goto('/author/kate-wong/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Kira Vale' || t.startsWith('Stories by Kira Vale'))).toBeTruthy();
});
test('author_kate_wong: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/kate-wong/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_kate_wong: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/kate-wong/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_kendra_pierre_louis', () => {
test('author_kendra_pierre_louis: title matches GT', async ({ page }) => {
await page.goto('/author/kendra-pierre-louis/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by marisol ferrante');
});
test('author_kendra_pierre_louis: h1 "Stories by Marisol Ferrante"', async ({ page }) => {
await page.goto('/author/kendra-pierre-louis/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Marisol Ferrante' || t.startsWith('Stories by Marisol Ferrante'))).toBeTruthy();
});
test('author_kendra_pierre_louis: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/kendra-pierre-louis/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_kendra_pierre_louis: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/kendra-pierre-louis/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_lee_billings', () => {
test('author_lee_billings: title matches GT', async ({ page }) => {
await page.goto('/author/lee-billings/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by nora vasquez');
});
test('author_lee_billings: h1 "Stories by Nora Vasquez"', async ({ page }) => {
await page.goto('/author/lee-billings/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Nora Vasquez' || t.startsWith('Stories by Nora Vasquez'))).toBeTruthy();
});
test('author_lee_billings: header link "Veridara Science NewsV"', async ({ page }) => {
await page.goto('/author/lee-billings/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara Science NewsV' || t.startsWith('Veridara Science NewsV')), 'link text in header').toBeTruthy();
});
test('author_lee_billings: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/lee-billings/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_naeem_amarsy', () => {
test('author_naeem_amarsy: title matches GT', async ({ page }) => {
await page.goto('/author/naeem-amarsy/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by rowan vashti');
});
test('author_naeem_amarsy: h1 "Stories by Rowan Vashti"', async ({ page }) => {
await page.goto('/author/naeem-amarsy/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Rowan Vashti' || t.startsWith('Stories by Rowan Vashti'))).toBeTruthy();
});
test('author_naeem_amarsy: header link "VeridaraV"', async ({ page }) => {
await page.goto('/author/naeem-amarsy/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('author_naeem_amarsy: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/naeem-amarsy/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_steven_melendez', () => {
test('author_steven_melendez: title matches GT', async ({ page }) => {
await page.goto('/author/steven-melendez/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('articles by marlowe renton');
});
test('author_steven_melendez: h1 "Stories by Marlowe Renton"', async ({ page }) => {
await page.goto('/author/steven-melendez/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Marlowe Renton' || t.startsWith('Stories by Marlowe Renton'))).toBeTruthy();
});
test('author_steven_melendez: header link "Veridara ScienceV"', async ({ page }) => {
await page.goto('/author/steven-melendez/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara ScienceV' || t.startsWith('Veridara ScienceV')), 'link text in header').toBeTruthy();
});
test('author_steven_melendez: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/steven-melendez/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_sushmita_pathak', () => {
test('author_sushmita_pathak: title matches GT', async ({ page }) => {
await page.goto('/author/sushmita-pathak/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by mira castellano');
});
test('author_sushmita_pathak: h1 "Stories by Mira Castellano"', async ({ page }) => {
await page.goto('/author/sushmita-pathak/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Mira Castellano' || t.startsWith('Stories by Mira Castellano'))).toBeTruthy();
});
test('author_sushmita_pathak: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/sushmita-pathak/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_sushmita_pathak: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/sushmita-pathak/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - author_tanya_lewis', () => {
test('author_tanya_lewis: title matches GT', async ({ page }) => {
await page.goto('/author/tanya-lewis/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('stories by elena sorenson');
});
test('author_tanya_lewis: h1 "Stories by Elena Sorenson"', async ({ page }) => {
await page.goto('/author/tanya-lewis/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stories by Elena Sorenson' || t.startsWith('Stories by Elena Sorenson'))).toBeTruthy();
});
test('author_tanya_lewis: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/author/tanya-lewis/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('author_tanya_lewis: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/author/tanya-lewis/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - podcast_episode_why_do_we_have_chins_researchers_may_finally_know', () => {
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: title matches GT', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('why do humans have chins? scientists may');
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: h1 "The chin is an evolutionary ri"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The chin is an evolutionary riddle. Scientists may have finally cracked it' || t.startsWith('The chin is an evolutionary riddle. Scientists may have finally cracked it'))).toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: h1 "Trending Reads"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Trending Reads' || t.startsWith('Trending Reads'))).toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: h2 "Now Is the Moment to Back Scie"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Now Is the Moment to Back Science' || t.startsWith('Now Is the Moment to Back Science'))).toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: header link "VeridaraV"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: header link "SAVE 44% ON EVERY UNLIMITED ME"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'SAVE 44% ON EVERY UNLIMITED MEMBERSHIP TODAY!' || t.startsWith('SAVE 44% ON EVERY UNLIMITED MEMBERSHIP TODAY!')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('getsciam')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: footer link "Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Marisol Ferrante' || t.startsWith('Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
test('podcast_episode_why_do_we_have_chins_researchers_may_finally_know: footer link "More by Marisol Ferrante"', async ({ page }) => {
await page.goto('/podcast/episode/why-do-we-have-chins-researchers-may-finally-know/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Marisol Ferrante' || t.startsWith('More by Marisol Ferrante')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('kendra-pierre-louis')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - report_the_science_of_luxury', () => {
test('report_the_science_of_luxury: title matches GT', async ({ page }) => {
await page.goto('/report/the-science-of-luxury/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('the hidden science of luxury goods');
});
test('report_the_science_of_luxury: h1 "The Science of Opulence"', async ({ page }) => {
await page.goto('/report/the-science-of-luxury/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Science of Opulence' || t.startsWith('The Science of Opulence'))).toBeTruthy();
});
test('report_the_science_of_luxury: header link "VeridaraV"', async ({ page }) => {
await page.goto('/report/the-science-of-luxury/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'VeridaraV' || t.startsWith('VeridaraV')), 'link text in header').toBeTruthy();
});
test('report_the_science_of_luxury: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/report/the-science-of-luxury/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - blog_life_unbounded_mars_and_the_waves_of_darkening', () => {
test('blog_life_unbounded_mars_and_the_waves_of_darkening: title matches GT', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('the shadow tides of a distant red world');
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: h1 "The Shadow Tides of a Red Worl"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Shadow Tides of a Red World' || t.startsWith('The Shadow Tides of a Red World'))).toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: h1 "Popular Stories"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Popular Stories' || t.startsWith('Popular Stories'))).toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: h2 "Recommended Stories"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Recommended Stories' || t.startsWith('Recommended Stories'))).toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: h2 "It\'s Time to Speak Up for Scie"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'It\'s Time to Speak Up for Science' || t.startsWith('It\'s Time to Speak Up for Science'))).toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: header link "Veridara MagazineV"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veridara MagazineV' || t.startsWith('Veridara MagazineV')), 'link text in header').toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: footer link "Ilya R. Bennett"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Ilya R. Bennett' || t.startsWith('Ilya R. Bennett')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('caleb-a-scharf')), 'href fragment present').toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: footer link "More by Ilya R. Bennett"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More by Ilya R. Bennett' || t.startsWith('More by Ilya R. Bennett')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('caleb-a-scharf')), 'href fragment present').toBeTruthy();
});
test('blog_life_unbounded_mars_and_the_waves_of_darkening: footer link "Latest Issue"', async ({ page }) => {
await page.goto('/blog/life-unbounded/mars-and-the-waves-of-darkening/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Latest Issue' || t.startsWith('Latest Issue')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('latest-issue')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - Routing', () => {
test('navigate to getsciam via "GET 44% OFF ALL-ACCESS MEMBERS"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="getsciam"]').first();
expect(await link.count(), 'nav link to getsciam exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('getsciam');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('Explore the Ideas Reshaping Our World');
});
test('navigate to article_how_to_build_a_space_hotel via "Spaceflight April 14, 2026Orbi"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="how-to-build-a-space-hotel"]').first();
expect(await link.count(), 'nav link to article_how_to_build_a_space_hotel exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('how-to-build-a-space-hotel');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('Space hotels are almost here');
});
test('navigate to article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface via "What is this swift wave of sha"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface"]').first();
expect(await link.count(), 'nav link to article_mars_orbiter_watches_mysterious_wave_of_darkness_spread_across_red_planets_surface exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('mars-orbiter-watches-mysterious-wave-of-darkness-spread-across-red-planets-surface');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('What is this swift-moving band of shadow drifting across Kae');
});
});