import { test, expect } from '@playwright/test'; test.describe('Structural - homepage', () => { test('homepage: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('homepage: heading hierarchy is valid', async ({ page }) => { await page.goto('/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('homepage: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum', () => { test('about_the_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - calendar', () => { test('calendar: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/calendar/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('calendar: heading hierarchy is valid', async ({ page }) => { await page.goto('/calendar/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('calendar: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/calendar/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - discover_your_membership', () => { test('discover_your_membership: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/discover-your-membership/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('discover_your_membership: heading hierarchy is valid', async ({ page }) => { await page.goto('/discover-your-membership/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('discover_your_membership: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/discover-your-membership/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions', () => { test('exhibitions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_and_research_design_museum_research', () => { test('learning_and_research_design_museum_research: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_and_research_design_museum_research: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_and_research_design_museum_research: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-and-research/design-museum-research/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_and_research_design_museum_research_future_observatory', () => { test('learning_and_research_design_museum_research_future_observatory: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/future-observatory/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_and_research_design_museum_research_future_observatory: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/future-observatory/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_and_research_design_museum_research_future_observatory: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-and-research/design-museum-research/future-observatory/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence', () => { test('learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_at_the_museum', () => { test('learning_at_the_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-at-the-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_at_the_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-at-the-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_at_the_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-at-the-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_at_the_museum_ma_curating_contemporary_design', () => { test('learning_at_the_museum_ma_curating_contemporary_design: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-at-the-museum/ma-curating-contemporary-design/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_at_the_museum_ma_curating_contemporary_design: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-at-the-museum/ma-curating-contemporary-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('learning_at_the_museum_ma_curating_contemporary_design: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-at-the-museum/ma-curating-contemporary-design/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_at_the_museum_schools', () => { test('learning_at_the_museum_schools: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_at_the_museum_schools: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_at_the_museum_schools: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-at-the-museum/schools/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - our_international_work', () => { test('our_international_work: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/our-international-work/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('our_international_work: heading hierarchy is valid', async ({ page }) => { await page.goto('/our-international-work/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('our_international_work: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/our-international-work/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - our_international_work_consultancy_services', () => { test('our_international_work_consultancy_services: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/our-international-work/consultancy-services/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('our_international_work_consultancy_services: heading hierarchy is valid', async ({ page }) => { await page.goto('/our-international-work/consultancy-services/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('our_international_work_consultancy_services: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/our-international-work/consultancy-services/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - our_international_work_international_partnerships', () => { test('our_international_work_international_partnerships: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/our-international-work/international-partnerships/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('our_international_work_international_partnerships: heading hierarchy is valid', async ({ page }) => { await page.goto('/our-international-work/international-partnerships/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('our_international_work_international_partnerships: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/our-international-work/international-partnerships/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_contact_information', () => { test('plan_your_visit_contact_information: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/contact-information/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_contact_information: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/contact-information/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_contact_information: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/contact-information/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_museum_shops', () => { test('plan_your_visit_museum_shops: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/museum-shops/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_museum_shops: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/museum-shops/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_museum_shops: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/museum-shops/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_opening_hours', () => { test('plan_your_visit_opening_hours: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/opening-hours/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_opening_hours: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/opening-hours/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_opening_hours: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/opening-hours/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - press_office', () => { test('press_office: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/press-office/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('press_office: heading hierarchy is valid', async ({ page }) => { await page.goto('/press-office/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_office: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/press-office/'); 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('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 - support_the_museum_individual_support', () => { test('support_the_museum_individual_support: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/support-the-museum/individual-support/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('support_the_museum_individual_support: heading hierarchy is valid', async ({ page }) => { await page.goto('/support-the-museum/individual-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_the_museum_individual_support: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/support-the-museum/individual-support/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - support_us_thank_you_for_your_support', () => { test('support_us_thank_you_for_your_support: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/support-us/thank-you-for-your-support/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('support_us_thank_you_for_your_support: heading hierarchy is valid', async ({ page }) => { await page.goto('/support-us/thank-you-for-your-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_us_thank_you_for_your_support: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/support-us/thank-you-for-your-support/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - support_us_trusts_and_foundations', () => { test('support_us_trusts_and_foundations: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/support-us/trusts-and-foundations/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('support_us_trusts_and_foundations: heading hierarchy is valid', async ({ page }) => { await page.goto('/support-us/trusts-and-foundations/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_us_trusts_and_foundations: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/support-us/trusts-and-foundations/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire', () => { test('venue_hire: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on', () => { test('whats_on: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_families_and_young_people', () => { test('whats_on_families_and_young_people: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/families-and-young-people/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_families_and_young_people: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/families-and-young-people/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_families_and_young_people: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/families-and-young-people/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops', () => { test('whats_on_talks_courses_and_workshops: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_design_museum_collection', () => { test('about_the_museum_design_museum_collection: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/design-museum-collection/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_design_museum_collection: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/design-museum-collection/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_design_museum_collection: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/design-museum-collection/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_governance', () => { test('about_the_museum_governance: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/governance/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_governance: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/governance/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_governance: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/governance/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_immunity_from_seizure', () => { test('about_the_museum_immunity_from_seizure: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/immunity-from-seizure/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_immunity_from_seizure: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/immunity-from-seizure/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_immunity_from_seizure: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/immunity-from-seizure/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_independent_research_organisation_iro_status', () => { test('about_the_museum_independent_research_organisation_iro_status: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/independent-research-organisation-iro-status/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_independent_research_organisation_iro_status: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/independent-research-organisation-iro-status/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_independent_research_organisation_iro_status: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/independent-research-organisation-iro-status/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_the_design_museums_dna', () => { test('about_the_museum_the_design_museums_dna: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/the-design-museums-dna/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_the_design_museums_dna: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/the-design-museums-dna/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_the_design_museums_dna: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/the-design-museums-dna/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_the_story_of_the_design_museum', () => { test('about_the_museum_the_story_of_the_design_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/the-story-of-the-design-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_the_story_of_the_design_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/the-story-of-the-design-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_the_story_of_the_design_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/the-story-of-the-design-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_transformation_2029', () => { test('about_the_museum_transformation_2029: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/transformation-2029/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_transformation_2029: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/transformation-2029/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_transformation_2029: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/transformation-2029/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_volunteer_at_the_museum', () => { test('about_the_museum_volunteer_at_the_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/volunteer-at-the-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_volunteer_at_the_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/volunteer-at-the-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_the_museum_volunteer_at_the_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/volunteer-at-the-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - about_the_museum_work_with_us', () => { test('about_the_museum_work_with_us: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/about-the-museum/work-with-us/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('about_the_museum_work_with_us: heading hierarchy is valid', async ({ page }) => { await page.goto('/about-the-museum/work-with-us/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('about_the_museum_work_with_us: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/about-the-museum/work-with-us/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - become_a_member_get_in_touch_with_membership', () => { test('become_a_member_get_in_touch_with_membership: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/become-a-member/get-in-touch-with-membership/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('become_a_member_get_in_touch_with_membership: heading hierarchy is valid', async ({ page }) => { await page.goto('/become-a-member/get-in-touch-with-membership/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('become_a_member_get_in_touch_with_membership: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/become-a-member/get-in-touch-with-membership/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - become_a_member_give_the_gift_of_membership', () => { test('become_a_member_give_the_gift_of_membership: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/become-a-member/give-the-gift-of-membership/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('become_a_member_give_the_gift_of_membership: heading hierarchy is valid', async ({ page }) => { await page.goto('/become-a-member/give-the-gift-of-membership/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('become_a_member_give_the_gift_of_membership: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/become-a-member/give-the-gift-of-membership/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - design_design_museum_publishing', () => { test('design_design_museum_publishing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/design/design-museum-publishing/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('design_design_museum_publishing: heading hierarchy is valid', async ({ page }) => { await page.goto('/design/design-museum-publishing/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('design_design_museum_publishing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/design/design-museum-publishing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_ai_da_portrait_of_the_robot', () => { test('exhibitions_ai_da_portrait_of_the_robot: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/ai-da-portrait-of-the-robot/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_ai_da_portrait_of_the_robot: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/ai-da-portrait-of-the-robot/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_ai_da_portrait_of_the_robot: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/ai-da-portrait-of-the-robot/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_ai_weiwei_making_sense', () => { test('exhibitions_ai_weiwei_making_sense: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/ai-weiwei-making-sense/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_ai_weiwei_making_sense: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/ai-weiwei-making-sense/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_ai_weiwei_making_sense: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/ai-weiwei-making-sense/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_antifurniture', () => { test('exhibitions_antifurniture: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/antifurniture/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_antifurniture: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/antifurniture/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_antifurniture: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/antifurniture/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_ardagh_young_creatives_gathering_for_nature', () => { test('exhibitions_ardagh_young_creatives_gathering_for_nature: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_ardagh_young_creatives_gathering_for_nature: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_ardagh_young_creatives_gathering_for_nature: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_aurora', () => { test('exhibitions_aurora: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/aurora/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_aurora: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/aurora/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_aurora: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/aurora/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_autonomous_morris', () => { test('exhibitions_autonomous_morris: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/autonomous-morris/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_autonomous_morris: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/autonomous-morris/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_autonomous_morris: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/autonomous-morris/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_azzedine_alaa_the_couturier', () => { test('exhibitions_azzedine_alaa_the_couturier: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/azzedine-alaa-the-couturier/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_azzedine_alaa_the_couturier: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/azzedine-alaa-the-couturier/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_azzedine_alaa_the_couturier: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/azzedine-alaa-the-couturier/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_beazley_designs_of_the_year', () => { test('exhibitions_beazley_designs_of_the_year: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/beazley-designs-of-the-year/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_beazley_designs_of_the_year: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/beazley-designs-of-the-year/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_beazley_designs_of_the_year: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/beazley-designs-of-the-year/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_bethany_williams_alternative_systems', () => { test('exhibitions_bethany_williams_alternative_systems: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/bethany-williams-alternative-systems/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_bethany_williams_alternative_systems: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/bethany-williams-alternative-systems/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_bethany_williams_alternative_systems: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/bethany-williams-alternative-systems/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_blitz_the_club_that_shaped_the_80s', () => { test('exhibitions_blitz_the_club_that_shaped_the_80s: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_blitz_the_club_that_shaped_the_80s: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_blitz_the_club_that_shaped_the_80s: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_changing_spaces_60_years_of_design_with_habitat', () => { test('exhibitions_changing_spaces_60_years_of_design_with_habitat: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_changing_spaces_60_years_of_design_with_habitat: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_changing_spaces_60_years_of_design_with_habitat: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_design_researchers_in_residence_202526_mineral', () => { test('exhibitions_design_researchers_in_residence_202526_mineral: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_design_researchers_in_residence_202526_mineral: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_design_researchers_in_residence_202526_mineral: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_design_researchers_in_residence_artificial', () => { test('exhibitions_design_researchers_in_residence_artificial: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-artificial/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_design_researchers_in_residence_artificial: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-artificial/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_design_researchers_in_residence_artificial: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/design-researchers-in-residence-artificial/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_design_researchers_in_residence_solar_display', () => { test('exhibitions_design_researchers_in_residence_solar_display: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-solar-display/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_design_researchers_in_residence_solar_display: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/design-researchers-in-residence-solar-display/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_design_researchers_in_residence_solar_display: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/design-researchers-in-residence-solar-display/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_design_ventura_2021_2022', () => { test('exhibitions_design_ventura_2021_2022: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/design-ventura-2021-2022/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_design_ventura_2021_2022: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/design-ventura-2021-2022/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_design_ventura_2021_2022: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/design-ventura-2021-2022/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_designer_maker_user', () => { test('exhibitions_designer_maker_user: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/designer-maker-user/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_designer_maker_user: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/designer-maker-user/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_designer_maker_user: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/designer-maker-user/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_designing_for_our_future_selves', () => { test('exhibitions_designing_for_our_future_selves: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/designing-for-our-future-selves/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_designing_for_our_future_selves: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/designing-for-our-future-selves/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_designing_for_our_future_selves: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/designing-for-our-future-selves/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_dwellings_rehomed', () => { test('exhibitions_dwellings_rehomed: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/dwellings-rehomed/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_dwellings_rehomed: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/dwellings-rehomed/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_dwellings_rehomed: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/dwellings-rehomed/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_email_is_dead', () => { test('exhibitions_email_is_dead: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/email-is-dead/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_email_is_dead: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/email-is-dead/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_email_is_dead: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/email-is-dead/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_enzo_mari', () => { test('exhibitions_enzo_mari: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/enzo-mari/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_enzo_mari: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/enzo-mari/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_es_devlin', () => { test('exhibitions_es_devlin: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/es-devlin/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_es_devlin: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/es-devlin/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_es_devlin: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/es-devlin/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_fables_for_our_time', () => { test('exhibitions_fables_for_our_time: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/fables-for-our-time/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_fables_for_our_time: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/fables-for-our-time/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_fables_for_our_time: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/fables-for-our-time/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_ferrari_under_the_skin', () => { test('exhibitions_ferrari_under_the_skin: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/ferrari-under-the-skin/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_ferrari_under_the_skin: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/ferrari-under-the-skin/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_ferrari_under_the_skin: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/ferrari-under-the-skin/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_football_designing_the_beautiful_game', () => { test('exhibitions_football_designing_the_beautiful_game: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/football-designing-the-beautiful-game/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_football_designing_the_beautiful_game: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/football-designing-the-beautiful-game/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_football_designing_the_beautiful_game: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/football-designing-the-beautiful-game/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_fred_perry_a_british_icon', () => { test('exhibitions_fred_perry_a_british_icon: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/fred-perry-a-british-icon/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_fred_perry_a_british_icon: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/fred-perry-a-british-icon/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_fred_perry_a_british_icon: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/fred-perry-a-british-icon/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_future_exhibitions_and_displays', () => { test('exhibitions_future_exhibitions_and_displays: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/future-exhibitions-and-displays/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_future_exhibitions_and_displays: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/future-exhibitions-and-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('exhibitions_future_exhibitions_and_displays: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/future-exhibitions-and-displays/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_future_observatory_display', () => { test('exhibitions_future_observatory_display: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/future-observatory-display/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_future_observatory_display: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/future-observatory-display/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_future_observatory_display: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/future-observatory-display/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_future_observatory_tomorrows_wardrobe', () => { test('exhibitions_future_observatory_tomorrows_wardrobe: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_future_observatory_tomorrows_wardrobe: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_future_observatory_tomorrows_wardrobe: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_future_observatory_tools_for_transition', () => { test('exhibitions_future_observatory_tools_for_transition: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/future-observatory-tools-for-transition/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_future_observatory_tools_for_transition: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/future-observatory-tools-for-transition/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_future_observatory_tools_for_transition: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/future-observatory-tools-for-transition/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari', () => { test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_harland_miller_at_the_design_museum', () => { test('exhibitions_harland_miller_at_the_design_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/harland-miller-at-the-design-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_harland_miller_at_the_design_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/harland-miller-at-the-design-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_harland_miller_at_the_design_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/harland-miller-at-the-design-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_homage_to_carnival', () => { test('exhibitions_homage_to_carnival: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/homage-to-carnival/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_homage_to_carnival: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/homage-to-carnival/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_homage_to_carnival: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/homage-to-carnival/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_hope_to_nope_graphics_and_politics_2008_18', () => { test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_how_to_build_a_low_carbon_home', () => { test('exhibitions_how_to_build_a_low_carbon_home: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/how-to-build-a-low-carbon-home/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_how_to_build_a_low_carbon_home: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/how-to-build-a-low-carbon-home/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_how_to_build_a_low_carbon_home: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/how-to-build-a-low-carbon-home/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_loewe_craft_prize_2018', () => { test('exhibitions_loewe_craft_prize_2018: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/loewe-craft-prize-2018/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_loewe_craft_prize_2018: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/loewe-craft-prize-2018/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_loewe_craft_prize_2018: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/loewe-craft-prize-2018/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_margaret_calvert_woman_at_work', () => { test('exhibitions_margaret_calvert_woman_at_work: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/margaret-calvert-woman-at-work/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_margaret_calvert_woman_at_work: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/margaret-calvert-woman-at-work/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_margaret_calvert_woman_at_work: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/margaret-calvert-woman-at-work/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_marina_willer_x_pith_sketching_with_stickers', () => { test('exhibitions_marina_willer_x_pith_sketching_with_stickers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_marina_willer_x_pith_sketching_with_stickers: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_marina_willer_x_pith_sketching_with_stickers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london', () => { test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_more_than_human', () => { test('exhibitions_more_than_human: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/more-than-human/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_more_than_human: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/more-than-human/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_more_than_human: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/more-than-human/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_moving_to_mars', () => { test('exhibitions_moving_to_mars: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/moving-to-mars/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_moving_to_mars: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/moving-to-mars/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_moving_to_mars: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/moving-to-mars/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_nigo_from_japan_with_love', () => { test('exhibitions_nigo_from_japan_with_love: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/nigo-from-japan-with-love/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_nigo_from_japan_with_love: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/nigo-from-japan-with-love/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_nigo_from_japan_with_love: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/nigo-from-japan-with-love/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_objects_of_desire_surrealism_and_design_1924_today', () => { test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_open_monuments_by_melek_zeynep_bulut', () => { test('exhibitions_open_monuments_by_melek_zeynep_bulut: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_open_monuments_by_melek_zeynep_bulut: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_open_monuments_by_melek_zeynep_bulut: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_past_exhibitions', () => { test('exhibitions_past_exhibitions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/past-exhibitions/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_past_exhibitions: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/past-exhibitions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_past_exhibitions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/past-exhibitions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_platform_bethan_laura_wood', () => { test('exhibitions_platform_bethan_laura_wood: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/platform-bethan-laura-wood/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_platform_bethan_laura_wood: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/platform-bethan-laura-wood/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_platform_bethan_laura_wood: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/platform-bethan-laura-wood/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_rebel_30_years_of_london_fashion', () => { test('exhibitions_rebel_30_years_of_london_fashion: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/rebel-30-years-of-london-fashion/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_rebel_30_years_of_london_fashion: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/rebel-30-years-of-london-fashion/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_rebel_30_years_of_london_fashion: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/rebel-30-years-of-london-fashion/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_splash_a_century_of_swimming_and_style', () => { test('exhibitions_splash_a_century_of_swimming_and_style: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_splash_a_century_of_swimming_and_style: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_splash_a_century_of_swimming_and_style: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_stanley_kubrick_the_exhibition', () => { test('exhibitions_stanley_kubrick_the_exhibition: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/stanley-kubrick-the-exhibition/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_stanley_kubrick_the_exhibition: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/stanley-kubrick-the-exhibition/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_stanley_kubrick_the_exhibition: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/stanley-kubrick-the-exhibition/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_future_of_ageing', () => { test('exhibitions_the_future_of_ageing: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-future-of-ageing/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_future_of_ageing: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-future-of-ageing/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_future_of_ageing: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-future-of-ageing/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_nue_black_aesthetic', () => { test('exhibitions_the_nue_black_aesthetic: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-nue-black-aesthetic/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_nue_black_aesthetic: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-nue-black-aesthetic/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_nue_black_aesthetic: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-nue-black-aesthetic/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_oak_collection', () => { test('exhibitions_the_oak_collection: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-oak-collection/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_oak_collection: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-oak-collection/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_oak_collection: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-oak-collection/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_offbeat_sari', () => { test('exhibitions_the_offbeat_sari: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-offbeat-sari/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_offbeat_sari: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-offbeat-sari/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_offbeat_sari: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-offbeat-sari/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_ralph_saltzman_prize_2022', () => { test('exhibitions_the_ralph_saltzman_prize_2022: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_ralph_saltzman_prize_2022: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_ralph_saltzman_prize_2022: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_ralph_saltzman_prize_2023', () => { test('exhibitions_the_ralph_saltzman_prize_2023: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_ralph_saltzman_prize_2023: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_ralph_saltzman_prize_2023: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_ralph_saltzman_prize_2025', () => { test('exhibitions_the_ralph_saltzman_prize_2025: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_ralph_saltzman_prize_2025: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_ralph_saltzman_prize_2025: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_the_world_of_tim_burton', () => { test('exhibitions_the_world_of_tim_burton: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/the-world-of-tim-burton/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_the_world_of_tim_burton: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/the-world-of-tim-burton/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_the_world_of_tim_burton: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/the-world-of-tim-burton/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_touring_exhibitions', () => { test('exhibitions_touring_exhibitions: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_touring_exhibitions: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_touring_exhibitions: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/touring-exhibitions/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_weird_sensation_feels_good_the_world_of_asmr', () => { test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_wes_anderson_the_archives', () => { test('exhibitions_wes_anderson_the_archives: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/wes-anderson-the-archives/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_wes_anderson_the_archives: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/wes-anderson-the-archives/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_wes_anderson_the_archives: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/wes-anderson-the-archives/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_at_the_museum_schools_self_guided_visits_for_learning_groups', () => { test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - learning_at_the_museum_schools_workshops_for_schools', () => { test('learning_at_the_museum_schools_workshops_for_schools: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/workshops-for-schools/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('learning_at_the_museum_schools_workshops_for_schools: heading hierarchy is valid', async ({ page }) => { await page.goto('/learning-at-the-museum/schools/workshops-for-schools/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('learning_at_the_museum_schools_workshops_for_schools: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/learning-at-the-museum/schools/workshops-for-schools/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_faq_for_visitors', () => { test('plan_your_visit_faq_for_visitors: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/faq-for-visitors/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_faq_for_visitors: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/faq-for-visitors/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_faq_for_visitors: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/faq-for-visitors/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_food_drink_qa_with_matthew_williamson', () => { test('plan_your_visit_food_drink_qa_with_matthew_williamson: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_food_drink_qa_with_matthew_williamson: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_food_drink_qa_with_matthew_williamson: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - plan_your_visit_stay_connected', () => { test('plan_your_visit_stay_connected: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/plan-your-visit/stay-connected/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('plan_your_visit_stay_connected: heading hierarchy is valid', async ({ page }) => { await page.goto('/plan-your-visit/stay-connected/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('plan_your_visit_stay_connected: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/plan-your-visit/stay-connected/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - support_us_corporate_support_nyetimber', () => { test('support_us_corporate_support_nyetimber: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/support-us/corporate-support/nyetimber/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('support_us_corporate_support_nyetimber: heading hierarchy is valid', async ({ page }) => { await page.goto('/support-us/corporate-support/nyetimber/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_us_corporate_support_nyetimber: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/support-us/corporate-support/nyetimber/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - support_us_ticket_mate_fund', () => { test('support_us_ticket_mate_fund: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/support-us/ticket-mate-fund/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('support_us_ticket_mate_fund: heading hierarchy is valid', async ({ page }) => { await page.goto('/support-us/ticket-mate-fund/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); 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_us_ticket_mate_fund: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/support-us/ticket-mate-fund/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_approved_suppliers', () => { test('venue_hire_approved_suppliers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/approved-suppliers/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_approved_suppliers: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/approved-suppliers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_approved_suppliers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/approved-suppliers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_brand_activations_and_exclusive_events', () => { test('venue_hire_brand_activations_and_exclusive_events: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/brand-activations-and-exclusive-events/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_brand_activations_and_exclusive_events: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/brand-activations-and-exclusive-events/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_brand_activations_and_exclusive_events: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/brand-activations-and-exclusive-events/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_design_museum_events_catering', () => { test('venue_hire_design_museum_events_catering: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/design-museum-events-catering/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_design_museum_events_catering: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/design-museum-events-catering/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_design_museum_events_catering: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/design-museum-events-catering/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_enquire_about_venue_hire', () => { test('venue_hire_enquire_about_venue_hire: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/enquire-about-venue-hire/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_enquire_about_venue_hire: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/enquire-about-venue-hire/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_enquire_about_venue_hire: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/enquire-about-venue-hire/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_environmental_impact_roadmap', () => { test('venue_hire_environmental_impact_roadmap: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/environmental-impact-roadmap/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_environmental_impact_roadmap: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/environmental-impact-roadmap/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_environmental_impact_roadmap: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/environmental-impact-roadmap/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_filming_photography_at_the_design_museum', () => { test('venue_hire_filming_photography_at_the_design_museum: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/filming-photography-at-the-design-museum/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_filming_photography_at_the_design_museum: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/filming-photography-at-the-design-museum/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_filming_photography_at_the_design_museum: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/filming-photography-at-the-design-museum/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_tour_packages_unique_offers', () => { test('venue_hire_tour_packages_unique_offers: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/tour-packages-unique-offers/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_tour_packages_unique_offers: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/tour-packages-unique-offers/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_tour_packages_unique_offers: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/tour-packages-unique-offers/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - venue_hire_view_and_download_the_events_brochure', () => { test('venue_hire_view_and_download_the_events_brochure: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/venue-hire/view-and-download-the-events-brochure/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('venue_hire_view_and_download_the_events_brochure: heading hierarchy is valid', async ({ page }) => { await page.goto('/venue-hire/view-and-download-the-events-brochure/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('venue_hire_view_and_download_the_events_brochure: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/venue-hire/view-and-download-the-events-brochure/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen', () => { test('whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love', () => { test('whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform', () => { test('whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate', () => { test('whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_curating_design_between_word_and_world', () => { test('whats_on_talks_courses_and_workshops_curating_design_between_word_and_world: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_curating_design_between_word_and_world: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_curating_design_between_word_and_world: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love', () => { test('whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster', () => { test('whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric', () => { test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours', () => { test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_summer_garden_salon', () => { test('whats_on_talks_courses_and_workshops_summer_garden_salon: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_summer_garden_salon: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_summer_garden_salon: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood', () => { test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke', () => { test('whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork', () => { test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_workshop_natural_dyes', () => { test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket', () => { test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: heading hierarchy is valid', async ({ page }) => { await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - your_membership_archive_your_membership_events_archive_exclusive_events_for_members', () => { test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: heading hierarchy is valid', async ({ page }) => { await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - designers_designers_in_residence_designers_in_residence_2020_care', () => { test('designers_designers_in_residence_designers_in_residence_2020_care: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('designers_designers_in_residence_designers_in_residence_2020_care: heading hierarchy is valid', async ({ page }) => { await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('designers_designers_in_residence_designers_in_residence_2020_care: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_touring_exhibitions_exhibitions_for_hire', () => { test('exhibitions_touring_exhibitions_exhibitions_for_hire: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_touring_exhibitions_exhibitions_for_hire: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_touring_exhibitions_exhibitions_for_hire: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/'); await page.waitForTimeout(500); const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); expect(scrollWidth).toBeLessThanOrEqual(385); }); }); test.describe('Structural - exhibitions_touring_exhibitions_see_a_touring_exhibition', () => { test('exhibitions_touring_exhibitions_see_a_touring_exhibition: reproduces GT semantic landmarks', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/'); expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); }); test('exhibitions_touring_exhibitions_see_a_touring_exhibition: heading hierarchy is valid', async ({ page }) => { await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/'); const headingLevels = await page.evaluate(() => { const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); }); if (headingLevels.length > 1) { for (let i = 1; i < headingLevels.length; i++) { const jump = headingLevels[i] - headingLevels[i-1]; expect(jump).toBeLessThanOrEqual(2); } } }); test('exhibitions_touring_exhibitions_see_a_touring_exhibition: no horizontal overflow at 375px', async ({ page }) => { await page.setViewportSize({ width: 375, height: 812 }); await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/'); 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-the-museum/'); 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('/calendar/'); 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('/discover-your-membership/'); 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); } } } }); });