import { test, expect } from '@playwright/test'; test.describe('Structural - homepage', () => { test('homepage: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('homepage: heading hierarchy is valid', async ({ page }) => { await page.goto('/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('homepage: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog', () => { test('blog: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_getting_started', () => { test('docs_next_introduction_getting_started: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/getting-started/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_getting_started: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/getting-started/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_getting_started: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/getting-started/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - showcase', () => { test('showcase: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/showcase/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('showcase: heading hierarchy is valid', async ({ page }) => { await page.goto('/showcase/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('showcase: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/showcase/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_2022_11_10_detox_20_is_out', () => { test('blog_2022_11_10_detox_20_is_out: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/2022/11/10/detox-20-is-out/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_2022_11_10_detox_20_is_out: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/2022/11/10/detox-20-is-out/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_2022_11_10_detox_20_is_out: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/2022/11/10/detox-20-is-out/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_2024_10_09_detox_copilot_is_out', () => { test('blog_2024_10_09_detox_copilot_is_out: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_2024_10_09_detox_copilot_is_out: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_2024_10_09_detox_copilot_is_out: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags', () => { test('blog_tags: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_tags: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing', () => { test('docs_contributing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/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('docs_contributing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_overview', () => { test('docs_next_config_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing', () => { test('docs_next_contributing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/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('docs_next_contributing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_guide_migration', () => { test('docs_next_guide_migration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/guide/migration/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_guide_migration: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/guide/migration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_guide_migration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/guide/migration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_debugging', () => { test('docs_next_introduction_debugging: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/debugging/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_debugging: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/debugging/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_debugging: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/debugging/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_environment_setup', () => { test('docs_next_introduction_environment_setup: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/environment-setup/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_environment_setup: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/environment-setup/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_environment_setup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/environment-setup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_preparing_for_ci', () => { test('docs_next_introduction_preparing_for_ci: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/preparing-for-ci/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_preparing_for_ci: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/preparing-for-ci/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_preparing_for_ci: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/preparing-for-ci/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_project_setup', () => { test('docs_next_introduction_project_setup: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/project-setup/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_project_setup: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/project-setup/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_project_setup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/project-setup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_introduction_your_first_test', () => { test('docs_next_introduction_your_first_test: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/introduction/your-first-test/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_introduction_your_first_test: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/introduction/your-first-test/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_introduction_your_first_test: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/introduction/your-first-test/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags_ai_integration', () => { test('blog_tags_ai_integration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/ai-integration/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags_ai_integration: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/ai-integration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_tags_ai_integration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/ai-integration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags_detox_pilot', () => { test('blog_tags_detox_pilot: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/detox-pilot/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags_detox_pilot: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/detox-pilot/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_tags_detox_pilot: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/detox-pilot/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags_genymotion', () => { test('blog_tags_genymotion: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/genymotion/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags_genymotion: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/genymotion/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('blog_tags_genymotion: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/genymotion/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags_major_release', () => { test('blog_tags_major_release: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/major-release/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags_major_release: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/major-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('blog_tags_major_release: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/major-release/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - blog_tags_minor_release', () => { test('blog_tags_minor_release: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/blog/tags/minor-release/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('blog_tags_minor_release: heading hierarchy is valid', async ({ page }) => { await page.goto('/blog/tags/minor-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('blog_tags_minor_release: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/blog/tags/minor-release/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_actions', () => { test('docs_api_actions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/actions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_actions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/actions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_actions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/actions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_device', () => { test('docs_api_device: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/device/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_device: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/device/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_device: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/device/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_expect', () => { test('docs_api_expect: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/expect/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_expect: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/expect/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_expect: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/expect/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_internals', () => { test('docs_api_internals: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/internals/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_internals: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/internals/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_internals: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/internals/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_logger', () => { test('docs_api_logger: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/logger/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_logger: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/logger/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_logger: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/logger/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_matchers', () => { test('docs_api_matchers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/matchers/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_matchers: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/matchers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_matchers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/matchers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_pilot', () => { test('docs_api_pilot: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/pilot/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_pilot: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/pilot/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_pilot: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/pilot/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_system', () => { test('docs_api_system: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/system/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_system: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/system/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('docs_api_system: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/system/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_api_webviews', () => { test('docs_api_webviews: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/api/webviews/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_api_webviews: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/api/webviews/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_api_webviews: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/api/webviews/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_articles_how_detox_works', () => { test('docs_articles_how_detox_works: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/articles/how-detox-works/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_articles_how_detox_works: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/articles/how-detox-works/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_articles_how_detox_works: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/articles/how-detox-works/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_articles_third_party_drivers', () => { test('docs_articles_third_party_drivers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/articles/third-party-drivers/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_articles_third_party_drivers: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/articles/third-party-drivers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_articles_third_party_drivers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/articles/third-party-drivers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_cli_build_framework_cache', () => { test('docs_cli_build_framework_cache: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/cli/build-framework-cache/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_cli_build_framework_cache: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/cli/build-framework-cache/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_cli_build_framework_cache: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/cli/build-framework-cache/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_cli_clean_framework_cache', () => { test('docs_cli_clean_framework_cache: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/cli/clean-framework-cache/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_cli_clean_framework_cache: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/cli/clean-framework-cache/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_cli_clean_framework_cache: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/cli/clean-framework-cache/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_cli_overview', () => { test('docs_cli_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/cli/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_cli_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/cli/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_cli_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/cli/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_cli_rebuild_framework_cache', () => { test('docs_cli_rebuild_framework_cache: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/cli/rebuild-framework-cache/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_cli_rebuild_framework_cache: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/cli/rebuild-framework-cache/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_cli_rebuild_framework_cache: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/cli/rebuild-framework-cache/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_cli_test', () => { test('docs_cli_test: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/cli/test/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_cli_test: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/cli/test/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_cli_test: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/cli/test/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_apps', () => { test('docs_config_apps: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/apps/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_apps: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/apps/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_apps: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/apps/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_artifacts', () => { test('docs_config_artifacts: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/artifacts/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_artifacts: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/artifacts/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_artifacts: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/artifacts/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_behavior', () => { test('docs_config_behavior: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/behavior/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_behavior: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/behavior/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_behavior: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/behavior/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_devices', () => { test('docs_config_devices: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/devices/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_devices: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/devices/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_devices: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/devices/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_logger', () => { test('docs_config_logger: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/logger/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_logger: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/logger/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_logger: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/logger/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_overview', () => { test('docs_config_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_session', () => { test('docs_config_session: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/session/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_session: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/session/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_session: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/session/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_config_testRunner', () => { test('docs_config_testRunner: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/config/testRunner/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_config_testRunner: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/config/testRunner/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_config_testRunner: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/config/testRunner/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_of_conduct', () => { test('docs_contributing_code_of_conduct: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code-of-conduct/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_of_conduct: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code-of-conduct/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_code_of_conduct: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code-of-conduct/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_documentation', () => { test('docs_contributing_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/documentation/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/documentation/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_feature_requests', () => { test('docs_contributing_feature_requests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/feature-requests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_feature_requests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/feature-requests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_feature_requests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/feature-requests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_reporting_bugs', () => { test('docs_contributing_reporting_bugs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/reporting-bugs/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_reporting_bugs: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/reporting-bugs/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_reporting_bugs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/reporting-bugs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_android_dev_env', () => { test('docs_guide_android_dev_env: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/android-dev-env/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_android_dev_env: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/android-dev-env/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_android_dev_env: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/android-dev-env/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_cucumber_js_integration', () => { test('docs_guide_cucumber_js_integration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/cucumber-js-integration/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_cucumber_js_integration: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/cucumber-js-integration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_cucumber_js_integration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/cucumber-js-integration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_detox_repl', () => { test('docs_guide_detox_repl: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/detox-repl/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_detox_repl: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/detox-repl/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_detox_repl: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/detox-repl/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_developing_while_writing_tests', () => { test('docs_guide_developing_while_writing_tests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/developing-while-writing-tests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_developing_while_writing_tests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/developing-while-writing-tests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_developing_while_writing_tests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/developing-while-writing-tests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_genymotion_saas', () => { test('docs_guide_genymotion_saas: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/genymotion-saas/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_genymotion_saas: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/genymotion-saas/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_genymotion_saas: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/genymotion-saas/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_launch_args', () => { test('docs_guide_launch_args: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/launch-args/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_launch_args: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/launch-args/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_launch_args: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/launch-args/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_migration', () => { test('docs_guide_migration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/migration/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_migration: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/migration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_migration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/migration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_mocking', () => { test('docs_guide_mocking: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/mocking/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_mocking: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/mocking/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_mocking: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/mocking/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_mocking_open_with_url', () => { test('docs_guide_mocking_open_with_url: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/mocking-open-with-url/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_mocking_open_with_url: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/mocking-open-with-url/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_mocking_open_with_url: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/mocking-open-with-url/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_mocking_user_activity', () => { test('docs_guide_mocking_user_activity: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/mocking-user-activity/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_mocking_user_activity: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/mocking-user-activity/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_mocking_user_activity: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/mocking-user-activity/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_mocking_user_notifications', () => { test('docs_guide_mocking_user_notifications: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/mocking-user-notifications/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_mocking_user_notifications: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/mocking-user-notifications/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_mocking_user_notifications: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/mocking-user-notifications/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_parallel_test_execution', () => { test('docs_guide_parallel_test_execution: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/parallel-test-execution/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_parallel_test_execution: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/parallel-test-execution/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_parallel_test_execution: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/parallel-test-execution/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_proguard_configuration', () => { test('docs_guide_proguard_configuration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/proguard-configuration/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_proguard_configuration: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/proguard-configuration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_proguard_configuration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/proguard-configuration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_taking_screenshots', () => { test('docs_guide_taking_screenshots: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/taking-screenshots/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_taking_screenshots: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/taking-screenshots/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_taking_screenshots: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/taking-screenshots/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_test_id', () => { test('docs_guide_test_id: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/test-id/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_test_id: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/test-id/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_test_id: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/test-id/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_testing_webviews', () => { test('docs_guide_testing_webviews: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/testing-webviews/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_testing_webviews: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/testing-webviews/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_testing_webviews: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/testing-webviews/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_typescript', () => { test('docs_guide_typescript: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/typescript/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_typescript: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/typescript/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_typescript: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/typescript/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_guide_uninstalling', () => { test('docs_guide_uninstalling: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/guide/uninstalling/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_guide_uninstalling: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/guide/uninstalling/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_guide_uninstalling: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/guide/uninstalling/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_introduction_debugging', () => { test('docs_introduction_debugging: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/introduction/debugging/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_introduction_debugging: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/introduction/debugging/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_introduction_debugging: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/introduction/debugging/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_introduction_environment_setup', () => { test('docs_introduction_environment_setup: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/introduction/environment-setup/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_introduction_environment_setup: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/introduction/environment-setup/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_introduction_environment_setup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/introduction/environment-setup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_introduction_getting_started', () => { test('docs_introduction_getting_started: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/introduction/getting-started/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_introduction_getting_started: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/introduction/getting-started/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_introduction_getting_started: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/introduction/getting-started/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_artifacts', () => { test('docs_next_config_artifacts: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/artifacts/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_artifacts: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/artifacts/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_artifacts: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/artifacts/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_behavior', () => { test('docs_next_config_behavior: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/behavior/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_behavior: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/behavior/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_behavior: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/behavior/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_devices', () => { test('docs_next_config_devices: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/devices/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_devices: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/devices/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_devices: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/devices/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_logger', () => { test('docs_next_config_logger: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/logger/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_logger: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/logger/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_logger: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/logger/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_session', () => { test('docs_next_config_session: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/session/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_session: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/session/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_session: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/session/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_testRunner', () => { test('docs_next_config_testRunner: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/testRunner/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_testRunner: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/testRunner/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_testRunner: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/testRunner/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_code_of_conduct', () => { test('docs_next_contributing_code_of_conduct: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/code-of-conduct/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_code_of_conduct: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/code-of-conduct/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_code_of_conduct: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/code-of-conduct/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_code_overview', () => { test('docs_next_contributing_code_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/code/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_code_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/code/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_code_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/code/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_code_reviewing_pull_requests', () => { test('docs_next_contributing_code_reviewing_pull_requests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_code_reviewing_pull_requests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_code_reviewing_pull_requests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_documentation', () => { test('docs_next_contributing_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/documentation/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/documentation/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_feature_requests', () => { test('docs_next_contributing_feature_requests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/feature-requests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_feature_requests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/feature-requests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_feature_requests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/feature-requests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_questions_answering_questions', () => { test('docs_next_contributing_questions_answering_questions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/questions/answering-questions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_questions_answering_questions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/questions/answering-questions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_questions_answering_questions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/questions/answering-questions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_questions_asking_questions', () => { test('docs_next_contributing_questions_asking_questions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/questions/asking-questions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_questions_asking_questions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/questions/asking-questions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_questions_asking_questions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/questions/asking-questions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_contributing_reporting_bugs', () => { test('docs_next_contributing_reporting_bugs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/contributing/reporting-bugs/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_contributing_reporting_bugs: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/contributing/reporting-bugs/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_contributing_reporting_bugs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/contributing/reporting-bugs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_guide_genymotion_saas', () => { test('docs_next_guide_genymotion_saas: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/guide/genymotion-saas/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_guide_genymotion_saas: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/guide/genymotion-saas/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_guide_genymotion_saas: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/guide/genymotion-saas/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_building_and_testing', () => { test('docs_contributing_code_building_and_testing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code/building-and-testing/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_building_and_testing: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code/building-and-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('docs_contributing_code_building_and_testing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code/building-and-testing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_overview', () => { test('docs_contributing_code_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_code_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_reviewing_pull_requests', () => { test('docs_contributing_code_reviewing_pull_requests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code/reviewing-pull-requests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_reviewing_pull_requests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code/reviewing-pull-requests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_code_reviewing_pull_requests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code/reviewing-pull-requests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_setting_up_the_dev_environment', () => { test('docs_contributing_code_setting_up_the_dev_environment: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_setting_up_the_dev_environment: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_code_setting_up_the_dev_environment: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_code_submitting_pull_requests', () => { test('docs_contributing_code_submitting_pull_requests: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/code/submitting-pull-requests/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_code_submitting_pull_requests: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/code/submitting-pull-requests/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_code_submitting_pull_requests: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/code/submitting-pull-requests/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_questions_answering_questions', () => { test('docs_contributing_questions_answering_questions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/questions/answering-questions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_questions_answering_questions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/questions/answering-questions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_questions_answering_questions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/questions/answering-questions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_contributing_questions_asking_questions', () => { test('docs_contributing_questions_asking_questions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/contributing/questions/asking-questions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_contributing_questions_asking_questions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/contributing/questions/asking-questions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_contributing_questions_asking_questions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/contributing/questions/asking-questions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_actions', () => { test('docs_next_api_actions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/actions/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_actions: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/actions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_actions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/actions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_device', () => { test('docs_next_api_device: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/device/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_device: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/device/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_device: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/device/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_expect', () => { test('docs_next_api_expect: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/expect/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_expect: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/expect/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_expect: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/expect/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_internals', () => { test('docs_next_api_internals: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/internals/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_internals: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/internals/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_internals: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/internals/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_logger', () => { test('docs_next_api_logger: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/logger/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_logger: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/logger/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_logger: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/logger/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_matchers', () => { test('docs_next_api_matchers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/matchers/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_matchers: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/matchers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_matchers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/matchers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_pilot', () => { test('docs_next_api_pilot: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/pilot/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_pilot: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/pilot/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_pilot: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/pilot/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_system', () => { test('docs_next_api_system: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/system/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_system: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/system/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('docs_next_api_system: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/system/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_api_webviews', () => { test('docs_next_api_webviews: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/api/webviews/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_api_webviews: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/api/webviews/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_api_webviews: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/api/webviews/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_architecture_artifacts', () => { test('docs_next_architecture_artifacts: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/architecture/artifacts/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_architecture_artifacts: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/architecture/artifacts/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_architecture_artifacts: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/architecture/artifacts/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_architecture_client_server', () => { test('docs_next_architecture_client_server: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/architecture/client-server/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_architecture_client_server: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/architecture/client-server/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_architecture_client_server: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/architecture/client-server/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_architecture_devices', () => { test('docs_next_architecture_devices: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/architecture/devices/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_architecture_devices: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/architecture/devices/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_architecture_devices: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/architecture/devices/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_articles_design_principles', () => { test('docs_next_articles_design_principles: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/articles/design-principles/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_articles_design_principles: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/articles/design-principles/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_articles_design_principles: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/articles/design-principles/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_articles_how_detox_works', () => { test('docs_next_articles_how_detox_works: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/articles/how-detox-works/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_articles_how_detox_works: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/articles/how-detox-works/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_articles_how_detox_works: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/articles/how-detox-works/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_articles_third_party_drivers', () => { test('docs_next_articles_third_party_drivers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/articles/third-party-drivers/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_articles_third_party_drivers: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/articles/third-party-drivers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_articles_third_party_drivers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/articles/third-party-drivers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_cli_overview', () => { test('docs_next_cli_overview: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/cli/overview/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_cli_overview: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/cli/overview/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_cli_overview: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/cli/overview/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_cli_test', () => { test('docs_next_cli_test: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/cli/test/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_cli_test: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/cli/test/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_cli_test: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/cli/test/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - docs_next_config_apps', () => { test('docs_next_config_apps: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/docs/next/config/apps/'); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('docs_next_config_apps: heading hierarchy is valid', async ({ page }) => { await page.goto('/docs/next/config/apps/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_next_config_apps: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/docs/next/config/apps/'); 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('/blog/'); 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/next/introduction/getting-started/'); 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('/showcase/'); 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); } } } }); });