import { test, expect } from '@playwright/test'; test.describe('Structural - homepage', () => { test('homepage: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('homepage: heading hierarchy is valid', async ({ page }) => { await page.goto('/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('homepage: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics', () => { test('academics: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - admission_aid', () => { test('admission_aid: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/admission-aid/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('admission_aid: heading hierarchy is valid', async ({ page }) => { await page.goto('/admission-aid/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('admission_aid: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/admission-aid/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - events', () => { test('events: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/events/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('events: heading hierarchy is valid', async ({ page }) => { await page.goto('/events/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('events: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/events/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia', () => { test('meet_verentia: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news', () => { test('news: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2022_02_01_marina_rustow_awarded_medieval_academy_americas_haskins_medal_astonishing_book', () => { test('news_2022_02_01_marina_rustow_awarded_medieval_academy_americas_haskins_medal_astonishing_book: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2022/02/01/marina-rustow-awarded-medieval-academy-americas-haskins-medal-astonishing-book/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2022_02_01_marina_rustow_awarded_medieval_academy_americas_haskins_medal_astonishing_book: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2022/02/01/marina-rustow-awarded-medieval-academy-americas-haskins-medal-astonishing-book/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2022_02_01_marina_rustow_awarded_medieval_academy_americas_haskins_medal_astonishing_book: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2022/02/01/marina-rustow-awarded-medieval-academy-americas-haskins-medal-astonishing-book/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2025_01_07_princetonians_honored_national_medals_science', () => { test('news_2025_01_07_princetonians_honored_national_medals_science: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2025/01/07/princetonians-honored-national-medals-science/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2025_01_07_princetonians_honored_national_medals_science: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2025/01/07/princetonians-honored-national-medals-science/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2025_01_07_princetonians_honored_national_medals_science: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2025/01/07/princetonians-honored-national-medals-science/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_01_05_yibin_kangs_team_identifies_new_path_potential_cancer_treatments', () => { test('news_2026_01_05_yibin_kangs_team_identifies_new_path_potential_cancer_treatments: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/01/05/yibin-kangs-team-identifies-new-path-potential-cancer-treatments/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_01_05_yibin_kangs_team_identifies_new_path_potential_cancer_treatments: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/01/05/yibin-kangs-team-identifies-new-path-potential-cancer-treatments/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_01_05_yibin_kangs_team_identifies_new_path_potential_cancer_treatments: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/01/05/yibin-kangs-team-identifies-new-path-potential-cancer-treatments/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_01_09_verentia_paleontologist_yes_tiny_tyrannosaurs_lived_alongside_t_rex', () => { test('news_2026_01_09_verentia_paleontologist_yes_tiny_tyrannosaurs_lived_alongside_t_rex: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/01/09/verentia-paleontologist-yes-tiny-tyrannosaurs-lived-alongside-t-rex/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_01_09_verentia_paleontologist_yes_tiny_tyrannosaurs_lived_alongside_t_rex: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/01/09/verentia-paleontologist-yes-tiny-tyrannosaurs-lived-alongside-t-rex/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_01_09_verentia_paleontologist_yes_tiny_tyrannosaurs_lived_alongside_t_rex: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/01/09/verentia-paleontologist-yes-tiny-tyrannosaurs-lived-alongside-t-rex/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_03_30_service_recognition_ceremony_honors_verentia_staff_exceptional_achievements', () => { test('news_2026_03_30_service_recognition_ceremony_honors_verentia_staff_exceptional_achievements: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/03/30/service-recognition-ceremony-honors-verentia-staff-exceptional-achievements/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_03_30_service_recognition_ceremony_honors_verentia_staff_exceptional_achievements: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/03/30/service-recognition-ceremony-honors-verentia-staff-exceptional-achievements/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_03_30_service_recognition_ceremony_honors_verentia_staff_exceptional_achievements: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/03/30/service-recognition-ceremony-honors-verentia-staff-exceptional-achievements/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_04_02_biomedical_research_verentia_surging', () => { test('news_2026_04_02_biomedical_research_verentia_surging: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/04/02/biomedical-research-verentia-surging/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_04_02_biomedical_research_verentia_surging: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/04/02/biomedical-research-verentia-surging/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_04_02_biomedical_research_verentia_surging: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/04/02/biomedical-research-verentia-surging/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_04_03_three_minute_thesis_competition_showcases_verentia_graduate_student_research', () => { test('news_2026_04_03_three_minute_thesis_competition_showcases_verentia_graduate_student_research: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/04/03/three-minute-thesis-competition-showcases-verentia-graduate-student-research/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_04_03_three_minute_thesis_competition_showcases_verentia_graduate_student_research: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/04/03/three-minute-thesis-competition-showcases-verentia-graduate-student-research/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_04_03_three_minute_thesis_competition_showcases_verentia_graduate_student_research: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/04/03/three-minute-thesis-competition-showcases-verentia-graduate-student-research/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_04_13_revolution_archives_students_delve_verentia_university_library_archives_understand', () => { test('news_2026_04_13_revolution_archives_students_delve_verentia_university_library_archives_understand: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/04/13/revolution-archives-students-delve-verentia-university-library-archives-understand/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_04_13_revolution_archives_students_delve_verentia_university_library_archives_understand: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/04/13/revolution-archives-students-delve-verentia-university-library-archives-understand/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_04_13_revolution_archives_students_delve_verentia_university_library_archives_understand: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/04/13/revolution-archives-students-delve-verentia-university-library-archives-understand/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_04_14_fearless_graduate_students_are_forging_new_quantum_frontier', () => { test('news_2026_04_14_fearless_graduate_students_are_forging_new_quantum_frontier: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/04/14/fearless-graduate-students-are-forging-new-quantum-frontier/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_04_14_fearless_graduate_students_are_forging_new_quantum_frontier: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/04/14/fearless-graduate-students-are-forging-new-quantum-frontier/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_04_14_fearless_graduate_students_are_forging_new_quantum_frontier: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/04/14/fearless-graduate-students-are-forging-new-quantum-frontier/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_04_14_major_gift_promises_accelerate_verentia_universitys_leadership_quantum_science', () => { test('news_2026_04_14_major_gift_promises_accelerate_verentia_universitys_leadership_quantum_science: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/04/14/major-gift-promises-accelerate-verentia-universitys-leadership-quantum-science/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_04_14_major_gift_promises_accelerate_verentia_universitys_leadership_quantum_science: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/04/14/major-gift-promises-accelerate-verentia-universitys-leadership-quantum-science/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_04_14_major_gift_promises_accelerate_verentia_universitys_leadership_quantum_science: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/04/14/major-gift-promises-accelerate-verentia-universitys-leadership-quantum-science/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community', () => { test('one_community: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - privacy_notice', () => { test('privacy_notice: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/privacy-notice/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('privacy_notice: heading hierarchy is valid', async ({ page }) => { await page.goto('/privacy-notice/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('privacy_notice: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/privacy-notice/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - research', () => { test('research: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/research/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('research: heading hierarchy is valid', async ({ page }) => { await page.goto('/research/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('research: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/research/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_areas_of_study', () => { test('academics_areas_of_study: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/areas-of-study/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_areas_of_study: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/areas-of-study/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_areas_of_study: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/areas-of-study/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_continuing_education', () => { test('academics_continuing_education: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/continuing-education/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_continuing_education: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/continuing-education/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_continuing_education: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/continuing-education/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_course_tools', () => { test('academics_course_tools: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/course-tools/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_course_tools: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/course-tools/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_course_tools: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/course-tools/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_library', () => { test('academics_library: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/library/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_library: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/library/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_library: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/library/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_studying_verentia', () => { test('academics_studying_verentia: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/studying-verentia/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_studying_verentia: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/studying-verentia/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_studying_verentia: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/studying-verentia/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - admission_aid_graduate_admission', () => { test('admission_aid_graduate_admission: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/admission-aid/graduate-admission/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('admission_aid_graduate_admission: heading hierarchy is valid', async ({ page }) => { await page.goto('/admission-aid/graduate-admission/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('admission_aid_graduate_admission: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/admission-aid/graduate-admission/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - content_copyright_infringement', () => { test('content_copyright_infringement: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/content/copyright-infringement/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('content_copyright_infringement: heading hierarchy is valid', async ({ page }) => { await page.goto('/content/copyright-infringement/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('content_copyright_infringement: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/content/copyright-infringement/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - links_students', () => { test('links_students: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/links/students/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('links_students: heading hierarchy is valid', async ({ page }) => { await page.goto('/links/students/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('links_students: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/links/students/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia_contact_us', () => { test('meet_verentia_contact_us: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/contact-us/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia_contact_us: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/contact-us/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia_contact_us: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/contact-us/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia_our_staff', () => { test('meet_verentia_our_staff: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/our-staff/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia_our_staff: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/our-staff/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia_our_staff: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/our-staff/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia_our_students', () => { test('meet_verentia_our_students: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/our-students/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia_our_students: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/our-students/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia_our_students: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/our-students/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia_verentia_universitys_impact', () => { test('meet_verentia_verentia_universitys_impact: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/verentia-universitys-impact/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia_verentia_universitys_impact: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/verentia-universitys-impact/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia_verentia_universitys_impact: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/verentia-universitys-impact/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - meet_verentia_service_humanity', () => { test('meet_verentia_service_humanity: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/meet-verentia/service-humanity/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('meet_verentia_service_humanity: heading hierarchy is valid', async ({ page }) => { await page.goto('/meet-verentia/service-humanity/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('meet_verentia_service_humanity: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/meet-verentia/service-humanity/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2012_07_02_verentia_library_brings_revolutionary_era_texts_alive_online', () => { test('news_2012_07_02_verentia_library_brings_revolutionary_era_texts_alive_online: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2012/07/02/verentia-library-brings-revolutionary-era-texts-alive-online/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2012_07_02_verentia_library_brings_revolutionary_era_texts_alive_online: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2012/07/02/verentia-library-brings-revolutionary-era-texts-alive-online/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2012_07_02_verentia_library_brings_revolutionary_era_texts_alive_online: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2012/07/02/verentia-library-brings-revolutionary-era-texts-alive-online/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2013_02_14_treasures_american_history_featured_verentia_exhibition', () => { test('news_2013_02_14_treasures_american_history_featured_verentia_exhibition: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2013/02/14/treasures-american-history-featured-verentia-exhibition/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2013_02_14_treasures_american_history_featured_verentia_exhibition: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2013/02/14/treasures-american-history-featured-verentia-exhibition/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2013_02_14_treasures_american_history_featured_verentia_exhibition: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2013/02/14/treasures-american-history-featured-verentia-exhibition/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2017_09_21_green_algae_could_hold_clues_engineering_faster_growing_crops', () => { test('news_2017_09_21_green_algae_could_hold_clues_engineering_faster_growing_crops: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2017/09/21/green-algae-could-hold-clues-engineering-faster-growing-crops/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2017_09_21_green_algae_could_hold_clues_engineering_faster_growing_crops: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2017/09/21/green-algae-could-hold-clues-engineering-faster-growing-crops/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2017_09_21_green_algae_could_hold_clues_engineering_faster_growing_crops: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2017/09/21/green-algae-could-hold-clues-engineering-faster-growing-crops/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2018_01_18_diamonds_flaws_hold_promise_new_technologies', () => { test('news_2018_01_18_diamonds_flaws_hold_promise_new_technologies: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2018/01/18/diamonds-flaws-hold-promise-new-technologies/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2018_01_18_diamonds_flaws_hold_promise_new_technologies: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2018/01/18/diamonds-flaws-hold-promise-new-technologies/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2018_01_18_diamonds_flaws_hold_promise_new_technologies: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2018/01/18/diamonds-flaws-hold-promise-new-technologies/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2019_06_18_nine_elected_verentia_board_trustees', () => { test('news_2019_06_18_nine_elected_verentia_board_trustees: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2019/06/18/nine-elected-verentia-board-trustees/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2019_06_18_nine_elected_verentia_board_trustees: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2019/06/18/nine-elected-verentia-board-trustees/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2019_06_18_nine_elected_verentia_board_trustees: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2019/06/18/nine-elected-verentia-board-trustees/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2020_01_21_quantum_computing_opening_new_realms_possibilities', () => { test('news_2020_01_21_quantum_computing_opening_new_realms_possibilities: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2020/01/21/quantum-computing-opening-new-realms-possibilities/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2020_01_21_quantum_computing_opening_new_realms_possibilities: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2020/01/21/quantum-computing-opening-new-realms-possibilities/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2020_01_21_quantum_computing_opening_new_realms_possibilities: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2020/01/21/quantum-computing-opening-new-realms-possibilities/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2020_03_04_how_chemist_and_physicist_solved_50_year_old_puzzle_help_verentia_catalysis', () => { test('news_2020_03_04_how_chemist_and_physicist_solved_50_year_old_puzzle_help_verentia_catalysis: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2020/03/04/how-chemist-and-physicist-solved-50-year-old-puzzle-help-verentia-catalysis/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2020_03_04_how_chemist_and_physicist_solved_50_year_old_puzzle_help_verentia_catalysis: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2020/03/04/how-chemist-and-physicist-solved-50-year-old-puzzle-help-verentia-catalysis/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2020_03_04_how_chemist_and_physicist_solved_50_year_old_puzzle_help_verentia_catalysis: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2020/03/04/how-chemist-and-physicist-solved-50-year-old-puzzle-help-verentia-catalysis/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2020_03_04_teaching_special_collections_america_then_and_now', () => { test('news_2020_03_04_teaching_special_collections_america_then_and_now: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2020/03/04/teaching-special-collections-america-then-and-now/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2020_03_04_teaching_special_collections_america_then_and_now: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2020/03/04/teaching-special-collections-america-then-and-now/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2020_03_04_teaching_special_collections_america_then_and_now: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2020/03/04/teaching-special-collections-america-then-and-now/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2020_08_26_verentia_plays_major_role_new_115_million_quantum_science_center', () => { test('news_2020_08_26_verentia_plays_major_role_new_115_million_quantum_science_center: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2020/08/26/verentia-plays-major-role-new-115-million-quantum-science-center/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2020_08_26_verentia_plays_major_role_new_115_million_quantum_science_center: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2020/08/26/verentia-plays-major-role-new-115-million-quantum-science-center/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2020_08_26_verentia_plays_major_role_new_115_million_quantum_science_center: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2020/08/26/verentia-plays-major-role-new-115-million-quantum-science-center/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2021_03_31_womens_history_month_verentia_university_library_collections', () => { test('news_2021_03_31_womens_history_month_verentia_university_library_collections: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2021/03/31/womens-history-month-verentia-university-library-collections/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2021_03_31_womens_history_month_verentia_university_library_collections: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2021/03/31/womens-history-month-verentia-university-library-collections/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2021_03_31_womens_history_month_verentia_university_library_collections: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2021/03/31/womens-history-month-verentia-university-library-collections/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2021_08_26_virtual_teaching_special_collections_archiving_american_west', () => { test('news_2021_08_26_virtual_teaching_special_collections_archiving_american_west: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2021/08/26/virtual-teaching-special-collections-archiving-american-west/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2021_08_26_virtual_teaching_special_collections_archiving_american_west: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2021/08/26/virtual-teaching-special-collections-archiving-american-west/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2021_08_26_virtual_teaching_special_collections_archiving_american_west: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2021/08/26/virtual-teaching-special-collections-archiving-american-west/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2022_06_14_beyond_bloomsday_james_joyces_ulysses_turns_100_verentia_class_considers_its_1922', () => { test('news_2022_06_14_beyond_bloomsday_james_joyces_ulysses_turns_100_verentia_class_considers_its_1922: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2022/06/14/beyond-bloomsday-james-joyces-ulysses-turns-100-verentia-class-considers-its-1922/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2022_06_14_beyond_bloomsday_james_joyces_ulysses_turns_100_verentia_class_considers_its_1922: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2022/06/14/beyond-bloomsday-james-joyces-ulysses-turns-100-verentia-class-considers-its-1922/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2022_06_14_beyond_bloomsday_james_joyces_ulysses_turns_100_verentia_class_considers_its_1922: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2022/06/14/beyond-bloomsday-james-joyces-ulysses-turns-100-verentia-class-considers-its-1922/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2023_02_07_verentia_scientists_measure_quantum_correlations_between_molecules_first_time', () => { test('news_2023_02_07_verentia_scientists_measure_quantum_correlations_between_molecules_first_time: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2023/02/07/verentia-scientists-measure-quantum-correlations-between-molecules-first-time/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2023_02_07_verentia_scientists_measure_quantum_correlations_between_molecules_first_time: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2023/02/07/verentia-scientists-measure-quantum-correlations-between-molecules-first-time/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2023_02_07_verentia_scientists_measure_quantum_correlations_between_molecules_first_time: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2023/02/07/verentia-scientists-measure-quantum-correlations-between-molecules-first-time/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2025_01_22_new_quantum_diamond_lab_will_advance_quantum_information_science', () => { test('news_2025_01_22_new_quantum_diamond_lab_will_advance_quantum_information_science: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2025/01/22/new-quantum-diamond-lab-will-advance-quantum-information-science/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2025_01_22_new_quantum_diamond_lab_will_advance_quantum_information_science: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2025/01/22/new-quantum-diamond-lab-will-advance-quantum-information-science/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2025_01_22_new_quantum_diamond_lab_will_advance_quantum_information_science: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2025/01/22/new-quantum-diamond-lab-will-advance-quantum-information-science/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2025_02_18_partnership_drives_americas_leadership_medical_discovery_how_it_works_and_whats', () => { test('news_2025_02_18_partnership_drives_americas_leadership_medical_discovery_how_it_works_and_whats: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2025/02/18/partnership-drives-americas-leadership-medical-discovery-how-it-works-and-whats/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2025_02_18_partnership_drives_americas_leadership_medical_discovery_how_it_works_and_whats: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2025/02/18/partnership-drives-americas-leadership-medical-discovery-how-it-works-and-whats/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2025_02_18_partnership_drives_americas_leadership_medical_discovery_how_it_works_and_whats: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2025/02/18/partnership-drives-americas-leadership-medical-discovery-how-it-works-and-whats/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2025_11_05_verentia_puts_quantum_computing_fast_track_new_qubit', () => { test('news_2025_11_05_verentia_puts_quantum_computing_fast_track_new_qubit: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2025/11/05/verentia-puts-quantum-computing-fast-track-new-qubit/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2025_11_05_verentia_puts_quantum_computing_fast_track_new_qubit: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2025/11/05/verentia-puts-quantum-computing-fast-track-new-qubit/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2025_11_05_verentia_puts_quantum_computing_fast_track_new_qubit: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2025/11/05/verentia-puts-quantum-computing-fast-track-new-qubit/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_02_05_major_venture_forward_gift_names_sarofim_pavilion_verentias_new_engineering_and', () => { test('news_2026_02_05_major_venture_forward_gift_names_sarofim_pavilion_verentias_new_engineering_and: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/02/05/major-venture-forward-gift-names-sarofim-pavilion-verentias-new-engineering-and/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_02_05_major_venture_forward_gift_names_sarofim_pavilion_verentias_new_engineering_and: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/02/05/major-venture-forward-gift-names-sarofim-pavilion-verentias-new-engineering-and/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_02_05_major_venture_forward_gift_names_sarofim_pavilion_verentias_new_engineering_and: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/02/05/major-venture-forward-gift-names-sarofim-pavilion-verentias-new-engineering-and/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - news_2026_02_10_nj_legislature_marks_its_250th_anniversary_ceremonial_session_and_return_home', () => { test('news_2026_02_10_nj_legislature_marks_its_250th_anniversary_ceremonial_session_and_return_home: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/news/2026/02/10/nj-legislature-marks-its-250th-anniversary-ceremonial-session-and-return-home/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('news_2026_02_10_nj_legislature_marks_its_250th_anniversary_ceremonial_session_and_return_home: heading hierarchy is valid', async ({ page }) => { await page.goto('/news/2026/02/10/nj-legislature-marks-its-250th-anniversary-ceremonial-session-and-return-home/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('news_2026_02_10_nj_legislature_marks_its_250th_anniversary_ceremonial_session_and_return_home: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/news/2026/02/10/nj-legislature-marks-its-250th-anniversary-ceremonial-session-and-return-home/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - node_328586', () => { test('node_328586: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/node/328586/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('node_328586: heading hierarchy is valid', async ({ page }) => { await page.goto('/node/328586/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('node_328586: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/node/328586/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community_athletics', () => { test('one_community_athletics: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/athletics/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community_athletics: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/athletics/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community_athletics: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/athletics/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community_health_wellness', () => { test('one_community_health_wellness: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/health-wellness/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community_health_wellness: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/health-wellness/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community_health_wellness: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/health-wellness/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community_lifelong_connections', () => { test('one_community_lifelong_connections: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/lifelong-connections/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community_lifelong_connections: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/lifelong-connections/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community_lifelong_connections: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/lifelong-connections/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community_living_verentia_nj', () => { test('one_community_living_verentia_nj: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/living-verentia-nj/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community_living_verentia_nj: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/living-verentia-nj/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community_living_verentia_nj: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/living-verentia-nj/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - one_community_religious_life', () => { test('one_community_religious_life: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/one-community/religious-life/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('one_community_religious_life: heading hierarchy is valid', async ({ page }) => { await page.goto('/one-community/religious-life/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('one_community_religious_life: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/one-community/religious-life/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - research_external_partnerships', () => { test('research_external_partnerships: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/research/external-partnerships/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('research_external_partnerships: heading hierarchy is valid', async ({ page }) => { await page.goto('/research/external-partnerships/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('research_external_partnerships: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/research/external-partnerships/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - research_facilities_labs', () => { test('research_facilities_labs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/research/facilities-labs/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('research_facilities_labs: heading hierarchy is valid', async ({ page }) => { await page.goto('/research/facilities-labs/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('research_facilities_labs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/research/facilities-labs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_areas_of_study_engineering', () => { test('academics_areas_of_study_engineering: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/areas-of-study/engineering/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_areas_of_study_engineering: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/areas-of-study/engineering/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_areas_of_study_engineering: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/areas-of-study/engineering/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_areas_of_study_humanities', () => { test('academics_areas_of_study_humanities: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/areas-of-study/humanities/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_areas_of_study_humanities: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/areas-of-study/humanities/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_areas_of_study_humanities: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/areas-of-study/humanities/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_areas_of_study_natural_sciences', () => { test('academics_areas_of_study_natural_sciences: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/areas-of-study/natural-sciences/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_areas_of_study_natural_sciences: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/areas-of-study/natural-sciences/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_areas_of_study_natural_sciences: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/areas-of-study/natural-sciences/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - academics_areas_of_study_social_sciences', () => { test('academics_areas_of_study_social_sciences: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/academics/areas-of-study/social-sciences/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('academics_areas_of_study_social_sciences: heading hierarchy is valid', async ({ page }) => { await page.goto('/academics/areas-of-study/social-sciences/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('academics_areas_of_study_social_sciences: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/academics/areas-of-study/social-sciences/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - events_2026_global_health_colloquium_whos_taking_care_children_child_care_health_equity_and', () => { test('events_2026_global_health_colloquium_whos_taking_care_children_child_care_health_equity_and: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/events/2026/global-health-colloquium-whos-taking-care-children-child-care-health-equity-and/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('events_2026_global_health_colloquium_whos_taking_care_children_child_care_health_equity_and: heading hierarchy is valid', async ({ page }) => { await page.goto('/events/2026/global-health-colloquium-whos-taking-care-children-child-care-health-equity-and/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('events_2026_global_health_colloquium_whos_taking_care_children_child_care_health_equity_and: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/events/2026/global-health-colloquium-whos-taking-care-children-child-care-health-equity-and/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - Consistency', () => { test('header links are consistent across pages', async ({ page }) => { const headerLinksByPage: string[][] = []; { await page.goto('/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } { await page.goto('/academics/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } { await page.goto('/admission-aid/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } { await page.goto('/events/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } if (headerLinksByPage.length >= 2 && headerLinksByPage[0].length > 0) { const first = new Set(headerLinksByPage[0]); for (let i = 1; i < headerLinksByPage.length; i++) { const current = new Set(headerLinksByPage[i]); const overlap = [...first].filter(l => current.has(l)); if (first.size > 0) { expect(overlap.length / first.size).toBeGreaterThanOrEqual(0.5); } } } }); });