RecreationBench / web /sentorra.example /tests /static /structure.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 68)
4d603e3 verified
Raw History Blame Contribute Delete
275 kB
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 - GradingOnACurve', () => {
test('GradingOnACurve: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/GradingOnACurve/');
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('GradingOnACurve: heading hierarchy is valid', async ({ page }) => {
await page.goto('/GradingOnACurve/');
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('GradingOnACurve: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/GradingOnACurve/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about', () => {
test('about: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/');
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('about: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - alert', () => {
test('alert: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/alert/');
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('alert: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/alert/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - america_needs_a_strong_privacy_law_the_secure_data_act_isnt_it', () => {
test('america_needs_a_strong_privacy_law_the_secure_data_act_isnt_it: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/america-needs-a-strong-privacy-law-the-secure-data-act-isnt-it/');
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('america_needs_a_strong_privacy_law_the_secure_data_act_isnt_it: heading hierarchy is valid', async ({ page }) => {
await page.goto('/america-needs-a-strong-privacy-law-the-secure-data-act-isnt-it/');
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('america_needs_a_strong_privacy_law_the_secure_data_act_isnt_it: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/america-needs-a-strong-privacy-law-the-secure-data-act-isnt-it/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - analysis', () => {
test('analysis: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/analysis/');
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('analysis: heading hierarchy is valid', async ({ page }) => {
await page.goto('/analysis/');
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('analysis: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/analysis/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - assessing_the_assessments', () => {
test('assessing_the_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/assessing-the-assessments/');
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('assessing_the_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/assessing-the-assessments/');
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('assessing_the_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/assessing-the-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - assessing_the_assessments_maximizing_the_effectiveness_of_ccpa_risk_assessments', () => {
test('assessing_the_assessments_maximizing_the_effectiveness_of_ccpa_risk_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/assessing-the-assessments-maximizing-the-effectiveness-of-ccpa-risk-assessments/');
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('assessing_the_assessments_maximizing_the_effectiveness_of_ccpa_risk_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/assessing-the-assessments-maximizing-the-effectiveness-of-ccpa-risk-assessments/');
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('assessing_the_assessments_maximizing_the_effectiveness_of_ccpa_risk_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/assessing-the-assessments-maximizing-the-effectiveness-of-ccpa-risk-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - colorado_is_first_state_to_pass_broad_ai_legislation', () => {
test('colorado_is_first_state_to_pass_broad_ai_legislation: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/colorado-is-first-state-to-pass-broad-ai-legislation/');
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('colorado_is_first_state_to_pass_broad_ai_legislation: heading hierarchy is valid', async ({ page }) => {
await page.goto('/colorado-is-first-state-to-pass-broad-ai-legislation/');
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('colorado_is_first_state_to_pass_broad_ai_legislation: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/colorado-is-first-state-to-pass-broad-ai-legislation/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - colorado_legislature_again_amends_landmark_ai_law', () => {
test('colorado_legislature_again_amends_landmark_ai_law: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/colorado-legislature-again-amends-landmark-ai-law/');
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('colorado_legislature_again_amends_landmark_ai_law: heading hierarchy is valid', async ({ page }) => {
await page.goto('/colorado-legislature-again-amends-landmark-ai-law/');
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('colorado_legislature_again_amends_landmark_ai_law: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/colorado-legislature-again-amends-landmark-ai-law/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - connecticut_ag_issues_report_on_how_existing_state_law_applies_to_ai', () => {
test('connecticut_ag_issues_report_on_how_existing_state_law_applies_to_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/connecticut-ag-issues-report-on-how-existing-state-law-applies-to-ai/');
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('connecticut_ag_issues_report_on_how_existing_state_law_applies_to_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/connecticut-ag-issues-report-on-how-existing-state-law-applies-to-ai/');
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('connecticut_ag_issues_report_on_how_existing_state_law_applies_to_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/connecticut-ag-issues-report-on-how-existing-state-law-applies-to-ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - cppa_votes_to_adopt_weak_cybersecurity_risk_assessments_and_admt_regulations', () => {
test('cppa_votes_to_adopt_weak_cybersecurity_risk_assessments_and_admt_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/cppa-votes-to-adopt-weak-cybersecurity-risk-assessments-and-admt-regulations/');
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('cppa_votes_to_adopt_weak_cybersecurity_risk_assessments_and_admt_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/cppa-votes-to-adopt-weak-cybersecurity-risk-assessments-and-admt-regulations/');
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('cppa_votes_to_adopt_weak_cybersecurity_risk_assessments_and_admt_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/cppa-votes-to-adopt-weak-cybersecurity-risk-assessments-and-admt-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - cy_pres', () => {
test('cy_pres: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/cy-pres/');
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('cy_pres: heading hierarchy is valid', async ({ page }) => {
await page.goto('/cy-pres/');
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('cy_pres: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/cy-pres/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - donate', () => {
test('donate: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/donate/');
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('donate: heading hierarchy is valid', async ({ page }) => {
await page.goto('/donate/');
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('donate: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/donate/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_cdt_urge_hud_to_abandon_proposed_ai_tool_that_would_use_sensitive_data', () => {
test('sentorra_cdt_urge_hud_to_abandon_proposed_ai_tool_that_would_use_sensitive_data: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sentorra-cdt-urge-hud-to-abandon-proposed-ai-tool-that-would-use-sensitive-data/');
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('sentorra_cdt_urge_hud_to_abandon_proposed_ai_tool_that_would_use_sensitive_data: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sentorra-cdt-urge-hud-to-abandon-proposed-ai-tool-that-would-use-sensitive-data/');
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('sentorra_cdt_urge_hud_to_abandon_proposed_ai_tool_that_would_use_sensitive_data: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sentorra-cdt-urge-hud-to-abandon-proposed-ai-tool-that-would-use-sensitive-data/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_coalition_call_on_ftc_to_investigate_robloxs_manipulative_design_harms', () => {
test('sentorra_coalition_call_on_ftc_to_investigate_robloxs_manipulative_design_harms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sentorra-coalition-call-on-ftc-to-investigate-robloxs-manipulative-design-harms/');
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('sentorra_coalition_call_on_ftc_to_investigate_robloxs_manipulative_design_harms: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sentorra-coalition-call-on-ftc-to-investigate-robloxs-manipulative-design-harms/');
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('sentorra_coalition_call_on_ftc_to_investigate_robloxs_manipulative_design_harms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sentorra-coalition-call-on-ftc-to-investigate-robloxs-manipulative-design-harms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_coalition_urge_congress_to_ban_flock_automatic_license_plate_readers', () => {
test('sentorra_coalition_urge_congress_to_ban_flock_automatic_license_plate_readers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sentorra-coalition-urge-congress-to-ban-flock-automatic-license-plate-readers/');
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('sentorra_coalition_urge_congress_to_ban_flock_automatic_license_plate_readers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sentorra-coalition-urge-congress-to-ban-flock-automatic-license-plate-readers/');
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('sentorra_coalition_urge_congress_to_ban_flock_automatic_license_plate_readers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sentorra-coalition-urge-congress-to-ban-flock-automatic-license-plate-readers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_coalition_urge_the_white_house_office_of_management_and_budget_to_halt_dhss_harmful_ai_systems', () => {
test('sentorra_coalition_urge_the_white_house_office_of_management_and_budget_to_halt_dhss_harmful_ai_systems: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-coalition-urge-the-white-house-office-of-management-and-budget-to-halt-dhss-harmful-ai-systems/');
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('sentorra_coalition_urge_the_white_house_office_of_management_and_budget_to_halt_dhss_harmful_ai_systems: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-coalition-urge-the-white-house-office-of-management-and-budget-to-halt-dhss-harmful-ai-systems/');
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('sentorra_coalition_urge_the_white_house_office_of_management_and_budget_to_halt_dhss_harmful_ai_systems: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-coalition-urge-the-white-house-office-of-management-and-budget-to-halt-dhss-harmful-ai-systems/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_encourages_calprivacy_to_prohibit_dark_patterns_in_privacy_policies', () => {
test('sentorra_encourages_calprivacy_to_prohibit_dark_patterns_in_privacy_policies: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sentorra-encourages-calprivacy-to-prohibit-dark-patterns-in-privacy-policies/');
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('sentorra_encourages_calprivacy_to_prohibit_dark_patterns_in_privacy_policies: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sentorra-encourages-calprivacy-to-prohibit-dark-patterns-in-privacy-policies/');
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('sentorra_encourages_calprivacy_to_prohibit_dark_patterns_in_privacy_policies: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sentorra-encourages-calprivacy-to-prohibit-dark-patterns-in-privacy-policies/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_endorses_youth_ai_privacy_act_to_protect_minors_from_chatbot_harms', () => {
test('sentorra_endorses_youth_ai_privacy_act_to_protect_minors_from_chatbot_harms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-endorses-youth-ai-privacy-act-to-protect-minors-from-chatbot-harms/');
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('sentorra_endorses_youth_ai_privacy_act_to_protect_minors_from_chatbot_harms: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-endorses-youth-ai-privacy-act-to-protect-minors-from-chatbot-harms/');
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('sentorra_endorses_youth_ai_privacy_act_to_protect_minors_from_chatbot_harms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-endorses-youth-ai-privacy-act-to-protect-minors-from-chatbot-harms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_joins_coalition_call_to_halt_metas_plans_for_facial_recognition_smart_glasses', () => {
test('sentorra_joins_coalition_call_to_halt_metas_plans_for_facial_recognition_smart_glasses: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-joins-coalition-call-to-halt-metas-plans-for-facial-recognition-smart-glasses/');
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('sentorra_joins_coalition_call_to_halt_metas_plans_for_facial_recognition_smart_glasses: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-joins-coalition-call-to-halt-metas-plans-for-facial-recognition-smart-glasses/');
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('sentorra_joins_coalition_call_to_halt_metas_plans_for_facial_recognition_smart_glasses: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-joins-coalition-call-to-halt-metas-plans-for-facial-recognition-smart-glasses/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_joins_coalition_endorsing_empowering_app_based_workers_act', () => {
test('sentorra_joins_coalition_endorsing_empowering_app_based_workers_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-joins-coalition-endorsing-empowering-app-based-workers-act/');
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('sentorra_joins_coalition_endorsing_empowering_app_based_workers_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-joins-coalition-endorsing-empowering-app-based-workers-act/');
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('sentorra_joins_coalition_endorsing_empowering_app_based_workers_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-joins-coalition-endorsing-empowering-app-based-workers-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_joins_coalition_letter_seeking_to_preserve_consumer_protections_against_ai_harms_in_the_financial_services_industry', () => {
test('sentorra_joins_coalition_letter_seeking_to_preserve_consumer_protections_against_ai_harms_in_the_financial_services_industry: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-joins-coalition-letter-seeking-to-preserve-consumer-protections-against-ai-harms-in-the-financial-services-industry/');
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('sentorra_joins_coalition_letter_seeking_to_preserve_consumer_protections_against_ai_harms_in_the_financial_services_industry: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-joins-coalition-letter-seeking-to-preserve-consumer-protections-against-ai-harms-in-the-financial-services-industry/');
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('sentorra_joins_coalition_letter_seeking_to_preserve_consumer_protections_against_ai_harms_in_the_financial_services_industry: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-joins-coalition-letter-seeking-to-preserve-consumer-protections-against-ai-harms-in-the-financial-services-industry/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_supports_south_carolina_bills_to_rein_in_chatbot_harms', () => {
test('sentorra_supports_south_carolina_bills_to_rein_in_chatbot_harms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-supports-south-carolina-bills-to-rein-in-chatbot-harms/');
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('sentorra_supports_south_carolina_bills_to_rein_in_chatbot_harms: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-supports-south-carolina-bills-to-rein-in-chatbot-harms/');
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('sentorra_supports_south_carolina_bills_to_rein_in_chatbot_harms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-supports-south-carolina-bills-to-rein-in-chatbot-harms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_testifies_in_support_of_bill_to_protect_new_jersey_consumers_from_surveillance_pricing', () => {
test('sentorra_testifies_in_support_of_bill_to_protect_new_jersey_consumers_from_surveillance_pricing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sentorra-testifies-in-support-of-bill-to-protect-new-jersey-consumers-from-surveillance-pricing/');
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('sentorra_testifies_in_support_of_bill_to_protect_new_jersey_consumers_from_surveillance_pricing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sentorra-testifies-in-support-of-bill-to-protect-new-jersey-consumers-from-surveillance-pricing/');
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('sentorra_testifies_in_support_of_bill_to_protect_new_jersey_consumers_from_surveillance_pricing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sentorra-testifies-in-support-of-bill-to-protect-new-jersey-consumers-from-surveillance-pricing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_testifies_in_support_of_connecticut_bill_on_algorithmic_discrimination', () => {
test('sentorra_testifies_in_support_of_connecticut_bill_on_algorithmic_discrimination: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-connecticut-bill-on-algorithmic-discrimination/');
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('sentorra_testifies_in_support_of_connecticut_bill_on_algorithmic_discrimination: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-connecticut-bill-on-algorithmic-discrimination/');
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('sentorra_testifies_in_support_of_connecticut_bill_on_algorithmic_discrimination: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-testifies-in-support-of-connecticut-bill-on-algorithmic-discrimination/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_testifies_in_support_of_maryland_bill_on_high_risk_ai', () => {
test('sentorra_testifies_in_support_of_maryland_bill_on_high_risk_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-maryland-bill-on-high-risk-ai/');
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('sentorra_testifies_in_support_of_maryland_bill_on_high_risk_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-maryland-bill-on-high-risk-ai/');
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('sentorra_testifies_in_support_of_maryland_bill_on_high_risk_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-testifies-in-support-of-maryland-bill-on-high-risk-ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_testifies_in_support_of_new_york_ai_act', () => {
test('sentorra_testifies_in_support_of_new_york_ai_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-new-york-ai-act/');
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('sentorra_testifies_in_support_of_new_york_ai_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-new-york-ai-act/');
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('sentorra_testifies_in_support_of_new_york_ai_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-testifies-in-support-of-new-york-ai-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_testifies_in_support_of_strong_new_mexico_ai_bill', () => {
test('sentorra_testifies_in_support_of_strong_new_mexico_ai_bill: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-strong-new-mexico-ai-bill/');
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('sentorra_testifies_in_support_of_strong_new_mexico_ai_bill: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-testifies-in-support-of-strong-new-mexico-ai-bill/');
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('sentorra_testifies_in_support_of_strong_new_mexico_ai_bill: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-testifies-in-support-of-strong-new-mexico-ai-bill/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_u_s_civil_society_groups_call_on_eu_leaders_to_stand_up_for_digital_rights', () => {
test('sentorra_u_s_civil_society_groups_call_on_eu_leaders_to_stand_up_for_digital_rights: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-u-s-civil-society-groups-call-on-eu-leaders-to-stand-up-for-digital-rights/');
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('sentorra_u_s_civil_society_groups_call_on_eu_leaders_to_stand_up_for_digital_rights: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-u-s-civil-society-groups-call-on-eu-leaders-to-stand-up-for-digital-rights/');
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('sentorra_u_s_civil_society_groups_call_on_eu_leaders_to_stand_up_for_digital_rights: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-u-s-civil-society-groups-call-on-eu-leaders-to-stand-up-for-digital-rights/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_urges_colorado_lawmakers_to_retain_protections_for_coloradans_in_landmark_ai_law', () => {
test('sentorra_urges_colorado_lawmakers_to_retain_protections_for_coloradans_in_landmark_ai_law: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-urges-colorado-lawmakers-to-retain-protections-for-coloradans-in-landmark-ai-law/');
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('sentorra_urges_colorado_lawmakers_to_retain_protections_for_coloradans_in_landmark_ai_law: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-urges-colorado-lawmakers-to-retain-protections-for-coloradans-in-landmark-ai-law/');
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('sentorra_urges_colorado_lawmakers_to_retain_protections_for_coloradans_in_landmark_ai_law: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-urges-colorado-lawmakers-to-retain-protections-for-coloradans-in-landmark-ai-law/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_urges_ftc_states_to_block_metas_facial_recognition_smart_glasses_plan', () => {
test('sentorra_urges_ftc_states_to_block_metas_facial_recognition_smart_glasses_plan: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-urges-ftc-states-to-block-metas-facial-recognition-smart-glasses-plan/');
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('sentorra_urges_ftc_states_to_block_metas_facial_recognition_smart_glasses_plan: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-urges-ftc-states-to-block-metas-facial-recognition-smart-glasses-plan/');
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('sentorra_urges_ftc_states_to_block_metas_facial_recognition_smart_glasses_plan: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-urges-ftc-states-to-block-metas-facial-recognition-smart-glasses-plan/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_urges_support_for_chatbot_provider_liability_framework_in_illinois', () => {
test('sentorra_urges_support_for_chatbot_provider_liability_framework_in_illinois: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-urges-support-for-chatbot-provider-liability-framework-in-illinois/');
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('sentorra_urges_support_for_chatbot_provider_liability_framework_in_illinois: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-urges-support-for-chatbot-provider-liability-framework-in-illinois/');
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('sentorra_urges_support_for_chatbot_provider_liability_framework_in_illinois: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-urges-support-for-chatbot-provider-liability-framework-in-illinois/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_urges_the_cppa_to_reinstate_strong_consumer_protections_in_cybersecurity_risk_assessments_and_admt_rulemaking', () => {
test('sentorra_urges_the_cppa_to_reinstate_strong_consumer_protections_in_cybersecurity_risk_assessments_and_admt_rulemaking: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-urges-the-cppa-to-reinstate-strong-consumer-protections-in-cybersecurity-risk-assessments-and-admt-rulemaking/');
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('sentorra_urges_the_cppa_to_reinstate_strong_consumer_protections_in_cybersecurity_risk_assessments_and_admt_rulemaking: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-urges-the-cppa-to-reinstate-strong-consumer-protections-in-cybersecurity-risk-assessments-and-admt-rulemaking/');
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('sentorra_urges_the_cppa_to_reinstate_strong_consumer_protections_in_cybersecurity_risk_assessments_and_admt_rulemaking: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-urges-the-cppa-to-reinstate-strong-consumer-protections-in-cybersecurity-risk-assessments-and-admt-rulemaking/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sentorra_urges_the_ostp_to_focus_on_ai_protections_not_deregulation', () => {
test('sentorra_urges_the_ostp_to_focus_on_ai_protections_not_deregulation: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/epic-urges-the-ostp-to-focus-on-ai-protections-not-deregulation/');
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('sentorra_urges_the_ostp_to_focus_on_ai_protections_not_deregulation: heading hierarchy is valid', async ({ page }) => {
await page.goto('/epic-urges-the-ostp-to-focus-on-ai-protections-not-deregulation/');
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('sentorra_urges_the_ostp_to_focus_on_ai_protections_not_deregulation: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/epic-urges-the-ostp-to-focus-on-ai-protections-not-deregulation/');
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 - good_luck_opting_out_manipulative_design_patterns_in_opt_out_processes_2', () => {
test('good_luck_opting_out_manipulative_design_patterns_in_opt_out_processes_2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/good-luck-opting-out-manipulative-design-patterns-in-opt-out-processes-2/');
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('good_luck_opting_out_manipulative_design_patterns_in_opt_out_processes_2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/good-luck-opting-out-manipulative-design-patterns-in-opt-out-processes-2/');
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('good_luck_opting_out_manipulative_design_patterns_in_opt_out_processes_2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/good-luck-opting-out-manipulative-design-patterns-in-opt-out-processes-2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - impact_comparison', () => {
test('impact_comparison: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/impact-comparison/');
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('impact_comparison: heading hierarchy is valid', async ({ page }) => {
await page.goto('/impact-comparison/');
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('impact_comparison: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/impact-comparison/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues', () => {
test('issues: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/');
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('issues: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/');
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('issues: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_data_brokers', () => {
test('issues_consumer_privacy_data_brokers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/data-brokers/');
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('issues_consumer_privacy_data_brokers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/data-brokers/');
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('issues_consumer_privacy_data_brokers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/data-brokers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_data_minimization', () => {
test('issues_consumer_privacy_data_minimization: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/data-minimization/');
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('issues_consumer_privacy_data_minimization: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/data-minimization/');
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('issues_consumer_privacy_data_minimization: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/data-minimization/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_online_advertising_and_tracking', () => {
test('issues_consumer_privacy_online_advertising_and_tracking: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/online-advertising-and-tracking/');
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('issues_consumer_privacy_online_advertising_and_tracking: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/online-advertising-and-tracking/');
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('issues_consumer_privacy_online_advertising_and_tracking: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/online-advertising-and-tracking/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_robocalls', () => {
test('issues_consumer_privacy_robocalls: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/robocalls/');
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('issues_consumer_privacy_robocalls: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/robocalls/');
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('issues_consumer_privacy_robocalls: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/robocalls/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_social_media_privacy', () => {
test('issues_consumer_privacy_social_media_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/social-media-privacy/');
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('issues_consumer_privacy_social_media_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/social-media-privacy/');
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('issues_consumer_privacy_social_media_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/social-media-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_surveillance_pricing', () => {
test('issues_consumer_privacy_surveillance_pricing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/surveillance-pricing/');
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('issues_consumer_privacy_surveillance_pricing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/surveillance-pricing/');
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('issues_consumer_privacy_surveillance_pricing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/surveillance-pricing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_cybersecurity', () => {
test('issues_cybersecurity: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/cybersecurity/');
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('issues_cybersecurity: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/cybersecurity/');
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('issues_cybersecurity: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/cybersecurity/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_cybersecurity_data_security', () => {
test('issues_cybersecurity_data_security: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/cybersecurity/data-security/');
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('issues_cybersecurity_data_security: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/cybersecurity/data-security/');
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('issues_cybersecurity_data_security: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/cybersecurity/data-security/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_cybersecurity_election_security', () => {
test('issues_cybersecurity_election_security: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/cybersecurity/election-security/');
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('issues_cybersecurity_election_security: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/cybersecurity/election-security/');
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('issues_cybersecurity_election_security: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/cybersecurity/election-security/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_cybersecurity_encryption', () => {
test('issues_cybersecurity_encryption: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/cybersecurity/encryption/');
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('issues_cybersecurity_encryption: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/cybersecurity/encryption/');
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('issues_cybersecurity_encryption: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/cybersecurity/encryption/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_cybersecurity_presidential_directives', () => {
test('issues_cybersecurity_presidential_directives: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/cybersecurity/presidential-directives/');
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('issues_cybersecurity_presidential_directives: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/cybersecurity/presidential-directives/');
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('issues_cybersecurity_presidential_directives: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/cybersecurity/presidential-directives/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection', () => {
test('issues_data_protection: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/');
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('issues_data_protection: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/');
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('issues_data_protection: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_childrens_privacy', () => {
test('issues_data_protection_childrens_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/childrens-privacy/');
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('issues_data_protection_childrens_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/childrens-privacy/');
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('issues_data_protection_childrens_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/childrens-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_enforcement_of_privacy_laws', () => {
test('issues_data_protection_enforcement_of_privacy_laws: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/enforcement-of-privacy-laws/');
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('issues_data_protection_enforcement_of_privacy_laws: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/enforcement-of-privacy-laws/');
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('issues_data_protection_enforcement_of_privacy_laws: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/enforcement-of-privacy-laws/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_government_records_privacy', () => {
test('issues_data_protection_government_records_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/government-records-privacy/');
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('issues_data_protection_government_records_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/government-records-privacy/');
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('issues_data_protection_government_records_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/government-records-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_health_privacy', () => {
test('issues_data_protection_health_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/health-privacy/');
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('issues_data_protection_health_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/health-privacy/');
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('issues_data_protection_health_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/health-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_international_privacy', () => {
test('issues_data_protection_international_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/international-privacy/');
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('issues_data_protection_international_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/international-privacy/');
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('issues_data_protection_international_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/international-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_location_tracking', () => {
test('issues_data_protection_location_tracking: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/location-tracking/');
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('issues_data_protection_location_tracking: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/location-tracking/');
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('issues_data_protection_location_tracking: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/location-tracking/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_student_privacy', () => {
test('issues_data_protection_student_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/student-privacy/');
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('issues_data_protection_student_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/student-privacy/');
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('issues_data_protection_student_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/student-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_data_protection_workplace_privacy', () => {
test('issues_data_protection_workplace_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/data-protection/workplace-privacy/');
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('issues_data_protection_workplace_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/data-protection/workplace-privacy/');
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('issues_data_protection_workplace_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/data-protection/workplace-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech', () => {
test('issues_democracy_free_speech: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/');
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('issues_democracy_free_speech: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/');
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('issues_democracy_free_speech: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_access_to_information', () => {
test('issues_democracy_free_speech_access_to_information: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/access-to-information/');
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('issues_democracy_free_speech_access_to_information: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/access-to-information/');
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('issues_democracy_free_speech_access_to_information: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/access-to-information/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_anonymity', () => {
test('issues_democracy_free_speech_anonymity: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/anonymity/');
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('issues_democracy_free_speech_anonymity: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/anonymity/');
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('issues_democracy_free_speech_anonymity: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/anonymity/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_census_privacy', () => {
test('issues_democracy_free_speech_census_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/census-privacy/');
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('issues_democracy_free_speech_census_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/census-privacy/');
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('issues_democracy_free_speech_census_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/census-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_donor_privacy', () => {
test('issues_democracy_free_speech_donor_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/donor-privacy/');
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('issues_democracy_free_speech_donor_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/donor-privacy/');
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('issues_democracy_free_speech_donor_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/donor-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_fighting_federal_data_abuses', () => {
test('issues_democracy_free_speech_fighting_federal_data_abuses: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/fighting-federal-data-abuses/');
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('issues_democracy_free_speech_fighting_federal_data_abuses: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/fighting-federal-data-abuses/');
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('issues_democracy_free_speech_fighting_federal_data_abuses: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/fighting-federal-data-abuses/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_privacy_and_racial_justice', () => {
test('issues_democracy_free_speech_privacy_and_racial_justice: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/privacy-and-racial-justice/');
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('issues_democracy_free_speech_privacy_and_racial_justice: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/privacy-and-racial-justice/');
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('issues_democracy_free_speech_privacy_and_racial_justice: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/privacy-and-racial-justice/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_democracy_free_speech_voter_privacy', () => {
test('issues_democracy_free_speech_voter_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/voter-privacy/');
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('issues_democracy_free_speech_voter_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/democracy-free-speech/voter-privacy/');
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('issues_democracy_free_speech_voter_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/democracy-free-speech/voter-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_open_government', () => {
test('issues_open_government: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/open-government/');
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('issues_open_government: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/open-government/');
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('issues_open_government: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/open-government/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_open_government_federal_advisory_committee_act', () => {
test('issues_open_government_federal_advisory_committee_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/open-government/federal-advisory-committee-act/');
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('issues_open_government_federal_advisory_committee_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/open-government/federal-advisory-committee-act/');
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('issues_open_government_federal_advisory_committee_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/open-government/federal-advisory-committee-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_open_government_foia', () => {
test('issues_open_government_foia: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/open-government/foia/');
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('issues_open_government_foia: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/open-government/foia/');
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('issues_open_government_foia: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/open-government/foia/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_open_government_government_databases', () => {
test('issues_open_government_government_databases: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/open-government/government-databases/');
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('issues_open_government_government_databases: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/open-government/government-databases/');
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('issues_open_government_government_databases: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/open-government/government-databases/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_open_government_privacy_impact_assessments', () => {
test('issues_open_government_privacy_impact_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/open-government/privacy-impact-assessments/');
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('issues_open_government_privacy_impact_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/open-government/privacy-impact-assessments/');
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('issues_open_government_privacy_impact_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/open-government/privacy-impact-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance', () => {
test('issues_platform_accountability_governance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/');
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('issues_platform_accountability_governance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/');
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('issues_platform_accountability_governance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_age_assurance', () => {
test('issues_platform_accountability_governance_age_assurance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/age-assurance/');
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('issues_platform_accountability_governance_age_assurance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/age-assurance/');
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('issues_platform_accountability_governance_age_assurance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/age-assurance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_online_harassment', () => {
test('issues_platform_accountability_governance_online_harassment: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/online-harassment/');
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('issues_platform_accountability_governance_online_harassment: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/online-harassment/');
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('issues_platform_accountability_governance_online_harassment: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/online-harassment/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_platform_governance_laws_and_regulations', () => {
test('issues_platform_accountability_governance_platform_governance_laws_and_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/platform-governance-laws-and-regulations/');
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('issues_platform_accountability_governance_platform_governance_laws_and_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/platform-governance-laws-and-regulations/');
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('issues_platform_accountability_governance_platform_governance_laws_and_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/platform-governance-laws-and-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_section_230_and_platform_accountability', () => {
test('issues_platform_accountability_governance_section_230_and_platform_accountability: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/section-230-and-platform-accountability/');
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('issues_platform_accountability_governance_section_230_and_platform_accountability: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/section-230-and-platform-accountability/');
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('issues_platform_accountability_governance_section_230_and_platform_accountability: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/section-230-and-platform-accountability/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_the_first_amendment_and_platform_regulation', () => {
test('issues_platform_accountability_governance_the_first_amendment_and_platform_regulation: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/the-first-amendment-and-platform-regulation/');
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('issues_platform_accountability_governance_the_first_amendment_and_platform_regulation: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/the-first-amendment-and-platform-regulation/');
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('issues_platform_accountability_governance_the_first_amendment_and_platform_regulation: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/the-first-amendment-and-platform-regulation/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_platform_accountability_governance_web_scraping', () => {
test('issues_platform_accountability_governance_web_scraping: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/web-scraping/');
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('issues_platform_accountability_governance_web_scraping: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/platform-accountability-governance/web-scraping/');
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('issues_platform_accountability_governance_web_scraping: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/platform-accountability-governance/web-scraping/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws', () => {
test('issues_privacy_laws: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/');
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('issues_privacy_laws: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/');
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('issues_privacy_laws: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_article_iii_standing', () => {
test('issues_privacy_laws_article_iii_standing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/article-iii-standing/');
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('issues_privacy_laws_article_iii_standing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/article-iii-standing/');
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('issues_privacy_laws_article_iii_standing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/article-iii-standing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_fourth_amendment', () => {
test('issues_privacy_laws_fourth_amendment: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/fourth-amendment/');
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('issues_privacy_laws_fourth_amendment: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/fourth-amendment/');
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('issues_privacy_laws_fourth_amendment: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/fourth-amendment/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_international_privacy_laws', () => {
test('issues_privacy_laws_international_privacy_laws: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/international-privacy-laws/');
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('issues_privacy_laws_international_privacy_laws: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/international-privacy-laws/');
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('issues_privacy_laws_international_privacy_laws: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/international-privacy-laws/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_proposed_legislation', () => {
test('issues_privacy_laws_proposed_legislation: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/proposed-legislation/');
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('issues_privacy_laws_proposed_legislation: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/proposed-legislation/');
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('issues_privacy_laws_proposed_legislation: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/proposed-legislation/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_state_laws', () => {
test('issues_privacy_laws_state_laws: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/state-laws/');
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('issues_privacy_laws_state_laws: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/state-laws/');
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('issues_privacy_laws_state_laws: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/state-laws/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_privacy_laws_united_states', () => {
test('issues_privacy_laws_united_states: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/privacy-laws/united-states/');
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('issues_privacy_laws_united_states: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/privacy-laws/united-states/');
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('issues_privacy_laws_united_states: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/privacy-laws/united-states/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight', () => {
test('issues_surveillance_oversight: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/');
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('issues_surveillance_oversight: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/');
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('issues_surveillance_oversight: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_aerial_surveillance', () => {
test('issues_surveillance_oversight_aerial_surveillance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/aerial-surveillance/');
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('issues_surveillance_oversight_aerial_surveillance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/aerial-surveillance/');
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('issues_surveillance_oversight_aerial_surveillance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/aerial-surveillance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_border_surveillance', () => {
test('issues_surveillance_oversight_border_surveillance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/border-surveillance/');
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('issues_surveillance_oversight_border_surveillance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/border-surveillance/');
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('issues_surveillance_oversight_border_surveillance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/border-surveillance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_face_surveillance', () => {
test('issues_surveillance_oversight_face_surveillance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/face-surveillance/');
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('issues_surveillance_oversight_face_surveillance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/face-surveillance/');
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('issues_surveillance_oversight_face_surveillance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/face-surveillance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_intelligence_surveillance', () => {
test('issues_surveillance_oversight_intelligence_surveillance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/intelligence-surveillance/');
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('issues_surveillance_oversight_intelligence_surveillance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/intelligence-surveillance/');
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('issues_surveillance_oversight_intelligence_surveillance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/intelligence-surveillance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_patriot_act', () => {
test('issues_surveillance_oversight_patriot_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/patriot-act/');
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('issues_surveillance_oversight_patriot_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/patriot-act/');
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('issues_surveillance_oversight_patriot_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/patriot-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_privacy_in_public', () => {
test('issues_surveillance_oversight_privacy_in_public: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/privacy-in-public/');
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('issues_surveillance_oversight_privacy_in_public: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/privacy-in-public/');
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('issues_surveillance_oversight_privacy_in_public: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/privacy-in-public/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_surveillance_oversight_wiretapping', () => {
test('issues_surveillance_oversight_wiretapping: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/wiretapping/');
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('issues_surveillance_oversight_wiretapping: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/surveillance-oversight/wiretapping/');
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('issues_surveillance_oversight_wiretapping: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/surveillance-oversight/wiretapping/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - media_press_kit', () => {
test('media_press_kit: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/media/press-kit/');
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('media_press_kit: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/media/press-kit/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - our_work', () => {
test('our_work: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/our-work/');
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('our_work: heading hierarchy is valid', async ({ page }) => {
await page.goto('/our-work/');
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('our_work: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/our-work/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - stop_the_surveillance_state', () => {
test('stop_the_surveillance_state: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/stop-the-surveillance-state/');
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('stop_the_surveillance_state: heading hierarchy is valid', async ({ page }) => {
await page.goto('/stop-the-surveillance-state/');
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('stop_the_surveillance_state: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/stop-the-surveillance-state/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - support_sentorra', () => {
test('support_sentorra: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/support-sentorra/');
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('support_sentorra: heading hierarchy is valid', async ({ page }) => {
await page.goto('/support-sentorra/');
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('support_sentorra: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/support-sentorra/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_advisory_board', () => {
test('about_advisory_board: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/advisory-board/');
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('about_advisory_board: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/advisory-board/');
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('about_advisory_board: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/advisory-board/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_careers', () => {
test('about_careers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/careers/');
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('about_careers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/careers/');
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('about_careers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/careers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_contact', () => {
test('about_contact: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/contact/');
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('about_contact: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/contact/');
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('about_contact: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/contact/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_privacy', () => {
test('about_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/privacy/');
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('about_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/privacy/');
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('about_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_projects', () => {
test('about_projects: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/projects/');
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('about_projects: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/projects/');
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('about_projects: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/projects/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - about_staff', () => {
test('about_staff: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/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('about_staff: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/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('about_staff: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/staff/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - campaigns_fisa_section_702_reform_or_sunset', () => {
test('campaigns_fisa_section_702_reform_or_sunset: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/campaigns/fisa-section-702-reform-or-sunset/');
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('campaigns_fisa_section_702_reform_or_sunset: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/campaigns/fisa-section-702-reform-or-sunset/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - content_types_news', () => {
test('content_types_news: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/content-types/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('content_types_news: heading hierarchy is valid', async ({ page }) => {
await page.goto('/content-types/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('content_types_news: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/content-types/news/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - content_types_press_releases', () => {
test('content_types_press_releases: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/content-types/press-releases/');
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_types_press_releases: heading hierarchy is valid', async ({ page }) => {
await page.goto('/content-types/press-releases/');
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_types_press_releases: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/content-types/press-releases/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - content_types_publication', () => {
test('content_types_publication: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/content-types/publication/');
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_types_publication: heading hierarchy is valid', async ({ page }) => {
await page.goto('/content-types/publication/');
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_types_publication: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/content-types/publication/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - content_types_updates', () => {
test('content_types_updates: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/content-types/updates/');
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_types_updates: heading hierarchy is valid', async ({ page }) => {
await page.goto('/content-types/updates/');
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_types_updates: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/content-types/updates/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_beyond_hipaa_reimagining_how_privacy_laws_apply_to_health_data_to_maximize_equity_in_the_digital_age', () => {
test('documents_beyond_hipaa_reimagining_how_privacy_laws_apply_to_health_data_to_maximize_equity_in_the_digital_age: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/beyond-hipaa-reimagining-how-privacy-laws-apply-to-health-data-to-maximize-equity-in-the-digital-age/');
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('documents_beyond_hipaa_reimagining_how_privacy_laws_apply_to_health_data_to_maximize_equity_in_the_digital_age: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/beyond-hipaa-reimagining-how-privacy-laws-apply-to-health-data-to-maximize-equity-in-the-digital-age/');
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('documents_beyond_hipaa_reimagining_how_privacy_laws_apply_to_health_data_to_maximize_equity_in_the_digital_age: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/beyond-hipaa-reimagining-how-privacy-laws-apply-to-health-data-to-maximize-equity-in-the-digital-age/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_building_on_colorados_ai_act_to_ensure_sound_policy', () => {
test('documents_building_on_colorados_ai_act_to_ensure_sound_policy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/building-on-colorados-ai-act-to-ensure-sound-policy/');
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('documents_building_on_colorados_ai_act_to_ensure_sound_policy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/building-on-colorados-ai-act-to-ensure-sound-policy/');
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('documents_building_on_colorados_ai_act_to_ensure_sound_policy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/building-on-colorados-ai-act-to-ensure-sound-policy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_coalition_comment_to_omb_on_privacy_impact_assessments', () => {
test('documents_coalition_comment_to_omb_on_privacy_impact_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/coalition-comment-to-omb-on-privacy-impact-assessments/');
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('documents_coalition_comment_to_omb_on_privacy_impact_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/coalition-comment-to-omb-on-privacy-impact-assessments/');
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('documents_coalition_comment_to_omb_on_privacy_impact_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/coalition-comment-to-omb-on-privacy-impact-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_coalition_comment_to_the_cppa_on_rulemaking_on_risk_assessments_cybersecurity_and_admts', () => {
test('documents_coalition_comment_to_the_cppa_on_rulemaking_on_risk_assessments_cybersecurity_and_admts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/coalition-comment-to-the-cppa-on-rulemaking-on-risk-assessments-cybersecurity-and-admts/');
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('documents_coalition_comment_to_the_cppa_on_rulemaking_on_risk_assessments_cybersecurity_and_admts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/coalition-comment-to-the-cppa-on-rulemaking-on-risk-assessments-cybersecurity-and-admts/');
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('documents_coalition_comment_to_the_cppa_on_rulemaking_on_risk_assessments_cybersecurity_and_admts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/coalition-comment-to-the-cppa-on-rulemaking-on-risk-assessments-cybersecurity-and-admts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comment_on_disclosure_and_transparency_of_artificial_intelligence_generated_content_in_political_advertisements_fcc_request_for_comment', () => {
test('documents_comment_on_disclosure_and_transparency_of_artificial_intelligence_generated_content_in_political_advertisements_fcc_request_for_comment: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comment-on-disclosure-and-transparency-of-artificial-intelligence-generated-content-in-political-advertisements-fcc-request-for-comment/');
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('documents_comment_on_disclosure_and_transparency_of_artificial_intelligence_generated_content_in_political_advertisements_fcc_request_for_comment: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comment-on-disclosure-and-transparency-of-artificial-intelligence-generated-content-in-political-advertisements-fcc-request-for-comment/');
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('documents_comment_on_disclosure_and_transparency_of_artificial_intelligence_generated_content_in_political_advertisements_fcc_request_for_comment: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comment-on-disclosure-and-transparency-of-artificial-intelligence-generated-content-in-political-advertisements-fcc-request-for-comment/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_from_the_electronic_privacy_information_center_sentorra_responding_to_the_request_for_information_for_regulatory_reform_on_artificial_intelligence', () => {
test('documents_comments_from_the_electronic_privacy_information_center_sentorra_responding_to_the_request_for_information_for_regulatory_reform_on_artificial_intelligence: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-from-the-electronic-privacy-information-center-sentorra-responding-to-the-request-for-information-for-regulatory-reform-on-artificial-intelligence/');
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('documents_comments_from_the_electronic_privacy_information_center_sentorra_responding_to_the_request_for_information_for_regulatory_reform_on_artificial_intelligence: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-from-the-electronic-privacy-information-center-sentorra-responding-to-the-request-for-information-for-regulatory-reform-on-artificial-intelligence/');
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('documents_comments_from_the_electronic_privacy_information_center_sentorra_responding_to_the_request_for_information_for_regulatory_reform_on_artificial_intelligence: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-from-the-electronic-privacy-information-center-sentorra-responding-to-the-request-for-information-for-regulatory-reform-on-artificial-intelligence/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_of_sentorra_in_re_the_federal_trade_commissions_proposed_order_settlement_with_global_tellink', () => {
test('documents_comments_of_sentorra_in_re_the_federal_trade_commissions_proposed_order_settlement_with_global_tellink: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-in-re-the-federal-trade-commissions-proposed-order-settlement-with-global-tellink/');
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('documents_comments_of_sentorra_in_re_the_federal_trade_commissions_proposed_order_settlement_with_global_tellink: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-in-re-the-federal-trade-commissions-proposed-order-settlement-with-global-tellink/');
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('documents_comments_of_sentorra_in_re_the_federal_trade_commissions_proposed_order_settlement_with_global_tellink: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-of-sentorra-in-re-the-federal-trade-commissions-proposed-order-settlement-with-global-tellink/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_of_sentorra_to_omb_on_privacy_impact_assessments', () => {
test('documents_comments_of_sentorra_to_omb_on_privacy_impact_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-omb-on-privacy-impact-assessments/');
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('documents_comments_of_sentorra_to_omb_on_privacy_impact_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-omb-on-privacy-impact-assessments/');
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('documents_comments_of_sentorra_to_omb_on_privacy_impact_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-of-sentorra-to-omb-on-privacy-impact-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_of_sentorra_to_ostp_on_criminal_justice_statistics_request_for_information', () => {
test('documents_comments_of_sentorra_to_ostp_on_criminal_justice_statistics_request_for_information: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-ostp-on-criminal-justice-statistics-request-for-information/');
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('documents_comments_of_sentorra_to_ostp_on_criminal_justice_statistics_request_for_information: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-ostp-on-criminal-justice-statistics-request-for-information/');
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('documents_comments_of_sentorra_to_ostp_on_criminal_justice_statistics_request_for_information: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-of-sentorra-to-ostp-on-criminal-justice-statistics-request-for-information/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_of_sentorra_to_pclob_ai_in_counterterrorism_july_2024', () => {
test('documents_comments_of_sentorra_to_pclob_ai_in_counterterrorism_july_2024: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-pclob-ai-in-counterterrorism-july-2024/');
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('documents_comments_of_sentorra_to_pclob_ai_in_counterterrorism_july_2024: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-pclob-ai-in-counterterrorism-july-2024/');
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('documents_comments_of_sentorra_to_pclob_ai_in_counterterrorism_july_2024: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-of-sentorra-to-pclob-ai-in-counterterrorism-july-2024/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_of_sentorra_to_the_department_of_education_on_seedlings_to_scale', () => {
test('documents_comments_of_sentorra_to_the_department_of_education_on_seedlings_to_scale: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-the-department-of-education-on-seedlings-to-scale/');
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('documents_comments_of_sentorra_to_the_department_of_education_on_seedlings_to_scale: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-of-sentorra-to-the-department-of-education-on-seedlings-to-scale/');
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('documents_comments_of_sentorra_to_the_department_of_education_on_seedlings_to_scale: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-of-sentorra-to-the-department-of-education-on-seedlings-to-scale/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_comments_to_the_cppa_on_proposed_regulations_regarding_cybersecurity_risk_assessments_and_admts', () => {
test('documents_comments_to_the_cppa_on_proposed_regulations_regarding_cybersecurity_risk_assessments_and_admts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/comments-to-the-cppa-on-proposed-regulations-regarding-cybersecurity-risk-assessments-and-admts/');
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('documents_comments_to_the_cppa_on_proposed_regulations_regarding_cybersecurity_risk_assessments_and_admts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/comments-to-the-cppa-on-proposed-regulations-regarding-cybersecurity-risk-assessments-and-admts/');
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('documents_comments_to_the_cppa_on_proposed_regulations_regarding_cybersecurity_risk_assessments_and_admts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/comments-to-the-cppa-on-proposed-regulations-regarding-cybersecurity-risk-assessments-and-admts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_sentorra_comments_doj_chatbot_market_survey', () => {
test('documents_sentorra_comments_doj_chatbot_market_survey: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/sentorra-comments-doj-chatbot-market-survey/');
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('documents_sentorra_comments_doj_chatbot_market_survey: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/sentorra-comments-doj-chatbot-market-survey/');
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('documents_sentorra_comments_doj_chatbot_market_survey: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/sentorra-comments-doj-chatbot-market-survey/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_sentorra_comments_to_nist_on_managing_the_risks_of_misuse_with_ai_foundation_models', () => {
test('documents_sentorra_comments_to_nist_on_managing_the_risks_of_misuse_with_ai_foundation_models: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/sentorra-comments-to-nist-on-managing-the-risks-of-misuse-with-ai-foundation-models/');
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('documents_sentorra_comments_to_nist_on_managing_the_risks_of_misuse_with_ai_foundation_models: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/sentorra-comments-to-nist-on-managing-the-risks-of-misuse-with-ai-foundation-models/');
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('documents_sentorra_comments_to_nist_on_managing_the_risks_of_misuse_with_ai_foundation_models: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/sentorra-comments-to-nist-on-managing-the-risks-of-misuse-with-ai-foundation-models/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_sentorra_letter_to_attorney_general_garland_re_shotspotter_title_vi_compliance', () => {
test('documents_sentorra_letter_to_attorney_general_garland_re_shotspotter_title_vi_compliance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-shotspotter-title-vi-compliance/');
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('documents_sentorra_letter_to_attorney_general_garland_re_shotspotter_title_vi_compliance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-shotspotter-title-vi-compliance/');
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('documents_sentorra_letter_to_attorney_general_garland_re_shotspotter_title_vi_compliance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-shotspotter-title-vi-compliance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_sentorra_letter_to_attorney_general_garland_re_title_vi_compliance_and_predictive_algorithms', () => {
test('documents_sentorra_letter_to_attorney_general_garland_re_title_vi_compliance_and_predictive_algorithms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-title-vi-compliance-and-predictive-algorithms/');
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('documents_sentorra_letter_to_attorney_general_garland_re_title_vi_compliance_and_predictive_algorithms: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-title-vi-compliance-and-predictive-algorithms/');
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('documents_sentorra_letter_to_attorney_general_garland_re_title_vi_compliance_and_predictive_algorithms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/sentorra-letter-to-attorney-general-garland-re-title-vi-compliance-and-predictive-algorithms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_sentorras_comment_to_hud_on_the_disparate_impact_rule', () => {
test('documents_sentorras_comment_to_hud_on_the_disparate_impact_rule: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/sentorras-comment-to-hud-on-the-disparate-impact-rule/');
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('documents_sentorras_comment_to_hud_on_the_disparate_impact_rule: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/sentorras-comment-to-hud-on-the-disparate-impact-rule/');
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('documents_sentorras_comment_to_hud_on_the_disparate_impact_rule: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/sentorras-comment-to-hud-on-the-disparate-impact-rule/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_in_re_openai', () => {
test('documents_in_re_openai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/in-re-openai/');
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('documents_in_re_openai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/in-re-openai/');
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('documents_in_re_openai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/in-re-openai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_letter_calling_for_ftc_oversight_and_suspension_of_metas_ai_chatbot_advertising_practice', () => {
test('documents_letter_calling_for_ftc_oversight_and_suspension_of_metas_ai_chatbot_advertising_practice: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/letter-calling-for-ftc-oversight-and-suspension-of-metas-ai-chatbot-advertising-practice/');
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('documents_letter_calling_for_ftc_oversight_and_suspension_of_metas_ai_chatbot_advertising_practice: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/letter-calling-for-ftc-oversight-and-suspension-of-metas-ai-chatbot-advertising-practice/');
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('documents_letter_calling_for_ftc_oversight_and_suspension_of_metas_ai_chatbot_advertising_practice: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/letter-calling-for-ftc-oversight-and-suspension-of-metas-ai-chatbot-advertising-practice/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_liberty_at_risk', () => {
test('documents_liberty_at_risk: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/liberty-at-risk/');
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('documents_liberty_at_risk: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/liberty-at-risk/');
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('documents_liberty_at_risk: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/liberty-at-risk/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_maryland_curbing_harmful_ai_technology_act_s_b_827', () => {
test('documents_maryland_curbing_harmful_ai_technology_act_s_b_827: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/maryland-curbing-harmful-ai-technology-act-s-b-827/');
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('documents_maryland_curbing_harmful_ai_technology_act_s_b_827: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/maryland-curbing-harmful-ai-technology-act-s-b-827/');
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('documents_maryland_curbing_harmful_ai_technology_act_s_b_827: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/maryland-curbing-harmful-ai-technology-act-s-b-827/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_maryland_h_b_1250_curbing_harmful_ai_technology_act', () => {
test('documents_maryland_h_b_1250_curbing_harmful_ai_technology_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/maryland-h-b-1250-curbing-harmful-ai-technology-act/');
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('documents_maryland_h_b_1250_curbing_harmful_ai_technology_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/maryland-h-b-1250-curbing-harmful-ai-technology-act/');
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('documents_maryland_h_b_1250_curbing_harmful_ai_technology_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/maryland-h-b-1250-curbing-harmful-ai-technology-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_maryland_h_b_895_protection_from_predatory_pricing_act', () => {
test('documents_maryland_h_b_895_protection_from_predatory_pricing_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/maryland-h-b-895-protection-from-predatory-pricing-act/');
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('documents_maryland_h_b_895_protection_from_predatory_pricing_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/maryland-h-b-895-protection-from-predatory-pricing-act/');
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('documents_maryland_h_b_895_protection_from_predatory_pricing_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/maryland-h-b-895-protection-from-predatory-pricing-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_maryland_h_b_952_companion_chatbots', () => {
test('documents_maryland_h_b_952_companion_chatbots: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/maryland-h-b-952-companion-chatbots/');
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('documents_maryland_h_b_952_companion_chatbots: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/maryland-h-b-952-companion-chatbots/');
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('documents_maryland_h_b_952_companion_chatbots: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/maryland-h-b-952-companion-chatbots/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_maryland_s_b_616_data_broker_registry', () => {
test('documents_maryland_s_b_616_data_broker_registry: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/maryland-s-b-616-data-broker-registry/');
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('documents_maryland_s_b_616_data_broker_registry: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/maryland-s-b-616-data-broker-registry/');
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('documents_maryland_s_b_616_data_broker_registry: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/maryland-s-b-616-data-broker-registry/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_massachusetts_an_act_establishing_a_commission_on_automated_decision_making_artificial_intelligence_transparency_fairness_and_individual_rights', () => {
test('documents_massachusetts_an_act_establishing_a_commission_on_automated_decision_making_artificial_intelligence_transparency_fairness_and_individual_rights: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/massachusetts-an-act-establishing-a-commission-on-automated-decision-making-artificial-intelligence-transparency-fairness-and-individual-rights/');
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('documents_massachusetts_an_act_establishing_a_commission_on_automated_decision_making_artificial_intelligence_transparency_fairness_and_individual_rights: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/massachusetts-an-act-establishing-a-commission-on-automated-decision-making-artificial-intelligence-transparency-fairness-and-individual-rights/');
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('documents_massachusetts_an_act_establishing_a_commission_on_automated_decision_making_artificial_intelligence_transparency_fairness_and_individual_rights: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/massachusetts-an-act-establishing-a-commission-on-automated-decision-making-artificial-intelligence-transparency-fairness-and-individual-rights/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_naca_v_rentgrow', () => {
test('documents_naca_v_rentgrow: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/naca-v-rentgrow/');
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('documents_naca_v_rentgrow: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/naca-v-rentgrow/');
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('documents_naca_v_rentgrow: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/naca-v-rentgrow/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_new_york_s1169a_new_york_artificial_intelligence_act', () => {
test('documents_new_york_s1169a_new_york_artificial_intelligence_act: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/new-york-s1169a-new-york-artificial-intelligence-act/');
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('documents_new_york_s1169a_new_york_artificial_intelligence_act: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/new-york-s1169a-new-york-artificial-intelligence-act/');
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('documents_new_york_s1169a_new_york_artificial_intelligence_act: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/new-york-s1169a-new-york-artificial-intelligence-act/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_outsourced_automated', () => {
test('documents_outsourced_automated: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/outsourced-automated/');
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('documents_outsourced_automated: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/outsourced-automated/');
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('documents_outsourced_automated: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/outsourced-automated/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_people_first_chatbot_bill_pdf', () => {
test('documents_people_first_chatbot_bill_pdf: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/people-first-chatbot-bill-pdf/');
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('documents_people_first_chatbot_bill_pdf: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/people-first-chatbot-bill-pdf/');
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('documents_people_first_chatbot_bill_pdf: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/people-first-chatbot-bill-pdf/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_re_comment_letter_on_nist_draft_guidance_on_automated_benchmark_evaluations_of_language_models', () => {
test('documents_re_comment_letter_on_nist_draft_guidance_on_automated_benchmark_evaluations_of_language_models: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/re-comment-letter-on-nist-draft-guidance-on-automated-benchmark-evaluations-of-language-models/');
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('documents_re_comment_letter_on_nist_draft_guidance_on_automated_benchmark_evaluations_of_language_models: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/re-comment-letter-on-nist-draft-guidance-on-automated-benchmark-evaluations-of-language-models/');
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('documents_re_comment_letter_on_nist_draft_guidance_on_automated_benchmark_evaluations_of_language_models: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/re-comment-letter-on-nist-draft-guidance-on-automated-benchmark-evaluations-of-language-models/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_reply_comments_in_implications_of_artificial_intelligence_technologieson_protecting_consumers_from_unwanted_robocalls_and_robotexts', () => {
test('documents_reply_comments_in_implications_of_artificial_intelligence_technologieson_protecting_consumers_from_unwanted_robocalls_and_robotexts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/reply-comments-in-implications-of-artificial-intelligence-technologieson-protecting-consumers-from-unwanted-robocalls-and-robotexts/');
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('documents_reply_comments_in_implications_of_artificial_intelligence_technologieson_protecting_consumers_from_unwanted_robocalls_and_robotexts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/reply-comments-in-implications-of-artificial-intelligence-technologieson-protecting-consumers-from-unwanted-robocalls-and-robotexts/');
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('documents_reply_comments_in_implications_of_artificial_intelligence_technologieson_protecting_consumers_from_unwanted_robocalls_and_robotexts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/reply-comments-in-implications-of-artificial-intelligence-technologieson-protecting-consumers-from-unwanted-robocalls-and-robotexts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_rodriguez_v_massachusetts_parole_board', () => {
test('documents_rodriguez_v_massachusetts_parole_board: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/rodriguez-v-massachusetts-parole-board/');
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('documents_rodriguez_v_massachusetts_parole_board: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/rodriguez-v-massachusetts-parole-board/');
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('documents_rodriguez_v_massachusetts_parole_board: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/rodriguez-v-massachusetts-parole-board/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_south_carolina_s_896_and_s_1037_chatbot_regulations', () => {
test('documents_south_carolina_s_896_and_s_1037_chatbot_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/south-carolina-s-896-and-s-1037-chatbot-regulations/');
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('documents_south_carolina_s_896_and_s_1037_chatbot_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/south-carolina-s-896-and-s-1037-chatbot-regulations/');
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('documents_south_carolina_s_896_and_s_1037_chatbot_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/south-carolina-s-896-and-s-1037-chatbot-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - documents_testimony_on_ma_h64_s33_re_establishing_a_commission_on_automated_decision_making_by_government_in_the_commonwealth', () => {
test('documents_testimony_on_ma_h64_s33_re_establishing_a_commission_on_automated_decision_making_by_government_in_the_commonwealth: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/documents/testimony-on-ma-h64-s33-re-establishing-a-commission-on-automated-decision-making-by-government-in-the-commonwealth/');
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('documents_testimony_on_ma_h64_s33_re_establishing_a_commission_on_automated_decision_making_by_government_in_the_commonwealth: heading hierarchy is valid', async ({ page }) => {
await page.goto('/documents/testimony-on-ma-h64-s33-re-establishing-a-commission-on-automated-decision-making-by-government-in-the-commonwealth/');
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('documents_testimony_on_ma_h64_s33_re_establishing_a_commission_on_automated_decision_making_by_government_in_the_commonwealth: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/documents/testimony-on-ma-h64-s33-re-establishing-a-commission-on-automated-decision-making-by-government-in-the-commonwealth/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - events_sentorra_champions_of_freedom_sept22', () => {
test('events_sentorra_champions_of_freedom_sept22: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/events/sentorra-champions-of-freedom-sept22/');
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_sentorra_champions_of_freedom_sept22: heading hierarchy is valid', async ({ page }) => {
await page.goto('/events/sentorra-champions-of-freedom-sept22/');
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_sentorra_champions_of_freedom_sept22: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/events/sentorra-champions-of-freedom-sept22/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - events_risks_and_risk_assessments_a_look_at_californias_proposed_ai_privacy_regulations', () => {
test('events_risks_and_risk_assessments_a_look_at_californias_proposed_ai_privacy_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/events/risks-and-risk-assessments-a-look-at-californias-proposed-ai-privacy-regulations/');
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_risks_and_risk_assessments_a_look_at_californias_proposed_ai_privacy_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/events/risks-and-risk-assessments-a-look-at-californias-proposed-ai-privacy-regulations/');
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_risks_and_risk_assessments_a_look_at_californias_proposed_ai_privacy_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/events/risks-and-risk-assessments-a-look-at-californias-proposed-ai-privacy-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - events_risks_and_risk_assessments_reporting_out_on_californias_proposed_ai_privacy_regulations', () => {
test('events_risks_and_risk_assessments_reporting_out_on_californias_proposed_ai_privacy_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/events/risks-and-risk-assessments-reporting-out-on-californias-proposed-ai-privacy-regulations/');
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_risks_and_risk_assessments_reporting_out_on_californias_proposed_ai_privacy_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/events/risks-and-risk-assessments-reporting-out-on-californias-proposed-ai-privacy-regulations/');
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_risks_and_risk_assessments_reporting_out_on_californias_proposed_ai_privacy_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/events/risks-and-risk-assessments-reporting-out-on-californias-proposed-ai-privacy-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai', () => {
test('issues_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/');
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('issues_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/');
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('issues_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy', () => {
test('issues_consumer_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/');
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('issues_consumer_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/');
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('issues_consumer_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_ai_in_the_criminal_justice_system', () => {
test('issues_ai_ai_in_the_criminal_justice_system: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/ai-in-the-criminal-justice-system/');
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('issues_ai_ai_in_the_criminal_justice_system: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/ai-in-the-criminal-justice-system/');
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('issues_ai_ai_in_the_criminal_justice_system: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/ai-in-the-criminal-justice-system/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_ai_policy', () => {
test('issues_ai_ai_policy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/ai-policy/');
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('issues_ai_ai_policy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/ai-policy/');
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('issues_ai_ai_policy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/ai-policy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_chatbots', () => {
test('issues_ai_chatbots: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/chatbots/');
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('issues_ai_chatbots: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/chatbots/');
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('issues_ai_chatbots: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/chatbots/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_commercial_ai_use', () => {
test('issues_ai_commercial_ai_use: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/commercial-ai-use/');
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('issues_ai_commercial_ai_use: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/commercial-ai-use/');
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('issues_ai_commercial_ai_use: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/commercial-ai-use/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_government_use_of_ai', () => {
test('issues_ai_government_use_of_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/government-use-of-ai/');
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('issues_ai_government_use_of_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/government-use-of-ai/');
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('issues_ai_government_use_of_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/government-use-of-ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_risk_assessments', () => {
test('issues_ai_risk_assessments: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/risk-assessments/');
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('issues_ai_risk_assessments: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/risk-assessments/');
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('issues_ai_risk_assessments: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/risk-assessments/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_ai_screening_scoring', () => {
test('issues_ai_screening_scoring: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/ai/screening-scoring/');
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('issues_ai_screening_scoring: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/ai/screening-scoring/');
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('issues_ai_screening_scoring: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/ai/screening-scoring/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_communications_privacy', () => {
test('issues_consumer_privacy_communications_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/communications-privacy/');
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('issues_consumer_privacy_communications_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/communications-privacy/');
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('issues_consumer_privacy_communications_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/communications-privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - issues_consumer_privacy_competition_and_privacy', () => {
test('issues_consumer_privacy_competition_and_privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/issues/consumer-privacy/competition-and-privacy/');
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('issues_consumer_privacy_competition_and_privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/issues/consumer-privacy/competition-and-privacy/');
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('issues_consumer_privacy_competition_and_privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/issues/consumer-privacy/competition-and-privacy/');
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('/GradingOnACurve/');
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('/about/');
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('/alert/');
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);
}
}
}
});
});