RecreationBench / web /formora.example /tests /static /hygiene.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 33)
76b0320 verified
Raw History Blame Contribute Delete
174 kB
import { test, expect } from '@playwright/test';
test.describe('Quality - homepage', () => {
test('homepage: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('homepage: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('homepage: images have alt attributes', async ({ page }) => {
await page.goto('/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum', () => {
test('about_the_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - calendar', () => {
test('calendar: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/calendar/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('calendar: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/calendar/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('calendar: images have alt attributes', async ({ page }) => {
await page.goto('/calendar/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - discover_your_membership', () => {
test('discover_your_membership: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/discover-your-membership/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('discover_your_membership: images load correctly', async ({ page }) => {
await page.goto('/discover-your-membership/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('discover_your_membership: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/discover-your-membership/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions', () => {
test('exhibitions: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - learning_and_research_design_museum_research', () => {
test('learning_and_research_design_museum_research: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-and-research/design-museum-research/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_and_research_design_museum_research: images load correctly', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('learning_and_research_design_museum_research: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - learning_and_research_design_museum_research_future_observatory', () => {
test('learning_and_research_design_museum_research_future_observatory: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-and-research/design-museum-research/future-observatory/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_and_research_design_museum_research_future_observatory: images load correctly', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/future-observatory/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('learning_and_research_design_museum_research_future_observatory: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/future-observatory/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('learning_and_research_design_museum_research_future_observatory_design_researchers_in_residence: images have alt attributes', async ({ page }) => {
await page.goto('/learning-and-research/design-museum-research/future-observatory/design-researchers-in-residence/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - learning_at_the_museum', () => {
test('learning_at_the_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-at-the-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_at_the_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-at-the-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('learning_at_the_museum: images have alt attributes', async ({ page }) => {
await page.goto('/learning-at-the-museum/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - learning_at_the_museum_ma_curating_contemporary_design', () => {
test('learning_at_the_museum_ma_curating_contemporary_design: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-at-the-museum/ma-curating-contemporary-design/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_at_the_museum_ma_curating_contemporary_design: images load correctly', async ({ page }) => {
await page.goto('/learning-at-the-museum/ma-curating-contemporary-design/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('learning_at_the_museum_ma_curating_contemporary_design: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-at-the-museum/ma-curating-contemporary-design/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - learning_at_the_museum_schools', () => {
test('learning_at_the_museum_schools: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-at-the-museum/schools/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_at_the_museum_schools: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('learning_at_the_museum_schools: images have alt attributes', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - our_international_work', () => {
test('our_international_work: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/our-international-work/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('our_international_work: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/our-international-work/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('our_international_work: images have alt attributes', async ({ page }) => {
await page.goto('/our-international-work/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - our_international_work_consultancy_services', () => {
test('our_international_work_consultancy_services: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/our-international-work/consultancy-services/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('our_international_work_consultancy_services: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/our-international-work/consultancy-services/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('our_international_work_consultancy_services: images have alt attributes', async ({ page }) => {
await page.goto('/our-international-work/consultancy-services/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - our_international_work_international_partnerships', () => {
test('our_international_work_international_partnerships: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/our-international-work/international-partnerships/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('our_international_work_international_partnerships: images load correctly', async ({ page }) => {
await page.goto('/our-international-work/international-partnerships/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('our_international_work_international_partnerships: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/our-international-work/international-partnerships/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - plan_your_visit_contact_information', () => {
test('plan_your_visit_contact_information: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/contact-information/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_contact_information: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/contact-information/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plan_your_visit_contact_information: images have alt attributes', async ({ page }) => {
await page.goto('/plan-your-visit/contact-information/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - plan_your_visit_museum_shops', () => {
test('plan_your_visit_museum_shops: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/museum-shops/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_museum_shops: images load correctly', async ({ page }) => {
await page.goto('/plan-your-visit/museum-shops/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('plan_your_visit_museum_shops: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/museum-shops/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - plan_your_visit_opening_hours', () => {
test('plan_your_visit_opening_hours: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/opening-hours/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_opening_hours: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/opening-hours/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plan_your_visit_opening_hours: images have alt attributes', async ({ page }) => {
await page.goto('/plan-your-visit/opening-hours/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - press_office', () => {
test('press_office: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/press-office/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('press_office: images load correctly', async ({ page }) => {
await page.goto('/press-office/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('press_office: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/press-office/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - privacy_policy', () => {
test('privacy_policy: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/privacy-policy/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('privacy_policy: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/privacy-policy/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('privacy_policy: images have alt attributes', async ({ page }) => {
await page.goto('/privacy-policy/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - support_the_museum_individual_support', () => {
test('support_the_museum_individual_support: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support-the-museum/individual-support/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_the_museum_individual_support: images load correctly', async ({ page }) => {
await page.goto('/support-the-museum/individual-support/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('support_the_museum_individual_support: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support-the-museum/individual-support/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - support_us_thank_you_for_your_support', () => {
test('support_us_thank_you_for_your_support: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support-us/thank-you-for-your-support/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_us_thank_you_for_your_support: images load correctly', async ({ page }) => {
await page.goto('/support-us/thank-you-for-your-support/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('support_us_thank_you_for_your_support: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support-us/thank-you-for-your-support/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - support_us_trusts_and_foundations', () => {
test('support_us_trusts_and_foundations: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support-us/trusts-and-foundations/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_us_trusts_and_foundations: images load correctly', async ({ page }) => {
await page.goto('/support-us/trusts-and-foundations/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('support_us_trusts_and_foundations: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support-us/trusts-and-foundations/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire', () => {
test('venue_hire: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('venue_hire: images have alt attributes', async ({ page }) => {
await page.goto('/venue-hire/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - whats_on', () => {
test('whats_on: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('whats_on: images have alt attributes', async ({ page }) => {
await page.goto('/whats-on/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - whats_on_families_and_young_people', () => {
test('whats_on_families_and_young_people: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/families-and-young-people/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_families_and_young_people: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/families-and-young-people/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('whats_on_families_and_young_people: images have alt attributes', async ({ page }) => {
await page.goto('/whats-on/families-and-young-people/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops', () => {
test('whats_on_talks_courses_and_workshops: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('whats_on_talks_courses_and_workshops: images have alt attributes', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_design_museum_collection', () => {
test('about_the_museum_design_museum_collection: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/design-museum-collection/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_design_museum_collection: images load correctly', async ({ page }) => {
await page.goto('/about-the-museum/design-museum-collection/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('about_the_museum_design_museum_collection: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/design-museum-collection/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - about_the_museum_governance', () => {
test('about_the_museum_governance: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/governance/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_governance: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/governance/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_governance: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/governance/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_immunity_from_seizure', () => {
test('about_the_museum_immunity_from_seizure: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/immunity-from-seizure/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_immunity_from_seizure: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/immunity-from-seizure/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_immunity_from_seizure: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/immunity-from-seizure/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_independent_research_organisation_iro_status', () => {
test('about_the_museum_independent_research_organisation_iro_status: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/independent-research-organisation-iro-status/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_independent_research_organisation_iro_status: images load correctly', async ({ page }) => {
await page.goto('/about-the-museum/independent-research-organisation-iro-status/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('about_the_museum_independent_research_organisation_iro_status: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/independent-research-organisation-iro-status/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - about_the_museum_the_design_museums_dna', () => {
test('about_the_museum_the_design_museums_dna: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/the-design-museums-dna/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_the_design_museums_dna: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/the-design-museums-dna/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_the_design_museums_dna: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/the-design-museums-dna/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_the_story_of_the_design_museum', () => {
test('about_the_museum_the_story_of_the_design_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/the-story-of-the-design-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_the_story_of_the_design_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/the-story-of-the-design-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_the_story_of_the_design_museum: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/the-story-of-the-design-museum/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_transformation_2029', () => {
test('about_the_museum_transformation_2029: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/transformation-2029/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_transformation_2029: images load correctly', async ({ page }) => {
await page.goto('/about-the-museum/transformation-2029/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('about_the_museum_transformation_2029: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/transformation-2029/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - about_the_museum_volunteer_at_the_museum', () => {
test('about_the_museum_volunteer_at_the_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/volunteer-at-the-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_volunteer_at_the_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/volunteer-at-the-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_volunteer_at_the_museum: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/volunteer-at-the-museum/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - about_the_museum_work_with_us', () => {
test('about_the_museum_work_with_us: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about-the-museum/work-with-us/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_the_museum_work_with_us: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about-the-museum/work-with-us/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_the_museum_work_with_us: images have alt attributes', async ({ page }) => {
await page.goto('/about-the-museum/work-with-us/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - become_a_member_get_in_touch_with_membership', () => {
test('become_a_member_get_in_touch_with_membership: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/become-a-member/get-in-touch-with-membership/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('become_a_member_get_in_touch_with_membership: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/become-a-member/get-in-touch-with-membership/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('become_a_member_get_in_touch_with_membership: images have alt attributes', async ({ page }) => {
await page.goto('/become-a-member/get-in-touch-with-membership/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - become_a_member_give_the_gift_of_membership', () => {
test('become_a_member_give_the_gift_of_membership: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/become-a-member/give-the-gift-of-membership/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('become_a_member_give_the_gift_of_membership: images load correctly', async ({ page }) => {
await page.goto('/become-a-member/give-the-gift-of-membership/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('become_a_member_give_the_gift_of_membership: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/become-a-member/give-the-gift-of-membership/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - design_design_museum_publishing', () => {
test('design_design_museum_publishing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/design/design-museum-publishing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('design_design_museum_publishing: images load correctly', async ({ page }) => {
await page.goto('/design/design-museum-publishing/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('design_design_museum_publishing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/design/design-museum-publishing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_ai_da_portrait_of_the_robot', () => {
test('exhibitions_ai_da_portrait_of_the_robot: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/ai-da-portrait-of-the-robot/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_ai_da_portrait_of_the_robot: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/ai-da-portrait-of-the-robot/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_ai_da_portrait_of_the_robot: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/ai-da-portrait-of-the-robot/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_ai_weiwei_making_sense', () => {
test('exhibitions_ai_weiwei_making_sense: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/ai-weiwei-making-sense/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_ai_weiwei_making_sense: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/ai-weiwei-making-sense/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_ai_weiwei_making_sense: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/ai-weiwei-making-sense/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_antifurniture', () => {
test('exhibitions_antifurniture: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/antifurniture/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_antifurniture: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/antifurniture/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_antifurniture: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/antifurniture/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_ardagh_young_creatives_gathering_for_nature', () => {
test('exhibitions_ardagh_young_creatives_gathering_for_nature: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_ardagh_young_creatives_gathering_for_nature: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_ardagh_young_creatives_gathering_for_nature: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/ardagh-young-creatives-gathering-for-nature/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_aurora', () => {
test('exhibitions_aurora: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/aurora/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_aurora: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/aurora/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_aurora: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/aurora/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_autonomous_morris', () => {
test('exhibitions_autonomous_morris: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/autonomous-morris/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_autonomous_morris: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/autonomous-morris/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_autonomous_morris: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/autonomous-morris/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_azzedine_alaa_the_couturier', () => {
test('exhibitions_azzedine_alaa_the_couturier: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/azzedine-alaa-the-couturier/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_azzedine_alaa_the_couturier: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/azzedine-alaa-the-couturier/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_azzedine_alaa_the_couturier: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/azzedine-alaa-the-couturier/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_beazley_designs_of_the_year', () => {
test('exhibitions_beazley_designs_of_the_year: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/beazley-designs-of-the-year/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_beazley_designs_of_the_year: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/beazley-designs-of-the-year/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_beazley_designs_of_the_year: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/beazley-designs-of-the-year/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_bethany_williams_alternative_systems', () => {
test('exhibitions_bethany_williams_alternative_systems: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/bethany-williams-alternative-systems/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_bethany_williams_alternative_systems: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/bethany-williams-alternative-systems/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_bethany_williams_alternative_systems: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/bethany-williams-alternative-systems/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_blitz_the_club_that_shaped_the_80s', () => {
test('exhibitions_blitz_the_club_that_shaped_the_80s: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_blitz_the_club_that_shaped_the_80s: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_blitz_the_club_that_shaped_the_80s: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/blitz-the-club-that-shaped-the-80s/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_changing_spaces_60_years_of_design_with_habitat', () => {
test('exhibitions_changing_spaces_60_years_of_design_with_habitat: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_changing_spaces_60_years_of_design_with_habitat: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_changing_spaces_60_years_of_design_with_habitat: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/changing-spaces-60-years-of-design-with-habitat/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_design_researchers_in_residence_202526_mineral', () => {
test('exhibitions_design_researchers_in_residence_202526_mineral: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_design_researchers_in_residence_202526_mineral: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_design_researchers_in_residence_202526_mineral: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-202526-mineral/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_design_researchers_in_residence_artificial', () => {
test('exhibitions_design_researchers_in_residence_artificial: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/design-researchers-in-residence-artificial/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_design_researchers_in_residence_artificial: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-artificial/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_design_researchers_in_residence_artificial: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-artificial/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_design_researchers_in_residence_solar_display', () => {
test('exhibitions_design_researchers_in_residence_solar_display: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/design-researchers-in-residence-solar-display/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_design_researchers_in_residence_solar_display: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-solar-display/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_design_researchers_in_residence_solar_display: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/design-researchers-in-residence-solar-display/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_design_ventura_2021_2022', () => {
test('exhibitions_design_ventura_2021_2022: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/design-ventura-2021-2022/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_design_ventura_2021_2022: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/design-ventura-2021-2022/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_design_ventura_2021_2022: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/design-ventura-2021-2022/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_designer_maker_user', () => {
test('exhibitions_designer_maker_user: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/designer-maker-user/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_designer_maker_user: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/designer-maker-user/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_designer_maker_user: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/designer-maker-user/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_designing_for_our_future_selves', () => {
test('exhibitions_designing_for_our_future_selves: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/designing-for-our-future-selves/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_designing_for_our_future_selves: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/designing-for-our-future-selves/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_designing_for_our_future_selves: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/designing-for-our-future-selves/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_dwellings_rehomed', () => {
test('exhibitions_dwellings_rehomed: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/dwellings-rehomed/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_dwellings_rehomed: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/dwellings-rehomed/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_dwellings_rehomed: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/dwellings-rehomed/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_email_is_dead', () => {
test('exhibitions_email_is_dead: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/email-is-dead/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_email_is_dead: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/email-is-dead/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_email_is_dead: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/email-is-dead/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_enzo_mari', () => {
test('exhibitions_enzo_mari: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/enzo-mari/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_enzo_mari: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/enzo-mari/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_enzo_mari: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/enzo-mari/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_es_devlin', () => {
test('exhibitions_es_devlin: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/es-devlin/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_es_devlin: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/es-devlin/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_es_devlin: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/es-devlin/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_fables_for_our_time', () => {
test('exhibitions_fables_for_our_time: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/fables-for-our-time/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_fables_for_our_time: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/fables-for-our-time/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_fables_for_our_time: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/fables-for-our-time/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_ferrari_under_the_skin', () => {
test('exhibitions_ferrari_under_the_skin: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/ferrari-under-the-skin/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_ferrari_under_the_skin: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/ferrari-under-the-skin/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_ferrari_under_the_skin: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/ferrari-under-the-skin/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_football_designing_the_beautiful_game', () => {
test('exhibitions_football_designing_the_beautiful_game: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/football-designing-the-beautiful-game/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_football_designing_the_beautiful_game: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/football-designing-the-beautiful-game/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_football_designing_the_beautiful_game: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/football-designing-the-beautiful-game/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_fred_perry_a_british_icon', () => {
test('exhibitions_fred_perry_a_british_icon: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/fred-perry-a-british-icon/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_fred_perry_a_british_icon: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/fred-perry-a-british-icon/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_fred_perry_a_british_icon: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/fred-perry-a-british-icon/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_future_exhibitions_and_displays', () => {
test('exhibitions_future_exhibitions_and_displays: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/future-exhibitions-and-displays/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_future_exhibitions_and_displays: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/future-exhibitions-and-displays/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_future_exhibitions_and_displays: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/future-exhibitions-and-displays/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_future_observatory_display', () => {
test('exhibitions_future_observatory_display: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/future-observatory-display/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_future_observatory_display: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-display/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_future_observatory_display: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-display/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_future_observatory_tomorrows_wardrobe', () => {
test('exhibitions_future_observatory_tomorrows_wardrobe: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_future_observatory_tomorrows_wardrobe: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_future_observatory_tomorrows_wardrobe: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-tomorrows-wardrobe/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_future_observatory_tools_for_transition', () => {
test('exhibitions_future_observatory_tools_for_transition: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/future-observatory-tools-for-transition/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_future_observatory_tools_for_transition: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-tools-for-transition/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_future_observatory_tools_for_transition: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/future-observatory-tools-for-transition/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari', () => {
test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_grazie_enzo_contemporary_responses_to_enzo_mari: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/grazie-enzo-contemporary-responses-to-enzo-mari/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_harland_miller_at_the_design_museum', () => {
test('exhibitions_harland_miller_at_the_design_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/harland-miller-at-the-design-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_harland_miller_at_the_design_museum: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/harland-miller-at-the-design-museum/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_harland_miller_at_the_design_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/harland-miller-at-the-design-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_homage_to_carnival', () => {
test('exhibitions_homage_to_carnival: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/homage-to-carnival/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_homage_to_carnival: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/homage-to-carnival/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_homage_to_carnival: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/homage-to-carnival/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_hope_to_nope_graphics_and_politics_2008_18', () => {
test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_hope_to_nope_graphics_and_politics_2008_18: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/hope-to-nope-graphics-and-politics-2008-18/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_how_to_build_a_low_carbon_home', () => {
test('exhibitions_how_to_build_a_low_carbon_home: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/how-to-build-a-low-carbon-home/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_how_to_build_a_low_carbon_home: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/how-to-build-a-low-carbon-home/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_how_to_build_a_low_carbon_home: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/how-to-build-a-low-carbon-home/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_loewe_craft_prize_2018', () => {
test('exhibitions_loewe_craft_prize_2018: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/loewe-craft-prize-2018/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_loewe_craft_prize_2018: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/loewe-craft-prize-2018/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_loewe_craft_prize_2018: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/loewe-craft-prize-2018/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_margaret_calvert_woman_at_work', () => {
test('exhibitions_margaret_calvert_woman_at_work: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/margaret-calvert-woman-at-work/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_margaret_calvert_woman_at_work: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/margaret-calvert-woman-at-work/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_margaret_calvert_woman_at_work: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/margaret-calvert-woman-at-work/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_marina_willer_x_pith_sketching_with_stickers', () => {
test('exhibitions_marina_willer_x_pith_sketching_with_stickers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_marina_willer_x_pith_sketching_with_stickers: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_marina_willer_x_pith_sketching_with_stickers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/marina-willer-x-pith-sketching-with-stickers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london', () => {
test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_momentum_a_design_narrative_by_istituto_marangoni_london: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/momentum-a-design-narrative-by-istituto-marangoni-london/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_more_than_human', () => {
test('exhibitions_more_than_human: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/more-than-human/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_more_than_human: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/more-than-human/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_more_than_human: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/more-than-human/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_moving_to_mars', () => {
test('exhibitions_moving_to_mars: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/moving-to-mars/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_moving_to_mars: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/moving-to-mars/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_moving_to_mars: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/moving-to-mars/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_nigo_from_japan_with_love', () => {
test('exhibitions_nigo_from_japan_with_love: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_nigo_from_japan_with_love: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_nigo_from_japan_with_love: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/nigo-from-japan-with-love/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_objects_of_desire_surrealism_and_design_1924_today', () => {
test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_objects_of_desire_surrealism_and_design_1924_today: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/objects-of-desire-surrealism-and-design-1924-today/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_open_monuments_by_melek_zeynep_bulut', () => {
test('exhibitions_open_monuments_by_melek_zeynep_bulut: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_open_monuments_by_melek_zeynep_bulut: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_open_monuments_by_melek_zeynep_bulut: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/open-monuments-by-melek-zeynep-bulut/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_past_exhibitions', () => {
test('exhibitions_past_exhibitions: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/past-exhibitions/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_past_exhibitions: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/past-exhibitions/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_past_exhibitions: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/past-exhibitions/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_platform_bethan_laura_wood', () => {
test('exhibitions_platform_bethan_laura_wood: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/platform-bethan-laura-wood/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_platform_bethan_laura_wood: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/platform-bethan-laura-wood/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_platform_bethan_laura_wood: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/platform-bethan-laura-wood/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_rebel_30_years_of_london_fashion', () => {
test('exhibitions_rebel_30_years_of_london_fashion: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/rebel-30-years-of-london-fashion/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_rebel_30_years_of_london_fashion: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/rebel-30-years-of-london-fashion/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_rebel_30_years_of_london_fashion: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/rebel-30-years-of-london-fashion/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_splash_a_century_of_swimming_and_style', () => {
test('exhibitions_splash_a_century_of_swimming_and_style: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_splash_a_century_of_swimming_and_style: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_splash_a_century_of_swimming_and_style: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/splash-a-century-of-swimming-and-style/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_stanley_kubrick_the_exhibition', () => {
test('exhibitions_stanley_kubrick_the_exhibition: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/stanley-kubrick-the-exhibition/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_stanley_kubrick_the_exhibition: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/stanley-kubrick-the-exhibition/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_stanley_kubrick_the_exhibition: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/stanley-kubrick-the-exhibition/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_the_future_of_ageing', () => {
test('exhibitions_the_future_of_ageing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-future-of-ageing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_future_of_ageing: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/the-future-of-ageing/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_the_future_of_ageing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-future-of-ageing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_the_nue_black_aesthetic', () => {
test('exhibitions_the_nue_black_aesthetic: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-nue-black-aesthetic/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_nue_black_aesthetic: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-nue-black-aesthetic/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_the_nue_black_aesthetic: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/the-nue-black-aesthetic/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_the_oak_collection', () => {
test('exhibitions_the_oak_collection: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-oak-collection/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_oak_collection: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-oak-collection/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_the_oak_collection: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/the-oak-collection/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_the_offbeat_sari', () => {
test('exhibitions_the_offbeat_sari: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-offbeat-sari/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_offbeat_sari: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/the-offbeat-sari/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_the_offbeat_sari: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-offbeat-sari/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_the_ralph_saltzman_prize_2022', () => {
test('exhibitions_the_ralph_saltzman_prize_2022: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_ralph_saltzman_prize_2022: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_the_ralph_saltzman_prize_2022: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2022/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_the_ralph_saltzman_prize_2023', () => {
test('exhibitions_the_ralph_saltzman_prize_2023: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_ralph_saltzman_prize_2023: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_the_ralph_saltzman_prize_2023: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2023/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_the_ralph_saltzman_prize_2025', () => {
test('exhibitions_the_ralph_saltzman_prize_2025: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_ralph_saltzman_prize_2025: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_the_ralph_saltzman_prize_2025: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-ralph-saltzman-prize-2025/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_the_world_of_tim_burton', () => {
test('exhibitions_the_world_of_tim_burton: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/the-world-of-tim-burton/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_the_world_of_tim_burton: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/the-world-of-tim-burton/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_the_world_of_tim_burton: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/the-world-of-tim-burton/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_touring_exhibitions', () => {
test('exhibitions_touring_exhibitions: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/touring-exhibitions/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_touring_exhibitions: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_touring_exhibitions: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_weird_sensation_feels_good_the_world_of_asmr', () => {
test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_weird_sensation_feels_good_the_world_of_asmr: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/weird-sensation-feels-good-the-world-of-asmr/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_wes_anderson_the_archives', () => {
test('exhibitions_wes_anderson_the_archives: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/wes-anderson-the-archives/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_wes_anderson_the_archives: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/wes-anderson-the-archives/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_wes_anderson_the_archives: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/wes-anderson-the-archives/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - learning_at_the_museum_schools_self_guided_visits_for_learning_groups', () => {
test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('learning_at_the_museum_schools_self_guided_visits_for_learning_groups: images have alt attributes', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/self-guided-visits-for-learning-groups/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - learning_at_the_museum_schools_workshops_for_schools', () => {
test('learning_at_the_museum_schools_workshops_for_schools: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/learning-at-the-museum/schools/workshops-for-schools/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('learning_at_the_museum_schools_workshops_for_schools: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/workshops-for-schools/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('learning_at_the_museum_schools_workshops_for_schools: images have alt attributes', async ({ page }) => {
await page.goto('/learning-at-the-museum/schools/workshops-for-schools/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - plan_your_visit_faq_for_visitors', () => {
test('plan_your_visit_faq_for_visitors: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/faq-for-visitors/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_faq_for_visitors: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/faq-for-visitors/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plan_your_visit_faq_for_visitors: images have alt attributes', async ({ page }) => {
await page.goto('/plan-your-visit/faq-for-visitors/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - plan_your_visit_food_drink_qa_with_matthew_williamson', () => {
test('plan_your_visit_food_drink_qa_with_matthew_williamson: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_food_drink_qa_with_matthew_williamson: images load correctly', async ({ page }) => {
await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('plan_your_visit_food_drink_qa_with_matthew_williamson: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/food-drink/qa-with-matthew-williamson/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - plan_your_visit_stay_connected', () => {
test('plan_your_visit_stay_connected: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plan-your-visit/stay-connected/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plan_your_visit_stay_connected: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plan-your-visit/stay-connected/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plan_your_visit_stay_connected: images have alt attributes', async ({ page }) => {
await page.goto('/plan-your-visit/stay-connected/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - support_us_corporate_support_nyetimber', () => {
test('support_us_corporate_support_nyetimber: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support-us/corporate-support/nyetimber/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_us_corporate_support_nyetimber: images load correctly', async ({ page }) => {
await page.goto('/support-us/corporate-support/nyetimber/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('support_us_corporate_support_nyetimber: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support-us/corporate-support/nyetimber/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - support_us_ticket_mate_fund', () => {
test('support_us_ticket_mate_fund: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support-us/ticket-mate-fund/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_us_ticket_mate_fund: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support-us/ticket-mate-fund/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('support_us_ticket_mate_fund: images have alt attributes', async ({ page }) => {
await page.goto('/support-us/ticket-mate-fund/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - venue_hire_approved_suppliers', () => {
test('venue_hire_approved_suppliers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/approved-suppliers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_approved_suppliers: images load correctly', async ({ page }) => {
await page.goto('/venue-hire/approved-suppliers/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('venue_hire_approved_suppliers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/approved-suppliers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire_brand_activations_and_exclusive_events', () => {
test('venue_hire_brand_activations_and_exclusive_events: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/brand-activations-and-exclusive-events/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_brand_activations_and_exclusive_events: images load correctly', async ({ page }) => {
await page.goto('/venue-hire/brand-activations-and-exclusive-events/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('venue_hire_brand_activations_and_exclusive_events: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/brand-activations-and-exclusive-events/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire_design_museum_events_catering', () => {
test('venue_hire_design_museum_events_catering: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/design-museum-events-catering/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_design_museum_events_catering: images load correctly', async ({ page }) => {
await page.goto('/venue-hire/design-museum-events-catering/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('venue_hire_design_museum_events_catering: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/design-museum-events-catering/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire_enquire_about_venue_hire', () => {
test('venue_hire_enquire_about_venue_hire: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/enquire-about-venue-hire/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_enquire_about_venue_hire: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/enquire-about-venue-hire/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('venue_hire_enquire_about_venue_hire: images have alt attributes', async ({ page }) => {
await page.goto('/venue-hire/enquire-about-venue-hire/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - venue_hire_environmental_impact_roadmap', () => {
test('venue_hire_environmental_impact_roadmap: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/environmental-impact-roadmap/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_environmental_impact_roadmap: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/environmental-impact-roadmap/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('venue_hire_environmental_impact_roadmap: images have alt attributes', async ({ page }) => {
await page.goto('/venue-hire/environmental-impact-roadmap/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - venue_hire_filming_photography_at_the_design_museum', () => {
test('venue_hire_filming_photography_at_the_design_museum: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/filming-photography-at-the-design-museum/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_filming_photography_at_the_design_museum: images load correctly', async ({ page }) => {
await page.goto('/venue-hire/filming-photography-at-the-design-museum/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('venue_hire_filming_photography_at_the_design_museum: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/filming-photography-at-the-design-museum/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire_tour_packages_unique_offers', () => {
test('venue_hire_tour_packages_unique_offers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/tour-packages-unique-offers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_tour_packages_unique_offers: images load correctly', async ({ page }) => {
await page.goto('/venue-hire/tour-packages-unique-offers/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('venue_hire_tour_packages_unique_offers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/tour-packages-unique-offers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - venue_hire_view_and_download_the_events_brochure', () => {
test('venue_hire_view_and_download_the_events_brochure: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/venue-hire/view-and-download-the-events-brochure/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('venue_hire_view_and_download_the_events_brochure: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/venue-hire/view-and-download-the-events-brochure/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('venue_hire_view_and_download_the_events_brochure: images have alt attributes', async ({ page }) => {
await page.goto('/venue-hire/view-and-download-the-events-brochure/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('whats_on_talks_courses_and_workshops_artists_in_the_wes_anderson_universe_from_canvas_to_screen: images have alt attributes', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/artists-in-the-wes-anderson-universe-from-canvas-to-screen/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_audio_described_tour_of_nigo_from_japan_with_love: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/audio-described-tour-of-nigo-from-japan-with-love/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_bsl_tour_architecture_of_the_museum_and_platform: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/bsl-tour-architecture-of-the-museum-and-platform/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_building_resilience_demonstrators_for_a_changing_climate: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/building-resilience-demonstrators-for-a-changing-climate/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_curating_design_between_word_and_world: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_curating_design_between_word_and_world: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curating-design-between-word-and-world/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_curator_tour_of_nigo_from_japan_with_love: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-nigo-from-japan-with-love/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_curator_tour_of_platform_simone_brewster: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/curator-tour-of-platform-simone-brewster/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_create_a_shoe_prototype: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-create-a-shoe-prototype/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_designing_with_light_and_shadow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-designing-with-light-and-shadow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_11_to_14_digital_illustration: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-11-to-14-digital-illustration/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_create_in_clay: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-create-in-clay/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_designing_with_light_and_shadow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-designing-with-light-and-shadow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_stop_motion_with_clay: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-stop-motion-with-clay/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_sustainable_prop_making: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-sustainable-prop-making/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_design_camp_for_ages_7_to_10_turn_plastic_into_fabric: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/design-camp-for-ages-7-to-10-turn-plastic-into-fabric/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours', () => {
test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_exhibitions_relaxed_opening_hours: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/exhibitions-relaxed-opening-hours/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_summer_garden_salon', () => {
test('whats_on_talks_courses_and_workshops_summer_garden_salon: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_summer_garden_salon: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_summer_garden_salon: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/summer-garden-salon/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood', () => {
test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('whats_on_talks_courses_and_workshops_talk_design_practice_and_motherhood: images have alt attributes', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/talk-design-practice-and-motherhood/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - 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: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_workshop_feature_film_storyboarding_with_jay_clarke: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-feature-film-storyboarding-with-jay-clarke/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork', () => {
test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_workshop_introduction_to_woodwork: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-introduction-to-woodwork/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_workshop_natural_dyes', () => {
test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_workshop_natural_dyes: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-natural-dyes/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket', () => {
test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: images load correctly', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('whats_on_talks_courses_and_workshops_workshop_the_workwear_jacket: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/whats-on/talks-courses-and-workshops/workshop-the-workwear-jacket/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - your_membership_archive_your_membership_events_archive_exclusive_events_for_members', () => {
test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('your_membership_archive_your_membership_events_archive_exclusive_events_for_members: images have alt attributes', async ({ page }) => {
await page.goto('/your-membership-archive/your-membership-events-archive/exclusive-events-for-members/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - designers_designers_in_residence_designers_in_residence_2020_care', () => {
test('designers_designers_in_residence_designers_in_residence_2020_care: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('designers_designers_in_residence_designers_in_residence_2020_care: images load correctly', async ({ page }) => {
await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('designers_designers_in_residence_designers_in_residence_2020_care: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/designers/designers-in-residence/designers-in-residence-2020-care/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - exhibitions_touring_exhibitions_exhibitions_for_hire', () => {
test('exhibitions_touring_exhibitions_exhibitions_for_hire: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_touring_exhibitions_exhibitions_for_hire: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('exhibitions_touring_exhibitions_exhibitions_for_hire: images have alt attributes', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/exhibitions-for-hire/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - exhibitions_touring_exhibitions_see_a_touring_exhibition', () => {
test('exhibitions_touring_exhibitions_see_a_touring_exhibition: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('exhibitions_touring_exhibitions_see_a_touring_exhibition: images load correctly', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('exhibitions_touring_exhibitions_see_a_touring_exhibition: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/exhibitions/touring-exhibitions/see-a-touring-exhibition/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
});
test.describe('Quality - Global', () => {
test('html has lang attribute', async ({ page }) => {
await page.goto('/');
const lang = await page.evaluate(() => document.documentElement.lang);
expect(lang).toBeTruthy();
});
});