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: 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_us', () => { test('about_us: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-us/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_us: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-us/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_us: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-us/'); 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 - business_templates', () => { test('business_templates: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/business-templates/'); 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('business_templates: heading hierarchy is valid', async ({ page }) => { await page.goto('/business-templates/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('business_templates: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/business-templates/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - case_study', () => { test('case_study: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/case-study/'); 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('case_study: heading hierarchy is valid', async ({ page }) => { await page.goto('/case-study/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('case_study: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/case-study/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - compare', () => { test('compare: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/compare/'); 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('compare: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/compare/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - console_signup', () => { test('console_signup: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/console-signup/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - contact_us', () => { test('contact_us: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/contact-us/'); 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('contact_us: heading hierarchy is valid', async ({ page }) => { await page.goto('/contact-us/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('contact_us: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/contact-us/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - for_accountants', () => { test('for_accountants: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/for-accountants/'); 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('for_accountants: heading hierarchy is valid', async ({ page }) => { await page.goto('/for-accountants/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('for_accountants: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/for-accountants/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - guides', () => { test('guides: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/guides/'); 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('guides: heading hierarchy is valid', async ({ page }) => { await page.goto('/guides/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('guides: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/guides/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - integrations', () => { test('integrations: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/integrations/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('integrations: heading hierarchy is valid', async ({ page }) => { await page.goto('/integrations/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('integrations: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/integrations/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - jobs', () => { test('jobs: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/jobs/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('jobs: heading hierarchy is valid', async ({ page }) => { await page.goto('/jobs/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('jobs: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/jobs/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - leadership', () => { test('leadership: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/leadership/'); 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('leadership: heading hierarchy is valid', async ({ page }) => { await page.goto('/leadership/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('leadership: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/leadership/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning', () => { test('learning: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning/'); 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('learning: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - legal', () => { test('legal: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/legal/'); 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('legal: heading hierarchy is valid', async ({ page }) => { await page.goto('/legal/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('legal: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/legal/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - partner_referral', () => { test('partner_referral: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/partner-referral/'); 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('partner_referral: heading hierarchy is valid', async ({ page }) => { await page.goto('/partner-referral/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('partner_referral: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/partner-referral/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - press_release', () => { test('press_release: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/press-release/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('press_release: heading hierarchy is valid', async ({ page }) => { await page.goto('/press-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('press_release: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/press-release/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product', () => { test('product: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/'); 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('product: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_accounts_payable', () => { test('product_accounts_payable: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/accounts-payable/'); 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('product_accounts_payable: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/accounts-payable/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_accounts_payable: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/accounts-payable/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - dl_best_practices_for_automating_business_finances', () => { test('dl_best_practices_for_automating_business_finances: heading hierarchy is valid', async ({ page }) => { await page.goto('/dl/best-practices-for-automating-business-finances/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('dl_best_practices_for_automating_business_finances: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/dl/best-practices-for-automating-business-finances/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - integrations_microsoft_dynamics', () => { test('integrations_microsoft_dynamics: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/integrations/microsoft-dynamics/'); 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('integrations_microsoft_dynamics: heading hierarchy is valid', async ({ page }) => { await page.goto('/integrations/microsoft-dynamics/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('integrations_microsoft_dynamics: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/integrations/microsoft-dynamics/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - integrations_netsuite', () => { test('integrations_netsuite: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/integrations/netsuite/'); 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('integrations_netsuite: heading hierarchy is valid', async ({ page }) => { await page.goto('/integrations/netsuite/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('integrations_netsuite: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/integrations/netsuite/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - newsroom_media', () => { test('newsroom_media: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/newsroom/media/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('newsroom_media: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/newsroom/media/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - partners_affiliates', () => { test('partners_affiliates: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/partners/affiliates/'); 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('partners_affiliates: heading hierarchy is valid', async ({ page }) => { await page.goto('/partners/affiliates/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('partners_affiliates: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/partners/affiliates/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - partners_banks', () => { test('partners_banks: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/partners/banks/'); 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('partners_banks: heading hierarchy is valid', async ({ page }) => { await page.goto('/partners/banks/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('partners_banks: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/partners/banks/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_accountant_console', () => { test('product_accountant_console: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/accountant-console/'); 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('product_accountant_console: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/accountant-console/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_accountant_console: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/accountant-console/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_accounts_payable_controls', () => { test('product_accounts_payable_controls: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/accounts-payable-controls/'); 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('product_accounts_payable_controls: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/accounts-payable-controls/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_accounts_payable_controls: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/accounts-payable-controls/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_accounts_receivable', () => { test('product_accounts_receivable: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/accounts-receivable/'); 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('product_accounts_receivable: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/accounts-receivable/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_accounts_receivable: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/accounts-receivable/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_ach_payment_processing', () => { test('product_ach_payment_processing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/ach-payment-processing/'); 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('product_ach_payment_processing: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/ach-payment-processing/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_ach_payment_processing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/ach-payment-processing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_ai', () => { test('product_ai: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/ai/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('product_ai: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/ai/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_ai: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/ai/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_api', () => { test('product_api: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/api/'); 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('product_api: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/api/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_api: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/api/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_fynora_balance', () => { test('product_fynora_balance: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/fynora-balance/'); 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('product_fynora_balance: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/fynora-balance/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_fynora_balance: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/fynora-balance/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_budgets', () => { test('product_budgets: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/budgets/'); 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('product_budgets: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/budgets/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_budgets: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/budgets/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_credit', () => { test('product_credit: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/credit/'); 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('product_credit: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/credit/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_credit: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/credit/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_download', () => { test('product_download: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/download/'); 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('product_download: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/download/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_download: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/download/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_expenses', () => { test('product_expenses: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/expenses/'); 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('product_expenses: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/expenses/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_expenses: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/expenses/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_instant_transfer', () => { test('product_instant_transfer: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/instant-transfer/'); 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('product_instant_transfer: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/instant-transfer/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_instant_transfer: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/instant-transfer/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_international_payments', () => { test('product_international_payments: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/international-payments/'); 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('product_international_payments: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/international-payments/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_international_payments: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/international-payments/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_invoice_financing_software', () => { test('product_invoice_financing_software: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/invoice-financing-software/'); 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('product_invoice_financing_software: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/invoice-financing-software/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_invoice_financing_software: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/invoice-financing-software/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_mobile_app', () => { test('product_mobile_app: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/mobile-app/'); 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('product_mobile_app: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/mobile-app/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_mobile_app: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/mobile-app/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_network_payments', () => { test('product_network_payments: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/network-payments/'); 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('product_network_payments: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/network-payments/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_network_payments: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/network-payments/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_overview_video', () => { test('product_overview_video: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/overview-video/'); 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('product_overview_video: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/overview-video/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_overview_video: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/overview-video/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_pay_by_card', () => { test('product_pay_by_card: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/pay-by-card/'); 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('product_pay_by_card: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/pay-by-card/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_pay_by_card: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/pay-by-card/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_payment_approvals', () => { test('product_payment_approvals: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/payment-approvals/'); 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('product_payment_approvals: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/payment-approvals/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_payments', () => { test('product_payments: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/payments/'); 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('product_payments: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/payments/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_payments: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/payments/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_payments_services', () => { test('product_payments_services: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/payments-services/'); 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('product_payments_services: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/payments-services/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_payments_services: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/payments-services/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - product_pricing', () => { test('product_pricing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/product/pricing/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('product_pricing: heading hierarchy is valid', async ({ page }) => { await page.goto('/product/pricing/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('product_pricing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/product/pricing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_construction', () => { test('solutions_construction: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/construction/'); 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('solutions_construction: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/construction/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_construction: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/construction/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_education', () => { test('solutions_education: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/education/'); 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('solutions_education: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/education/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_education: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/education/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_healthcare', () => { test('solutions_healthcare: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/healthcare/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('solutions_healthcare: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/healthcare/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_healthcare: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/healthcare/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_hospitality', () => { test('solutions_hospitality: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/hospitality/'); 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('solutions_hospitality: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/hospitality/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_hospitality: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/hospitality/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_manufacturing', () => { test('solutions_manufacturing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/manufacturing/'); 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('solutions_manufacturing: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/manufacturing/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_manufacturing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/manufacturing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_mid_sized_companies', () => { test('solutions_mid_sized_companies: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/mid-sized-companies/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('solutions_mid_sized_companies: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/mid-sized-companies/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_mid_sized_companies: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/mid-sized-companies/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - solutions_nonprofits', () => { test('solutions_nonprofits: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/solutions/nonprofits/'); 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('solutions_nonprofits: heading hierarchy is valid', async ({ page }) => { await page.goto('/solutions/nonprofits/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('solutions_nonprofits: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/solutions/nonprofits/'); 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-us/'); 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('/business-templates/'); 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); } } } }); });