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 - beta', () => { test('beta: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/beta/'); 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('beta: heading hierarchy is valid', async ({ page }) => { await page.goto('/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('beta: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/beta/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - contact', () => { test('contact: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/contact/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('contact: heading hierarchy is valid', async ({ page }) => { await page.goto('/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('contact: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/contact/'); 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 - faq', () => { test('faq: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/faq/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('faq: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/faq/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - nightly', () => { test('nightly: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/nightly/'); 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('nightly: heading hierarchy is valid', async ({ page }) => { await page.goto('/nightly/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('nightly: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/nightly/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages', () => { test('packages: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - releases', () => { test('releases: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/releases/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('releases: heading hierarchy is valid', async ({ page }) => { await page.goto('/releases/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('releases: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/releases/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - themes', () => { test('themes: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/themes/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('themes: heading hierarchy is valid', async ({ page }) => { await page.goto('/themes/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('themes: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/themes/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_autoclose_html', () => { test('packages_autoclose_html: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/autoclose-html/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_autoclose_html: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/autoclose-html/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_liascript_preview_stargazers', () => { test('packages_liascript_preview_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/liascript-preview/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_liascript_preview_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/liascript-preview/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_liascript_preview_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/liascript-preview/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_list', () => { test('packages_list: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/list/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_list: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/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('packages_list: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/list/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - themes_list', () => { test('themes_list: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/themes/list/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('themes_list: heading hierarchy is valid', async ({ page }) => { await page.goto('/themes/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('themes_list: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/themes/list/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - themes_nord_weavora_ui', () => { test('themes_nord_weavora_ui: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/themes/nord-weavora-ui/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('themes_nord_weavora_ui: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/themes/nord-weavora-ui/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - themes_solarized_dark_syntax', () => { test('themes_solarized_dark_syntax: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/themes/solarized-dark-syntax/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('themes_solarized_dark_syntax: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/themes/solarized-dark-syntax/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_ArnaudRinquin', () => { test('users_ArnaudRinquin: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/ArnaudRinquin/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_ArnaudRinquin: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/ArnaudRinquin/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_ArnaudRinquin: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/ArnaudRinquin/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_weavora', () => { test('users_weavora: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/weavora/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_weavora: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/weavora/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_weavora: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/weavora/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_weavora_material', () => { test('users_weavora_material: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/weavora-material/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_weavora_material: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/weavora-material/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_weavora_material: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/weavora-material/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_b3by', () => { test('users_b3by: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/b3by/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_b3by: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/b3by/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_b3by: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/b3by/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_braver', () => { test('users_braver: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/braver/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_braver: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/braver/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_braver: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/braver/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_chinakids', () => { test('users_chinakids: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/chinakids/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_chinakids: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/chinakids/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_chinakids: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/chinakids/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_falpsdsqglthnsac', () => { test('users_falpsdsqglthnsac: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/falpsdsqglthnsac/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_falpsdsqglthnsac: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/falpsdsqglthnsac/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_falpsdsqglthnsac: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/falpsdsqglthnsac/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_heartshapedbox', () => { test('users_heartshapedbox: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/heartshapedbox/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_heartshapedbox: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/heartshapedbox/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_heartshapedbox: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/heartshapedbox/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_jacqslabz', () => { test('users_jacqslabz: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/jacqslabz/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_jacqslabz: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/jacqslabz/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_jacqslabz: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/jacqslabz/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_kevinsawicki', () => { test('users_kevinsawicki: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/kevinsawicki/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_kevinsawicki: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/kevinsawicki/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_kevinsawicki: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/kevinsawicki/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_mathieudutour', () => { test('users_mathieudutour: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/mathieudutour/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_mathieudutour: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/mathieudutour/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_mathieudutour: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/mathieudutour/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_mattberkowitz', () => { test('users_mattberkowitz: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/mattberkowitz/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_mattberkowitz: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/mattberkowitz/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_mattberkowitz: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/mattberkowitz/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_nteract', () => { test('users_nteract: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/nteract/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_nteract: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/nteract/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_nteract: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/nteract/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_orktes', () => { test('users_orktes: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/orktes/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_orktes: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/orktes/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_orktes: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/orktes/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_timomeh', () => { test('users_timomeh: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/timomeh/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_timomeh: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/timomeh/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_timomeh: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/timomeh/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_tststs', () => { test('users_tststs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/tststs/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_tststs: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/tststs/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_tststs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/tststs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - users_tunmiseo', () => { test('users_tunmiseo: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/users/tunmiseo/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('users_tunmiseo: heading hierarchy is valid', async ({ page }) => { await page.goto('/users/tunmiseo/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('users_tunmiseo: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/users/tunmiseo/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_weavora_clock_stargazers', () => { test('packages_weavora_clock_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/weavora-clock/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_weavora_clock_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/weavora-clock/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_weavora_clock_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/weavora-clock/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_weavora_material_syntax_star', () => { test('packages_weavora_material_syntax_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/weavora-material-syntax/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_weavora_material_syntax_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/weavora-material-syntax/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_weavora_material_ui_stargazers', () => { test('packages_weavora_material_ui_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/weavora-material-ui/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_weavora_material_ui_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/weavora-material-ui/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_weavora_material_ui_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/weavora-material-ui/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_weavora_monokai_stargazers', () => { test('packages_weavora_monokai_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/weavora-monokai/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_weavora_monokai_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/weavora-monokai/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_weavora_monokai_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/weavora-monokai/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_weavora_pure_black_syntax_stargazers', () => { test('packages_weavora_pure_black_syntax_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/weavora-pure-black-syntax/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_weavora_pure_black_syntax_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/weavora-pure-black-syntax/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_weavora_pure_black_syntax_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/weavora-pure-black-syntax/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_autoclose_html_star', () => { test('packages_autoclose_html_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/autoclose-html/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_autoclose_html_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/autoclose-html/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_autoclose_html_stargazers', () => { test('packages_autoclose_html_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/autoclose-html/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_autoclose_html_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/autoclose-html/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_autoclose_html_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/autoclose-html/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_dracula_syntax_stargazers', () => { test('packages_dracula_syntax_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/dracula-syntax/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_dracula_syntax_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/dracula-syntax/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_dracula_syntax_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/dracula-syntax/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_dracula_ui_stargazers', () => { test('packages_dracula_ui_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/dracula-ui/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_dracula_ui_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/dracula-ui/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_dracula_ui_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/dracula-ui/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_hey_pane_stargazers', () => { test('packages_hey_pane_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/hey-pane/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_hey_pane_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/hey-pane/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_hey_pane_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/hey-pane/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_isotope_ui_star', () => { test('packages_isotope_ui_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/isotope-ui/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_isotope_ui_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/isotope-ui/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_isotope_ui_stargazers', () => { test('packages_isotope_ui_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/isotope-ui/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_isotope_ui_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/isotope-ui/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_isotope_ui_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/isotope-ui/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_language_spwn_star', () => { test('packages_language_spwn_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/language-spwn/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_language_spwn_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/language-spwn/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_monokai_star', () => { test('packages_monokai_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/monokai/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_monokai_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/monokai/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_monokai_stargazers', () => { test('packages_monokai_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/monokai/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_monokai_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/monokai/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_monokai_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/monokai/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_night_ocean_waves_theme_syntax_stargazers', () => { test('packages_night_ocean_waves_theme_syntax_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/night-ocean-waves-theme-syntax/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_night_ocean_waves_theme_syntax_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/night-ocean-waves-theme-syntax/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_night_ocean_waves_theme_syntax_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/night-ocean-waves-theme-syntax/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_nord_weavora_ui_star', () => { test('packages_nord_weavora_ui_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/nord-weavora-ui/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_nord_weavora_ui_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/nord-weavora-ui/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_nord_weavora_ui_stargazers', () => { test('packages_nord_weavora_ui_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/nord-weavora-ui/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_nord_weavora_ui_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/nord-weavora-ui/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_nord_weavora_ui_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/nord-weavora-ui/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_react_stargazers', () => { test('packages_react_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/react/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_react_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/react/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_react_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/react/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_scroll_through_time_stargazers', () => { test('packages_scroll_through_time_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/scroll-through-time/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_scroll_through_time_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/scroll-through-time/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_scroll_through_time_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/scroll-through-time/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_seti_ui_stargazers', () => { test('packages_seti_ui_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/seti-ui/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_seti_ui_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/seti-ui/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_seti_ui_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/seti-ui/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_simplified_chinese_menu_stargazers', () => { test('packages_simplified_chinese_menu_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/simplified-chinese-menu/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_simplified_chinese_menu_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/simplified-chinese-menu/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_simplified_chinese_menu_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/simplified-chinese-menu/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_solarized_dark_syntax_star', () => { test('packages_solarized_dark_syntax_star: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/solarized-dark-syntax/star/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_solarized_dark_syntax_star: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/solarized-dark-syntax/star/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_teletype_stargazers', () => { test('packages_teletype_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/teletype/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_teletype_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/teletype/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_teletype_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/teletype/stargazers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - packages_zentabs_stargazers', () => { test('packages_zentabs_stargazers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/packages/zentabs/stargazers/'); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('packages_zentabs_stargazers: heading hierarchy is valid', async ({ page }) => { await page.goto('/packages/zentabs/stargazers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('packages_zentabs_stargazers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/packages/zentabs/stargazers/'); 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('/beta/'); 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('/contact/'); 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('/docs/'); 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); } } } }); });