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: images load correctly', async ({ page }) => { await page.goto('/'); 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('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 - builds', () => { test('builds: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/builds/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('builds: images load correctly', async ({ page }) => { await page.goto('/builds/'); 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('builds: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/builds/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('builds: images have alt attributes', async ({ page }) => { await page.goto('/builds/'); 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 - editions', () => { test('editions: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/editions/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('editions: images load correctly', async ({ page }) => { await page.goto('/editions/'); 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('editions: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/editions/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('editions: images have alt attributes', async ({ page }) => { await page.goto('/editions/'); 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 - guidelines', () => { test('guidelines: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/guidelines/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('guidelines: images load correctly', async ({ page }) => { await page.goto('/guidelines/'); 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('guidelines: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/guidelines/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('guidelines: images have alt attributes', async ({ page }) => { await page.goto('/guidelines/'); 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 - logos', () => { test('logos: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/logos/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('logos: images load correctly', async ({ page }) => { await page.goto('/logos/'); 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('logos: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/logos/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('logos: images have alt attributes', async ({ page }) => { await page.goto('/logos/'); 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 - security', () => { test('security: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/security/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('security: images load correctly', async ({ page }) => { await page.goto('/security/'); 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('security: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/security/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('security: images have alt attributes', async ({ page }) => { await page.goto('/security/'); 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 - sponsors', () => { test('sponsors: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/sponsors/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('sponsors: images load correctly', async ({ page }) => { await page.goto('/sponsors/'); 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('sponsors: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/sponsors/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('sponsors: images have alt attributes', async ({ page }) => { await page.goto('/sponsors/'); 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 - team', () => { test('team: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/team/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('team: images load correctly', async ({ page }) => { await page.goto('/team/'); 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('team: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/team/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('team: images have alt attributes', async ({ page }) => { await page.goto('/team/'); 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 - teams', () => { test('teams: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/teams/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('teams: images load correctly', async ({ page }) => { await page.goto('/teams/'); 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('teams: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/teams/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('teams: images have alt attributes', async ({ page }) => { await page.goto('/teams/'); 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_legal', () => { test('about_legal: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/about/legal/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('about_legal: images load correctly', async ({ page }) => { await page.goto('/about/legal/'); 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_legal: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/about/legal/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('about_legal: images have alt attributes', async ({ page }) => { await page.goto('/about/legal/'); 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 - community_meetups', () => { test('community_meetups: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/community/meetups/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('community_meetups: images load correctly', async ({ page }) => { await page.goto('/community/meetups/'); 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('community_meetups: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/community/meetups/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('community_meetups: images have alt attributes', async ({ page }) => { await page.goto('/community/meetups/'); 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 - community_meetups_assets', () => { test('community_meetups_assets: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/community/meetups/assets/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('community_meetups_assets: images load correctly', async ({ page }) => { await page.goto('/community/meetups/assets/'); 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('community_meetups_assets: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/community/meetups/assets/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('community_meetups_assets: images have alt attributes', async ({ page }) => { await page.goto('/community/meetups/assets/'); 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 - community_meetups_getting_started', () => { test('community_meetups_getting_started: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/community/meetups-getting-started/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('community_meetups_getting_started: images load correctly', async ({ page }) => { await page.goto('/community/meetups-getting-started/'); 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('community_meetups_getting_started: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/community/meetups-getting-started/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('community_meetups_getting_started: images have alt attributes', async ({ page }) => { await page.goto('/community/meetups-getting-started/'); 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 - mascots_commission', () => { test('mascots_commission: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/mascots/commission/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('mascots_commission: images load correctly', async ({ page }) => { await page.goto('/mascots/commission/'); 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('mascots_commission: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/mascots/commission/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('mascots_commission: images have alt attributes', async ({ page }) => { await page.goto('/mascots/commission/'); 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 - mascots_faq', () => { test('mascots_faq: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/mascots/faq/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('mascots_faq: images load correctly', async ({ page }) => { await page.goto('/mascots/faq/'); 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('mascots_faq: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/mascots/faq/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('mascots_faq: images have alt attributes', async ({ page }) => { await page.goto('/mascots/faq/'); 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 - releases_beta', () => { test('releases_beta: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/releases/beta/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('releases_beta: images load correctly', async ({ page }) => { await page.goto('/releases/beta/'); 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('releases_beta: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/releases/beta/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('releases_beta: images have alt attributes', async ({ page }) => { await page.goto('/releases/beta/'); 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 - releases_canary', () => { test('releases_canary: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/releases/canary/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('releases_canary: images load correctly', async ({ page }) => { await page.goto('/releases/canary/'); 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('releases_canary: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/releases/canary/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('releases_canary: images have alt attributes', async ({ page }) => { await page.goto('/releases/canary/'); 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 - releases_lts', () => { test('releases_lts: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/releases/lts/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('releases_lts: images load correctly', async ({ page }) => { await page.goto('/releases/lts/'); 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('releases_lts: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/releases/lts/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('releases_lts: images have alt attributes', async ({ page }) => { await page.goto('/releases/lts/'); 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 - releases_release', () => { test('releases_release: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/releases/release/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('releases_release: images load correctly', async ({ page }) => { await page.goto('/releases/release/'); 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('releases_release: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/releases/release/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('releases_release: images have alt attributes', async ({ page }) => { await page.goto('/releases/release/'); 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 - teams_emeritus', () => { test('teams_emeritus: no console errors', async ({ page }) => { const errors: string[] = []; page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); await page.goto('/teams/emeritus/'); await page.waitForTimeout(1000); expect(errors).toHaveLength(0); }); test('teams_emeritus: images load correctly', async ({ page }) => { await page.goto('/teams/emeritus/'); 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('teams_emeritus: has selectable text (anti-cheat)', async ({ page }) => { await page.goto('/teams/emeritus/'); const text = await page.evaluate(() => document.body.innerText); expect(text.trim().length).toBeGreaterThan(50); }); test('teams_emeritus: images have alt attributes', async ({ page }) => { await page.goto('/teams/emeritus/'); 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 - Global', () => { test('html has lang attribute', async ({ page }) => { await page.goto('/'); const lang = await page.evaluate(() => document.documentElement.lang); expect(lang).toBeTruthy(); }); });