Datasets:
Download web/sonivex.example/tests/static/structure.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 133 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/sonivex.example/tests/static/structure.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/sonivex.example/tests/static/structure.scripted.spec.ts
-
curl -L -o structure.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/sonivex.example/tests/static/structure.scripted.spec.ts
133 kB
| import { test, expect } from '@playwright/test'; | |
| test.describe('Structural - homepage', () => { | |
| test('homepage: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| expect(await page.locator('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 - artists', () => { | |
| test('artists: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/artists/'); | |
| 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('artists: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/artists/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('artists: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/artists/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - download', () => { | |
| test('download: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/download/'); | |
| expect(await page.locator('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('download: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/download/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('download: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/download/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - forum', () => { | |
| test('forum: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/forum/'); | |
| 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('forum: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/forum/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('forum: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/forum/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help', () => { | |
| test('help: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/'); | |
| 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('help: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/'); | |
| 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('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('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 - 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 - license_agreement', () => { | |
| test('license_agreement: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/license-agreement/'); | |
| 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('license_agreement: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/license-agreement/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('license_agreement: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/license-agreement/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - myaccount', () => { | |
| test('myaccount: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/myaccount/'); | |
| 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('myaccount: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/myaccount/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('myaccount: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/myaccount/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - news', () => { | |
| test('news: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/news/'); | |
| 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('news: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/news/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('news: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/news/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - press', () => { | |
| test('press: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/press/'); | |
| 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('press: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/press/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('press: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/press/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| 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 - products', () => { | |
| test('products: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/'); | |
| 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: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - quotes', () => { | |
| test('quotes: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/quotes/'); | |
| 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('quotes: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/quotes/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('quotes: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/quotes/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop', () => { | |
| test('shop: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/'); | |
| 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('shop: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - support', () => { | |
| test('support: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/support/'); | |
| expect(await page.locator('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('support: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/support/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('support: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/support/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - 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 - artists_dana_nielsen', () => { | |
| test('artists_dana_nielsen: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/artists/dana-nielsen/'); | |
| 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('artists_dana_nielsen: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/artists/dana-nielsen/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('artists_dana_nielsen: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/artists/dana-nielsen/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - artists_dave_pensado', () => { | |
| test('artists_dave_pensado: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/artists/dave-pensado/'); | |
| 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('artists_dave_pensado: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/artists/dave-pensado/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('artists_dave_pensado: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/artists/dave-pensado/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - artists_dj_nu_mark', () => { | |
| test('artists_dj_nu_mark: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/artists/dj-nu-mark/'); | |
| 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('artists_dj_nu_mark: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/artists/dj-nu-mark/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('artists_dj_nu_mark: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/artists/dj-nu-mark/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - artists_tony_maserati', () => { | |
| test('artists_tony_maserati: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/artists/tony-maserati/'); | |
| 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('artists_tony_maserati: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/artists/tony-maserati/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('artists_tony_maserati: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/artists/tony-maserati/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c', () => { | |
| test('help_pro_c: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/'); | |
| 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('help_pro_c: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q', () => { | |
| test('help_pro_q: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/'); | |
| 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('help_pro_q: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_compression', () => { | |
| test('learn_compression: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/compression/'); | |
| 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_compression: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/compression/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_compression: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/compression/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_equalization', () => { | |
| test('learn_equalization: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/equalization/'); | |
| 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_equalization: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/equalization/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_equalization: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/equalization/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_mixing', () => { | |
| test('learn_mixing: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/mixing/'); | |
| 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_mixing: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/mixing/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_mixing: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/mixing/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_reverb', () => { | |
| test('learn_reverb: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/reverb/'); | |
| 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_reverb: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/reverb/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_reverb: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/reverb/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_science_of_sound', () => { | |
| test('learn_science_of_sound: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/science-of-sound/'); | |
| 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_science_of_sound: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/science-of-sound/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_science_of_sound: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/science-of-sound/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_synthesis_and_sound_design', () => { | |
| test('learn_synthesis_and_sound_design: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/synthesis-and-sound-design/'); | |
| 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_synthesis_and_sound_design: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/synthesis-and-sound-design/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_synthesis_and_sound_design: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/synthesis-and-sound-design/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - learn_videos', () => { | |
| test('learn_videos: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/learn/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('learn_videos: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/learn/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('learn_videos: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/learn/videos/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_micro_mini_filter_plug_in', () => { | |
| test('products_micro_mini_filter_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/micro-mini-filter-plug-in/'); | |
| 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_micro_mini_filter_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/micro-mini-filter-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_micro_mini_filter_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/micro-mini-filter-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_one_basic_synthesizer_plug_in', () => { | |
| test('products_one_basic_synthesizer_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/one-basic-synthesizer-plug-in/'); | |
| 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_one_basic_synthesizer_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/one-basic-synthesizer-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_one_basic_synthesizer_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/one-basic-synthesizer-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_c_3_compressor_plug_in', () => { | |
| test('products_pro_c_3_compressor_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-c-3-compressor-plug-in/'); | |
| 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_pro_c_3_compressor_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-c-3-compressor-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_c_3_compressor_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-c-3-compressor-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_ds_de_esser_plug_in', () => { | |
| test('products_pro_ds_de_esser_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-ds-de-esser-plug-in/'); | |
| 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_pro_ds_de_esser_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-ds-de-esser-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_ds_de_esser_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-ds-de-esser-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_g_gate_expander_plug_in', () => { | |
| test('products_pro_g_gate_expander_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-g-gate-expander-plug-in/'); | |
| 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_pro_g_gate_expander_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-g-gate-expander-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_g_gate_expander_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-g-gate-expander-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_l_2_limiter_plug_in', () => { | |
| test('products_pro_l_2_limiter_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-l-2-limiter-plug-in/'); | |
| 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_pro_l_2_limiter_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-l-2-limiter-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_l_2_limiter_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-l-2-limiter-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_mb_multiband_compressor_plug_in', () => { | |
| test('products_pro_mb_multiband_compressor_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-mb-multiband-compressor-plug-in/'); | |
| 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_pro_mb_multiband_compressor_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-mb-multiband-compressor-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_mb_multiband_compressor_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-mb-multiband-compressor-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_q_4_equalizer_plug_in', () => { | |
| test('products_pro_q_4_equalizer_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-q-4-equalizer-plug-in/'); | |
| 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_pro_q_4_equalizer_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-q-4-equalizer-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_q_4_equalizer_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-q-4-equalizer-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_pro_r_2_reverb_plug_in', () => { | |
| test('products_pro_r_2_reverb_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/pro-r-2-reverb-plug-in/'); | |
| 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_pro_r_2_reverb_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/pro-r-2-reverb-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_pro_r_2_reverb_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/pro-r-2-reverb-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_saturn_2_multiband_distortion_saturation_plug_in', () => { | |
| test('products_saturn_2_multiband_distortion_saturation_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/saturn-2-multiband-distortion-saturation-plug-in/'); | |
| 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_saturn_2_multiband_distortion_saturation_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/saturn-2-multiband-distortion-saturation-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_saturn_2_multiband_distortion_saturation_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/saturn-2-multiband-distortion-saturation-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_simplon_basic_filter_plug_in', () => { | |
| test('products_simplon_basic_filter_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/simplon-basic-filter-plug-in/'); | |
| 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_simplon_basic_filter_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/simplon-basic-filter-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_simplon_basic_filter_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/simplon-basic-filter-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_timeless_3_delay_plug_in', () => { | |
| test('products_timeless_3_delay_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/timeless-3-delay-plug-in/'); | |
| 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_timeless_3_delay_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/timeless-3-delay-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_timeless_3_delay_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/timeless-3-delay-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_twin_3_synthesizer_plug_in', () => { | |
| test('products_twin_3_synthesizer_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/twin-3-synthesizer-plug-in/'); | |
| 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_twin_3_synthesizer_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/twin-3-synthesizer-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_twin_3_synthesizer_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/twin-3-synthesizer-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - products_volcano_3_filter_plug_in', () => { | |
| test('products_volcano_3_filter_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/products/volcano-3-filter-plug-in/'); | |
| 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_volcano_3_filter_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/products/volcano-3-filter-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| 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_volcano_3_filter_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/products/volcano-3-filter-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_fx_bundle', () => { | |
| test('shop_fx_bundle: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/fx-bundle/'); | |
| 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('shop_fx_bundle: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/fx-bundle/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_fx_bundle: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/fx-bundle/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_pro_bundle', () => { | |
| test('shop_pro_bundle: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/pro-bundle/'); | |
| 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('shop_pro_bundle: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/pro-bundle/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_pro_bundle: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/pro-bundle/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_pro_c_3_compressor_plug_in', () => { | |
| test('shop_pro_c_3_compressor_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/pro-c-3-compressor-plug-in/'); | |
| 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('shop_pro_c_3_compressor_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/pro-c-3-compressor-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_pro_c_3_compressor_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/pro-c-3-compressor-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_pro_l_2_limiter_plug_in', () => { | |
| test('shop_pro_l_2_limiter_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/pro-l-2-limiter-plug-in/'); | |
| 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('shop_pro_l_2_limiter_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/pro-l-2-limiter-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_pro_l_2_limiter_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/pro-l-2-limiter-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_pro_q_4_equalizer_plug_in', () => { | |
| test('shop_pro_q_4_equalizer_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/pro-q-4-equalizer-plug-in/'); | |
| 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('shop_pro_q_4_equalizer_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/pro-q-4-equalizer-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_pro_q_4_equalizer_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/pro-q-4-equalizer-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shop_total_bundle', () => { | |
| test('shop_total_bundle: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shop/total-bundle/'); | |
| 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('shop_total_bundle: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shop/total-bundle/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('shop_total_bundle: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shop/total-bundle/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - support_faq', () => { | |
| test('support_faq: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/support/faq/'); | |
| 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('support_faq: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/support/faq/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('support_faq: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/support/faq/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - news_1768467601_sonivex_releases_pro_c_3_compressor_plug_in', () => { | |
| test('news_1768467601_sonivex_releases_pro_c_3_compressor_plug_in: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/news/1768467601/sonivex-releases-pro-c-3-compressor-plug-in/'); | |
| 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('news_1768467601_sonivex_releases_pro_c_3_compressor_plug_in: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/news/1768467601/sonivex-releases-pro-c-3-compressor-plug-in/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('news_1768467601_sonivex_releases_pro_c_3_compressor_plug_in: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/news/1768467601/sonivex-releases-pro-c-3-compressor-plug-in/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - news_1773907200_all_plug_ins_updated_with_bug_fixes', () => { | |
| test('news_1773907200_all_plug_ins_updated_with_bug_fixes: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/news/1773907200/all-plug-ins-updated-with-bug-fixes/'); | |
| 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('news_1773907200_all_plug_ins_updated_with_bug_fixes: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/news/1773907200/all-plug-ins-updated-with-bug-fixes/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('news_1773907200_all_plug_ins_updated_with_bug_fixes: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/news/1773907200/all-plug-ins-updated-with-bug-fixes/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - news_1776330000_small_bug_fixes_for_all_plug_ins', () => { | |
| test('news_1776330000_small_bug_fixes_for_all_plug_ins: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/news/1776330000/small-bug-fixes-for-all-plug-ins/'); | |
| 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('news_1776330000_small_bug_fixes_for_all_plug_ins: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/news/1776330000/small-bug-fixes-for-all-plug-ins/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('news_1776330000_small_bug_fixes_for_all_plug_ins: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/news/1776330000/small-bug-fixes-for-all-plug-ins/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_presets_loadingpresets', () => { | |
| test('help_pro_c_presets_loadingpresets: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/presets/loadingpresets/'); | |
| 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('help_pro_c_presets_loadingpresets: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/presets/loadingpresets/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_presets_loadingpresets: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/presets/loadingpresets/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_displays', () => { | |
| test('help_pro_c_using_displays: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/displays/'); | |
| 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('help_pro_c_using_displays: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/displays/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_displays: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/displays/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_dynamicscontrols', () => { | |
| test('help_pro_c_using_dynamicscontrols: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/dynamicscontrols/'); | |
| 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('help_pro_c_using_dynamicscontrols: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/dynamicscontrols/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_dynamicscontrols: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/dynamicscontrols/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_midilearn', () => { | |
| test('help_pro_c_using_midilearn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/midilearn/'); | |
| 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('help_pro_c_using_midilearn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/midilearn/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_midilearn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/midilearn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_oversampling', () => { | |
| test('help_pro_c_using_oversampling: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/oversampling/'); | |
| 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('help_pro_c_using_oversampling: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/oversampling/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_oversampling: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/oversampling/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_sidechainsection', () => { | |
| test('help_pro_c_using_sidechainsection: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/sidechainsection/'); | |
| 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('help_pro_c_using_sidechainsection: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/sidechainsection/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_sidechainsection: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/sidechainsection/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_styleandcharacter', () => { | |
| test('help_pro_c_using_styleandcharacter: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/styleandcharacter/'); | |
| 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('help_pro_c_using_styleandcharacter: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/styleandcharacter/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_styleandcharacter: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/styleandcharacter/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_surround', () => { | |
| test('help_pro_c_using_surround: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/surround/'); | |
| 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('help_pro_c_using_surround: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/surround/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_surround: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/surround/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_c_using_timecontrols', () => { | |
| test('help_pro_c_using_timecontrols: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/timecontrols/'); | |
| 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('help_pro_c_using_timecontrols: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-c/using/timecontrols/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_c_using_timecontrols: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-c/using/timecontrols/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_l_using_advancedsettings', () => { | |
| test('help_pro_l_using_advancedsettings: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/advancedsettings/'); | |
| 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('help_pro_l_using_advancedsettings: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/advancedsettings/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_l_using_advancedsettings: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-l/using/advancedsettings/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_l_using_dithering', () => { | |
| test('help_pro_l_using_dithering: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/dithering/'); | |
| 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('help_pro_l_using_dithering: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/dithering/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_l_using_dithering: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-l/using/dithering/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_l_using_loudnessmetering', () => { | |
| test('help_pro_l_using_loudnessmetering: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/loudnessmetering/'); | |
| 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('help_pro_l_using_loudnessmetering: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/loudnessmetering/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_l_using_loudnessmetering: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-l/using/loudnessmetering/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_l_using_metering', () => { | |
| test('help_pro_l_using_metering: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/metering/'); | |
| 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('help_pro_l_using_metering: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/metering/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_l_using_metering: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-l/using/metering/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_l_using_oversampling', () => { | |
| test('help_pro_l_using_oversampling: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/oversampling/'); | |
| 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('help_pro_l_using_oversampling: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-l/using/oversampling/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_l_using_oversampling: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-l/using/oversampling/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_analyzer', () => { | |
| test('help_pro_q_using_analyzer: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/analyzer/'); | |
| 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('help_pro_q_using_analyzer: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/analyzer/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_analyzer: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/analyzer/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_character_mode', () => { | |
| test('help_pro_q_using_character_mode: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/character-mode/'); | |
| 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('help_pro_q_using_character_mode: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/character-mode/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_character_mode: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/character-mode/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_dynamic_eq', () => { | |
| test('help_pro_q_using_dynamic_eq: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/dynamic-eq/'); | |
| 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('help_pro_q_using_dynamic_eq: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/dynamic-eq/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_dynamic_eq: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/dynamic-eq/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_eq_sketch', () => { | |
| test('help_pro_q_using_eq_sketch: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eq-sketch/'); | |
| 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('help_pro_q_using_eq_sketch: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eq-sketch/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_eq_sketch: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/eq-sketch/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_eqdisplay', () => { | |
| test('help_pro_q_using_eqdisplay: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eqdisplay/'); | |
| 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('help_pro_q_using_eqdisplay: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eqdisplay/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_eqdisplay: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/eqdisplay/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_eqmatch', () => { | |
| test('help_pro_q_using_eqmatch: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eqmatch/'); | |
| 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('help_pro_q_using_eqmatch: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/eqmatch/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_eqmatch: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/eqmatch/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_fullscreenandresize', () => { | |
| test('help_pro_q_using_fullscreenandresize: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/fullscreenandresize/'); | |
| 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('help_pro_q_using_fullscreenandresize: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/fullscreenandresize/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_fullscreenandresize: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/fullscreenandresize/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_instance_list', () => { | |
| test('help_pro_q_using_instance_list: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/instance-list/'); | |
| 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('help_pro_q_using_instance_list: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/instance-list/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_instance_list: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/instance-list/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_midilearn', () => { | |
| test('help_pro_q_using_midilearn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/midilearn/'); | |
| 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('help_pro_q_using_midilearn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/midilearn/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_midilearn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/midilearn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_output', () => { | |
| test('help_pro_q_using_output: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/output/'); | |
| 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('help_pro_q_using_output: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/output/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_output: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/output/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_processingmode', () => { | |
| test('help_pro_q_using_processingmode: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/processingmode/'); | |
| 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('help_pro_q_using_processingmode: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/processingmode/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_processingmode: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/processingmode/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_solo', () => { | |
| test('help_pro_q_using_solo: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/solo/'); | |
| 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('help_pro_q_using_solo: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/solo/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_solo: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/solo/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_spectral_dynamics', () => { | |
| test('help_pro_q_using_spectral_dynamics: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/spectral-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('help_pro_q_using_spectral_dynamics: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/spectral-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('help_pro_q_using_spectral_dynamics: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/spectral-dynamics/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_spectrumgrab', () => { | |
| test('help_pro_q_using_spectrumgrab: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/spectrumgrab/'); | |
| 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('help_pro_q_using_spectrumgrab: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/spectrumgrab/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_spectrumgrab: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/spectrumgrab/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_stereo', () => { | |
| test('help_pro_q_using_stereo: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/stereo/'); | |
| 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('help_pro_q_using_stereo: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/stereo/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_stereo: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/stereo/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - help_pro_q_using_surround', () => { | |
| test('help_pro_q_using_surround: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/surround/'); | |
| 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('help_pro_q_using_surround: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/help/pro-q/using/surround/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('help_pro_q_using_surround: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/help/pro-q/using/surround/'); | |
| 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('/artists/'); | |
| 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('/download/'); | |
| 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); | |
| } | |
| } | |
| } | |
| }); | |
| }); | |