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 - about', () => { test('about: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about: heading hierarchy is valid', async ({ page }) => { await page.goto('/about/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('about: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - careers', () => { test('careers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/careers/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('careers: heading hierarchy is valid', async ({ page }) => { await page.goto('/careers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('careers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/careers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - easy_integration', () => { test('easy_integration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/easy-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('easy_integration: heading hierarchy is valid', async ({ page }) => { await page.goto('/easy-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('easy_integration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/easy-integration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - find_more_bugs', () => { test('find_more_bugs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/find-more-bugs/'); 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('find_more_bugs: heading hierarchy is valid', async ({ page }) => { await page.goto('/find-more-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('find_more_bugs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/find-more-bugs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - get_organized', () => { test('get_organized: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/get-organized/'); 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('get_organized: heading hierarchy is valid', async ({ page }) => { await page.goto('/get-organized/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('get_organized: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/get-organized/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learn', () => { test('learn: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learn/'); 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('learn: heading hierarchy is valid', async ({ page }) => { await page.goto('/learn/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learn: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learn/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learn_eula', () => { test('learn_eula: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learn-eula/'); 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('learn_eula: heading hierarchy is valid', async ({ page }) => { await page.goto('/learn-eula/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learn_eula: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learn-eula/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - oss_disclosure', () => { test('oss_disclosure: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/oss-disclosure/'); 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('oss_disclosure: heading hierarchy is valid', async ({ page }) => { await page.goto('/oss-disclosure/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); }); test.describe('Structural - privacy_policy', () => { test('privacy_policy: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/privacy-policy/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('privacy_policy: heading hierarchy is valid', async ({ page }) => { await page.goto('/privacy-policy/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('privacy_policy: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/privacy-policy/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - site_map', () => { test('site_map: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/site-map/'); 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('site_map: heading hierarchy is valid', async ({ page }) => { await page.goto('/site-map/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('site_map: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/site-map/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - stay_in_control', () => { test('stay_in_control: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/stay-in-control/'); 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('stay_in_control: heading hierarchy is valid', async ({ page }) => { await page.goto('/stay-in-control/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('stay_in_control: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/stay-in-control/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - technology', () => { test('technology: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/technology/'); 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('technology: heading hierarchy is valid', async ({ page }) => { await page.goto('/technology/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('technology: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/technology/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - terms_of_use', () => { test('terms_of_use: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/terms-of-use/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('terms_of_use: heading hierarchy is valid', async ({ page }) => { await page.goto('/terms-of-use/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('terms_of_use: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/terms-of-use/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - testimonials', () => { test('testimonials: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/testimonials/'); 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('testimonials: heading hierarchy is valid', async ({ page }) => { await page.goto('/testimonials/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('testimonials: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/testimonials/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - videos', () => { test('videos: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/videos/'); 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('videos: heading hierarchy is valid', async ({ page }) => { await page.goto('/videos/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('videos: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/videos/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - careers_backend_engineer_genai_team', () => { test('careers_backend_engineer_genai_team: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/careers/backend-engineer---genai-team/'); 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('careers_backend_engineer_genai_team: heading hierarchy is valid', async ({ page }) => { await page.goto('/careers/backend-engineer---genai-team/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('careers_backend_engineer_genai_team: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/careers/backend-engineer---genai-team/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - careers_technical_account_manager', () => { test('careers_technical_account_manager: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/careers/technical-account-manager/'); 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('careers_technical_account_manager: heading hierarchy is valid', async ({ page }) => { await page.goto('/careers/technical-account-manager/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('careers_technical_account_manager: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/careers/technical-account-manager/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_chatbot', () => { test('products_chatbot: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/chatbot/'); 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('products_chatbot: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/chatbot/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_chatbot: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/chatbot/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_mobile', () => { test('products_flow_analyzer_for_mobile: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/'); 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('products_flow_analyzer_for_mobile: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_flow_analyzer_for_mobile: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-mobile/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_how_it_fits_together', () => { test('products_how_it_fits_together: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/how-it-fits-together/'); 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('products_how_it_fits_together: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/how-it-fits-together/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_how_it_fits_together: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/how-it-fits-together/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_mcp_tools', () => { test('products_mcp_tools: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/mcp-tools/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('products_mcp_tools: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/mcp-tools/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_mcp_tools: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/mcp-tools/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_site_scanner', () => { test('products_site_scanner: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/site-scanner/'); 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('products_site_scanner: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/site-scanner/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_site_scanner: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/site-scanner/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_unit_tester', () => { test('products_unit_tester: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/unit-tester/'); 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('products_unit_tester: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/unit-tester/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_unit_tester: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/unit-tester/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - videos_PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK', () => { test('videos_PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK/'); 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('videos_PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK: heading hierarchy is valid', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('videos_PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/videos/PLQcV7uz0oB708898m5Iz0gl5oK2ocVEKK/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - videos_PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt', () => { test('videos_PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt/'); 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('videos_PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt: heading hierarchy is valid', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('videos_PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/videos/PLQcV7uz0oB71lUePIwysjZpYU8oGAWOgt/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - videos_PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB', () => { test('videos_PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB/'); 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('videos_PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB: heading hierarchy is valid', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('videos_PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/videos/PLQcV7uz0oB726GUE7Z88ynMQk6cfeQMdB/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - videos_PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ', () => { test('videos_PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ/'); 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('videos_PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ: heading hierarchy is valid', async ({ page }) => { await page.goto('/videos/PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('videos_PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/videos/PLQcV7uz0oB72ntzNddHuTCRDoZrWCFxRJ/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_debugger_product_documentation', () => { test('products_debugger_product_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/debugger/product-documentation/'); 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('products_debugger_product_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/debugger/product-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('products_debugger_product_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/debugger/product-documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_mobile_product_documentation', () => { test('products_flow_analyzer_for_mobile_product_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/'); 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('products_flow_analyzer_for_mobile_product_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-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('products_flow_analyzer_for_mobile_product_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-mobile/product-documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_web_product_documentation', () => { test('products_flow_analyzer_for_web_product_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-web/product-documentation/'); 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('products_flow_analyzer_for_web_product_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-web/product-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('products_flow_analyzer_for_web_product_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-web/product-documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_web_video_training', () => { test('products_flow_analyzer_for_web_video_training: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-web/video-training/'); 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('products_flow_analyzer_for_web_video_training: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-web/video-training/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_flow_analyzer_for_web_video_training: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-web/video-training/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_site_scanner_product_documentation', () => { test('products_site_scanner_product_documentation: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/site-scanner/product-documentation/'); 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('products_site_scanner_product_documentation: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/site-scanner/product-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('products_site_scanner_product_documentation: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/site-scanner/product-documentation/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_site_scanner_trial_signup', () => { test('products_site_scanner_trial_signup: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/site-scanner/trial-signup/'); 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('products_site_scanner_trial_signup: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/site-scanner/trial-signup/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_site_scanner_trial_signup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/site-scanner/trial-signup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_site_scanner_video_training', () => { test('products_site_scanner_video_training: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/site-scanner/video-training/'); 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('products_site_scanner_video_training: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/site-scanner/video-training/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_site_scanner_video_training: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/site-scanner/video-training/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_mobile_product_documentation_android_connection_guide', () => { test('products_flow_analyzer_for_mobile_product_documentation_android_connection_guide: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/android-connection-guide/'); 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('products_flow_analyzer_for_mobile_product_documentation_android_connection_guide: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/android-connection-guide/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('products_flow_analyzer_for_mobile_product_documentation_android_connection_guide: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-mobile/product-documentation/android-connection-guide/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - products_flow_analyzer_for_mobile_product_documentation_ios_connection_guide', () => { test('products_flow_analyzer_for_mobile_product_documentation_ios_connection_guide: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/ios-connection-guide/'); 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('products_flow_analyzer_for_mobile_product_documentation_ios_connection_guide: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/ios-connection-guide/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); }); test.describe('Structural - products_flow_analyzer_for_mobile_product_documentation_overview_and_setup', () => { test('products_flow_analyzer_for_mobile_product_documentation_overview_and_setup: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/overview-and-setup/'); 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('products_flow_analyzer_for_mobile_product_documentation_overview_and_setup: heading hierarchy is valid', async ({ page }) => { await page.goto('/products/flow-analyzer-for-mobile/product-documentation/overview-and-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('products_flow_analyzer_for_mobile_product_documentation_overview_and_setup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/products/flow-analyzer-for-mobile/product-documentation/overview-and-setup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - Consistency', () => { test('header links are consistent across pages', async ({ page }) => { const headerLinksByPage: string[][] = []; { await page.goto('/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } { await page.goto('/about/'); const links = await page.locator('header a, nav a').allTextContents(); headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0)); } { await page.goto('/careers/'); 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('/easy-integration/'); 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); } } } }); });