Datasets:
Download web/postgresql.org/tests/static/structure.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 116 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/postgresql.org/tests/static/structure.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/postgresql.org/tests/static/structure.scripted.spec.ts
-
curl -L -o structure.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/postgresql.org/tests/static/structure.scripted.spec.ts
116 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('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 - about', () => { | |
| test('about: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/'); | |
| 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: 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 - community', () => { | |
| test('community: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('community: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/community/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer', () => { | |
| test('developer: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/'); | |
| 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('developer: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs', () => { | |
| test('docs: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/'); | |
| 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('docs: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_14_release_14_22_html', () => { | |
| test('docs_14_release_14_22_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/14/release-14-22.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_14_release_14_22_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/14/release-14-22.html'); | |
| 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('docs_14_release_14_22_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/14/release-14-22.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_15_release_15_17_html', () => { | |
| test('docs_15_release_15_17_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/15/release-15-17.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_15_release_15_17_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/15/release-15-17.html'); | |
| 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('docs_15_release_15_17_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/15/release-15-17.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_16_release_16_13_html', () => { | |
| test('docs_16_release_16_13_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/16/release-16-13.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_16_release_16_13_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/16/release-16-13.html'); | |
| 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('docs_16_release_16_13_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/16/release-16-13.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_17_release_17_9_html', () => { | |
| test('docs_17_release_17_9_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/17/release-17-9.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_17_release_17_9_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/17/release-17-9.html'); | |
| 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('docs_17_release_17_9_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/17/release-17-9.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_18_release_18_3_html', () => { | |
| test('docs_18_release_18_3_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/18/release-18-3.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_18_release_18_3_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/18/release-18-3.html'); | |
| 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('docs_18_release_18_3_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/18/release-18-3.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_release', () => { | |
| test('docs_release: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/release/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_release: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/release/'); | |
| 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('docs_release: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/release/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download', () => { | |
| test('download: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/'); | |
| 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('download: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - ftp', () => { | |
| test('ftp: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/ftp/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('ftp: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/ftp/'); | |
| 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('ftp: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/ftp/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - list', () => { | |
| test('list: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/list/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('list: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/list/'); | |
| 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('list: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/list/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - support', () => { | |
| test('support: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/support/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('support: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/support/'); | |
| 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: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/support/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - support_security', () => { | |
| test('support_security: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/support/security/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('support_security: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/support/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.describe('Structural - support_versioning', () => { | |
| test('support_versioning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/support/versioning/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('support_versioning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/support/versioning/'); | |
| 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.describe('Structural - about_contact', () => { | |
| test('about_contact: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/contact/'); | |
| 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_contributing', () => { | |
| test('about_contributing: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/contributing/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_contributing: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/contributing/'); | |
| 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.describe('Structural - about_donate', () => { | |
| test('about_donate: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/donate/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_donate: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/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('about_donate: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/donate/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_donate_pg_org', () => { | |
| test('about_donate_pg_org: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/donate_pg_org/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_donate_pg_org: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/donate_pg_org/'); | |
| 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_donate_pg_org: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/donate_pg_org/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_eventarchive', () => { | |
| test('about_eventarchive: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/eventarchive/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_eventarchive: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/eventarchive/'); | |
| 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_eventarchive: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/eventarchive/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_events', () => { | |
| test('about_events: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/events/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_events: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/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('about_events: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/events/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_featurematrix', () => { | |
| test('about_featurematrix: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/featurematrix/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_featurematrix: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/featurematrix/'); | |
| 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.describe('Structural - about_financial', () => { | |
| test('about_financial: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/financial/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_financial: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/financial/'); | |
| 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.describe('Structural - about_governance', () => { | |
| test('about_governance: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/governance/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_governance: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/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('about_governance: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/governance/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_licence', () => { | |
| test('about_licence: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/licence/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_licence: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/licence/'); | |
| 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_licence: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/licence/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_newsarchive', () => { | |
| test('about_newsarchive: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/newsarchive/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_newsarchive: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/newsarchive/'); | |
| 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_newsarchive: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/newsarchive/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_policies', () => { | |
| test('about_policies: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/policies/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_policies: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/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('about_policies: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/policies/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_press', () => { | |
| test('about_press: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/press/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_press: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/press/'); | |
| 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_press: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/press/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_servers', () => { | |
| test('about_servers: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/servers/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_servers: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/servers/'); | |
| 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.describe('Structural - about_sponsors', () => { | |
| test('about_sponsors: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/sponsors/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_sponsors: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/sponsors/'); | |
| 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_sponsors: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/sponsors/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - account_reset', () => { | |
| test('account_reset: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/account/reset/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('account_reset: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/account/reset/'); | |
| 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('account_reset: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/account/reset/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - community_contributors', () => { | |
| test('community_contributors: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/contributors/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community_contributors: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/contributors/'); | |
| 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.describe('Structural - community_international', () => { | |
| test('community_international: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/international/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community_international: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/international/'); | |
| 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('community_international: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/community/international/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - community_irc', () => { | |
| test('community_irc: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/irc/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community_irc: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/irc/'); | |
| 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('community_irc: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/community/irc/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - community_recognised_npos', () => { | |
| test('community_recognised_npos: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/recognised-npos/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community_recognised_npos: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/recognised-npos/'); | |
| 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('community_recognised_npos: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/community/recognised-npos/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - community_user_groups', () => { | |
| test('community_user_groups: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('community_user_groups: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/community/user-groups/'); | |
| 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('community_user_groups: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/community/user-groups/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_beta', () => { | |
| test('developer_beta: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/beta/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_beta: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/beta/'); | |
| 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('developer_beta: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/beta/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_coding', () => { | |
| test('developer_coding: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/coding/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_coding: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/coding/'); | |
| 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('developer_coding: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/coding/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_committers', () => { | |
| test('developer_committers: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/committers/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_committers: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/committers/'); | |
| 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('developer_committers: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/committers/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_core', () => { | |
| test('developer_core: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/core/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_core: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/core/'); | |
| 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('developer_core: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/core/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_related_projects', () => { | |
| test('developer_related_projects: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/related-projects/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_related_projects: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/related-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('developer_related_projects: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/related-projects/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_roadmap', () => { | |
| test('developer_roadmap: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/roadmap/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_roadmap: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/roadmap/'); | |
| 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('developer_roadmap: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/roadmap/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - developer_testing', () => { | |
| test('developer_testing: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/developer/testing/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('developer_testing: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/developer/testing/'); | |
| 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('developer_testing: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/developer/testing/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_14_index_html', () => { | |
| test('docs_14_index_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/14/index.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_14_index_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/14/index.html'); | |
| 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('docs_14_index_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/14/index.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_15_index_html', () => { | |
| test('docs_15_index_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/15/index.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_15_index_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/15/index.html'); | |
| 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('docs_15_index_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/15/index.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_16_index_html', () => { | |
| test('docs_16_index_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/16/index.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_16_index_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/16/index.html'); | |
| 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('docs_16_index_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/16/index.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_17_index_html', () => { | |
| test('docs_17_index_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/17/index.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_17_index_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/17/index.html'); | |
| 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('docs_17_index_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/17/index.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_books', () => { | |
| test('docs_books: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/books/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_books: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/books/'); | |
| 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.describe('Structural - docs_current', () => { | |
| test('docs_current: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/'); | |
| 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('docs_current: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_current_features_html', () => { | |
| test('docs_current_features_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/features.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current_features_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/features.html'); | |
| 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('docs_current_features_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/features.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_current_history_html', () => { | |
| test('docs_current_history_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/history.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current_history_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/history.html'); | |
| 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('docs_current_history_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/history.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_current_installation_html', () => { | |
| test('docs_current_installation_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/installation.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current_installation_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/installation.html'); | |
| 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('docs_current_installation_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/installation.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_current_tutorial_html', () => { | |
| test('docs_current_tutorial_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/tutorial.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current_tutorial_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/tutorial.html'); | |
| 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('docs_current_tutorial_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/tutorial.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_current_xplang_html', () => { | |
| test('docs_current_xplang_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/current/xplang.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_current_xplang_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/current/xplang.html'); | |
| 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('docs_current_xplang_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/current/xplang.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_devel_index_html', () => { | |
| test('docs_devel_index_html: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/devel/index.html'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_devel_index_html: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/devel/index.html'); | |
| 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('docs_devel_index_html: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/devel/index.html'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_faq', () => { | |
| test('docs_faq: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/faq/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_faq: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/faq/'); | |
| 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('docs_faq: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/faq/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_manuals_archive', () => { | |
| test('docs_manuals_archive: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/manuals/archive/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_manuals_archive: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/manuals/archive/'); | |
| 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('docs_manuals_archive: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/manuals/archive/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - docs_online_resources', () => { | |
| test('docs_online_resources: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/docs/online-resources/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('docs_online_resources: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/docs/online-resources/'); | |
| 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('docs_online_resources: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/docs/online-resources/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_linux', () => { | |
| test('download_linux: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/linux/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_linux: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/linux/'); | |
| 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('download_linux: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/linux/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_linux_debian', () => { | |
| test('download_linux_debian: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/linux/debian/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_linux_debian: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/linux/debian/'); | |
| 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('download_linux_debian: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/linux/debian/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_linux_redhat', () => { | |
| test('download_linux_redhat: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/linux/redhat/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_linux_redhat: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/linux/redhat/'); | |
| 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('download_linux_redhat: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/linux/redhat/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_linux_suse', () => { | |
| test('download_linux_suse: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/linux/suse/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_linux_suse: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/linux/suse/'); | |
| 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('download_linux_suse: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/linux/suse/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_linux_ubuntu', () => { | |
| test('download_linux_ubuntu: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/linux/ubuntu/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_linux_ubuntu: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/linux/ubuntu/'); | |
| 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('download_linux_ubuntu: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/linux/ubuntu/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_macosx', () => { | |
| test('download_macosx: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/macosx/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_macosx: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/macosx/'); | |
| 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('download_macosx: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/macosx/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_product_categories', () => { | |
| test('download_product_categories: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/product-categories/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_product_categories: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/product-categories/'); | |
| 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('download_product_categories: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/product-categories/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_snapshots', () => { | |
| test('download_snapshots: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/snapshots/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_snapshots: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/snapshots/'); | |
| 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('download_snapshots: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/snapshots/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download_windows', () => { | |
| test('download_windows: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/windows/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('download_windows: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/windows/'); | |
| 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('download_windows: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/windows/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - ftp_source', () => { | |
| test('ftp_source: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/ftp/source/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('ftp_source: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/ftp/source/'); | |
| 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('ftp_source: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/ftp/source/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - list_pgsql_announce', () => { | |
| test('list_pgsql_announce: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/list/pgsql-announce/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('list_pgsql_announce: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/list/pgsql-announce/'); | |
| 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('list_pgsql_announce: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/list/pgsql-announce/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - list_pgsql_general', () => { | |
| test('list_pgsql_general: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/list/pgsql-general/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('list_pgsql_general: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/list/pgsql-general/'); | |
| 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('list_pgsql_general: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/list/pgsql-general/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - list_pgsql_hackers', () => { | |
| test('list_pgsql_hackers: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/list/pgsql-hackers/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('list_pgsql_hackers: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/list/pgsql-hackers/'); | |
| 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('list_pgsql_hackers: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/list/pgsql-hackers/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - list_pgsql_jobs', () => { | |
| test('list_pgsql_jobs: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/list/pgsql-jobs/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('list_pgsql_jobs: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/list/pgsql-jobs/'); | |
| 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('list_pgsql_jobs: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/list/pgsql-jobs/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575', () => { | |
| test('about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/'); | |
| 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_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_pgconfbe_2026_2564', () => { | |
| test('about_event_pgconfbe_2026_2564: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/pgconfbe-2026-2564/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_pgconfbe_2026_2564: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/pgconfbe-2026-2564/'); | |
| 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_event_pgconfbe_2026_2564: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/pgconfbe-2026-2564/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_pgday_armenia_2026_2586', () => { | |
| test('about_event_pgday_armenia_2026_2586: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/pgday-armenia-2026-2586/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_pgday_armenia_2026_2586: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/pgday-armenia-2026-2586/'); | |
| 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_event_pgday_armenia_2026_2586: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/pgday-armenia-2026-2586/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_pgday_france_2026_2581', () => { | |
| test('about_event_pgday_france_2026_2581: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/pgday-france-2026-2581/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_pgday_france_2026_2581: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/pgday-france-2026-2581/'); | |
| 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_event_pgday_france_2026_2581: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/pgday-france-2026-2581/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_postgresql_conference_ankara_2026_2589', () => { | |
| test('about_event_postgresql_conference_ankara_2026_2589: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-conference-ankara-2026-2589/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_postgresql_conference_ankara_2026_2589: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-conference-ankara-2026-2589/'); | |
| 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_event_postgresql_conference_ankara_2026_2589: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/postgresql-conference-ankara-2026-2589/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_postgresql_conference_germany_2026_2568', () => { | |
| test('about_event_postgresql_conference_germany_2026_2568: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-conference-germany-2026-2568/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_postgresql_conference_germany_2026_2568: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-conference-germany-2026-2568/'); | |
| 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_event_postgresql_conference_germany_2026_2568: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/postgresql-conference-germany-2026-2568/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_event_postgresql_development_conference_2026_pgconfdev_2543', () => { | |
| test('about_event_postgresql_development_conference_2026_pgconfdev_2543: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_event_postgresql_development_conference_2026_pgconfdev_2543: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/'); | |
| 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_event_postgresql_development_conference_2026_pgconfdev_2543: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_autobase_270_released_3269', () => { | |
| test('about_news_autobase_270_released_3269: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/autobase-270-released-3269/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_autobase_270_released_3269: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/autobase-270-released-3269/'); | |
| 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_news_autobase_270_released_3269: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/autobase-270-released-3269/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268', () => { | |
| test('about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/'); | |
| 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_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_dotconnect_for_postgresql_91_new_release_3260', () => { | |
| test('about_news_dotconnect_for_postgresql_91_new_release_3260: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_dotconnect_for_postgresql_91_new_release_3260: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/'); | |
| 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_news_dotconnect_for_postgresql_91_new_release_3260: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241', () => { | |
| test('about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/'); | |
| 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_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272', () => { | |
| test('about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/'); | |
| 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_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_postgresql_183_179_1613_1517_and_1422_released_3246', () => { | |
| test('about_news_postgresql_183_179_1613_1517_and_1422_released_3246: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_postgresql_183_179_1613_1517_and_1422_released_3246: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/'); | |
| 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_news_postgresql_183_179_1613_1517_and_1422_released_3246: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_news_swiss_pgday_2026_open_for_registration_3273', () => { | |
| test('about_news_swiss_pgday_2026_open_for_registration_3273: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_news_swiss_pgday_2026_open_for_registration_3273: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/'); | |
| 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_news_swiss_pgday_2026_open_for_registration_3273: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_policies_coc', () => { | |
| test('about_policies_coc: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/policies/coc/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_policies_coc: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/policies/coc/'); | |
| 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_policies_coc: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/policies/coc/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_policies_conferences', () => { | |
| test('about_policies_conferences: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/policies/conferences/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_policies_conferences: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/policies/conferences/'); | |
| 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_policies_conferences: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/policies/conferences/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - about_policies_npos', () => { | |
| test('about_policies_npos: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/about/policies/npos/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('about_policies_npos: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/about/policies/npos/'); | |
| 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_policies_npos: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/about/policies/npos/'); | |
| 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('/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('/community/'); | |
| 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('/developer/'); | |
| 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); | |
| } | |
| } | |
| } | |
| }); | |
| }); | |