RecreationBench / web /postgresql.org /tests /static /hygiene.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 55)
16a5250 verified
Raw History Blame Contribute Delete
137 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: 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 - about', () => {
test('about: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about: images load correctly', async ({ page }) => {
await page.goto('/about/');
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: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about: images have alt attributes', async ({ page }) => {
await page.goto('/about/');
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', () => {
test('community: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community: images load correctly', async ({ page }) => {
await page.goto('/community/');
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: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community: images have alt attributes', async ({ page }) => {
await page.goto('/community/');
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 - developer', () => {
test('developer: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer: images load correctly', async ({ page }) => {
await page.goto('/developer/');
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('developer: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer: images have alt attributes', async ({ page }) => {
await page.goto('/developer/');
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 - docs', () => {
test('docs: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs: images load correctly', async ({ page }) => {
await page.goto('/docs/');
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('docs: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs: images have alt attributes', async ({ page }) => {
await page.goto('/docs/');
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 - docs_14_release_14_22_html', () => {
test('docs_14_release_14_22_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/14/release-14-22.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_14_release_14_22_html: images load correctly', async ({ page }) => {
await page.goto('/docs/14/release-14-22.html');
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('docs_14_release_14_22_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/14/release-14-22.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_14_release_14_22_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/14/release-14-22.html');
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 - docs_15_release_15_17_html', () => {
test('docs_15_release_15_17_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/15/release-15-17.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_15_release_15_17_html: images load correctly', async ({ page }) => {
await page.goto('/docs/15/release-15-17.html');
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('docs_15_release_15_17_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/15/release-15-17.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_15_release_15_17_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/15/release-15-17.html');
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 - docs_16_release_16_13_html', () => {
test('docs_16_release_16_13_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/16/release-16-13.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_16_release_16_13_html: images load correctly', async ({ page }) => {
await page.goto('/docs/16/release-16-13.html');
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('docs_16_release_16_13_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/16/release-16-13.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_16_release_16_13_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/16/release-16-13.html');
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 - docs_17_release_17_9_html', () => {
test('docs_17_release_17_9_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/17/release-17-9.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_17_release_17_9_html: images load correctly', async ({ page }) => {
await page.goto('/docs/17/release-17-9.html');
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('docs_17_release_17_9_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/17/release-17-9.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_17_release_17_9_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/17/release-17-9.html');
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 - docs_18_release_18_3_html', () => {
test('docs_18_release_18_3_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/18/release-18-3.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_18_release_18_3_html: images load correctly', async ({ page }) => {
await page.goto('/docs/18/release-18-3.html');
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('docs_18_release_18_3_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/18/release-18-3.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_18_release_18_3_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/18/release-18-3.html');
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 - docs_release', () => {
test('docs_release: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/release/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_release: images load correctly', async ({ page }) => {
await page.goto('/docs/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('docs_release: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/release/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_release: images have alt attributes', async ({ page }) => {
await page.goto('/docs/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 - download', () => {
test('download: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download: images load correctly', async ({ page }) => {
await page.goto('/download/');
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('download: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download: images have alt attributes', async ({ page }) => {
await page.goto('/download/');
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 - ftp', () => {
test('ftp: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/ftp/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('ftp: images load correctly', async ({ page }) => {
await page.goto('/ftp/');
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('ftp: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/ftp/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('ftp: images have alt attributes', async ({ page }) => {
await page.goto('/ftp/');
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 - list', () => {
test('list: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/list/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('list: images load correctly', async ({ page }) => {
await page.goto('/list/');
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('list: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/list/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('list: images have alt attributes', async ({ page }) => {
await page.goto('/list/');
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', () => {
test('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/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support: images load correctly', async ({ page }) => {
await page.goto('/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: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('support: images have alt attributes', async ({ page }) => {
await page.goto('/support/');
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_security', () => {
test('support_security: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support/security/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_security: images load correctly', async ({ page }) => {
await page.goto('/support/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('support_security: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support/security/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('support_security: images have alt attributes', async ({ page }) => {
await page.goto('/support/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 - support_versioning', () => {
test('support_versioning: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/support/versioning/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('support_versioning: images load correctly', async ({ page }) => {
await page.goto('/support/versioning/');
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_versioning: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/support/versioning/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('support_versioning: images have alt attributes', async ({ page }) => {
await page.goto('/support/versioning/');
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_contact', () => {
test('about_contact: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/contact/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_contact: images load correctly', async ({ page }) => {
await page.goto('/about/contact/');
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_contact: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/contact/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_contact: images have alt attributes', async ({ page }) => {
await page.goto('/about/contact/');
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_contributing', () => {
test('about_contributing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/contributing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_contributing: images load correctly', async ({ page }) => {
await page.goto('/about/contributing/');
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_contributing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/contributing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_contributing: images have alt attributes', async ({ page }) => {
await page.goto('/about/contributing/');
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_donate', () => {
test('about_donate: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/donate/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_donate: images load correctly', async ({ page }) => {
await page.goto('/about/donate/');
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_donate: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/donate/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_donate: images have alt attributes', async ({ page }) => {
await page.goto('/about/donate/');
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_donate_pg_org', () => {
test('about_donate_pg_org: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/donate_pg_org/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_donate_pg_org: images load correctly', async ({ page }) => {
await page.goto('/about/donate_pg_org/');
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_donate_pg_org: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/donate_pg_org/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_donate_pg_org: images have alt attributes', async ({ page }) => {
await page.goto('/about/donate_pg_org/');
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_eventarchive', () => {
test('about_eventarchive: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/eventarchive/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_eventarchive: images load correctly', async ({ page }) => {
await page.goto('/about/eventarchive/');
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_eventarchive: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/eventarchive/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_eventarchive: images have alt attributes', async ({ page }) => {
await page.goto('/about/eventarchive/');
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_events', () => {
test('about_events: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/events/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_events: images load correctly', async ({ page }) => {
await page.goto('/about/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('about_events: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/events/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_events: images have alt attributes', async ({ page }) => {
await page.goto('/about/events/');
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_featurematrix', () => {
test('about_featurematrix: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/featurematrix/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_featurematrix: images load correctly', async ({ page }) => {
await page.goto('/about/featurematrix/');
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_featurematrix: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/featurematrix/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_featurematrix: images have alt attributes', async ({ page }) => {
await page.goto('/about/featurematrix/');
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_financial', () => {
test('about_financial: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/financial/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_financial: images load correctly', async ({ page }) => {
await page.goto('/about/financial/');
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_financial: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/financial/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_financial: images have alt attributes', async ({ page }) => {
await page.goto('/about/financial/');
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_governance', () => {
test('about_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/governance/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_governance: images load correctly', async ({ page }) => {
await page.goto('/about/governance/');
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_governance: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/governance/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_governance: images have alt attributes', async ({ page }) => {
await page.goto('/about/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_licence', () => {
test('about_licence: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/licence/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_licence: images load correctly', async ({ page }) => {
await page.goto('/about/licence/');
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_licence: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/licence/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_licence: images have alt attributes', async ({ page }) => {
await page.goto('/about/licence/');
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_newsarchive', () => {
test('about_newsarchive: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/newsarchive/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_newsarchive: images load correctly', async ({ page }) => {
await page.goto('/about/newsarchive/');
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_newsarchive: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/newsarchive/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_newsarchive: images have alt attributes', async ({ page }) => {
await page.goto('/about/newsarchive/');
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_policies', () => {
test('about_policies: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/policies/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_policies: images load correctly', async ({ page }) => {
await page.goto('/about/policies/');
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_policies: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/policies/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_policies: images have alt attributes', async ({ page }) => {
await page.goto('/about/policies/');
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_press', () => {
test('about_press: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/press/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_press: images load correctly', async ({ page }) => {
await page.goto('/about/press/');
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_press: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/press/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_press: images have alt attributes', async ({ page }) => {
await page.goto('/about/press/');
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_servers', () => {
test('about_servers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/servers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_servers: images load correctly', async ({ page }) => {
await page.goto('/about/servers/');
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_servers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/servers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_servers: images have alt attributes', async ({ page }) => {
await page.goto('/about/servers/');
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_sponsors', () => {
test('about_sponsors: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/sponsors/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_sponsors: images load correctly', async ({ page }) => {
await page.goto('/about/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('about_sponsors: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/sponsors/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_sponsors: images have alt attributes', async ({ page }) => {
await page.goto('/about/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 - account_reset', () => {
test('account_reset: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/account/reset/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('account_reset: images load correctly', async ({ page }) => {
await page.goto('/account/reset/');
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('account_reset: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/account/reset/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('account_reset: images have alt attributes', async ({ page }) => {
await page.goto('/account/reset/');
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_contributors', () => {
test('community_contributors: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/contributors/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community_contributors: images load correctly', async ({ page }) => {
await page.goto('/community/contributors/');
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_contributors: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/contributors/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community_contributors: images have alt attributes', async ({ page }) => {
await page.goto('/community/contributors/');
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_international', () => {
test('community_international: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/international/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community_international: images load correctly', async ({ page }) => {
await page.goto('/community/international/');
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_international: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/international/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community_international: images have alt attributes', async ({ page }) => {
await page.goto('/community/international/');
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_irc', () => {
test('community_irc: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/irc/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community_irc: images load correctly', async ({ page }) => {
await page.goto('/community/irc/');
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_irc: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/irc/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community_irc: images have alt attributes', async ({ page }) => {
await page.goto('/community/irc/');
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_recognised_npos', () => {
test('community_recognised_npos: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/recognised-npos/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community_recognised_npos: images load correctly', async ({ page }) => {
await page.goto('/community/recognised-npos/');
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_recognised_npos: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/recognised-npos/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community_recognised_npos: images have alt attributes', async ({ page }) => {
await page.goto('/community/recognised-npos/');
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_user_groups', () => {
test('community_user_groups: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/community/user-groups/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('community_user_groups: images load correctly', async ({ page }) => {
await page.goto('/community/user-groups/');
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_user_groups: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/community/user-groups/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('community_user_groups: images have alt attributes', async ({ page }) => {
await page.goto('/community/user-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 - developer_beta', () => {
test('developer_beta: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/beta/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_beta: images load correctly', async ({ page }) => {
await page.goto('/developer/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('developer_beta: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/beta/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_beta: images have alt attributes', async ({ page }) => {
await page.goto('/developer/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 - developer_coding', () => {
test('developer_coding: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/coding/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_coding: images load correctly', async ({ page }) => {
await page.goto('/developer/coding/');
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('developer_coding: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/coding/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_coding: images have alt attributes', async ({ page }) => {
await page.goto('/developer/coding/');
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 - developer_committers', () => {
test('developer_committers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/committers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_committers: images load correctly', async ({ page }) => {
await page.goto('/developer/committers/');
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('developer_committers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/committers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_committers: images have alt attributes', async ({ page }) => {
await page.goto('/developer/committers/');
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 - developer_core', () => {
test('developer_core: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/core/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_core: images load correctly', async ({ page }) => {
await page.goto('/developer/core/');
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('developer_core: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/core/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_core: images have alt attributes', async ({ page }) => {
await page.goto('/developer/core/');
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 - developer_related_projects', () => {
test('developer_related_projects: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/related-projects/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_related_projects: images load correctly', async ({ page }) => {
await page.goto('/developer/related-projects/');
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('developer_related_projects: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/related-projects/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_related_projects: images have alt attributes', async ({ page }) => {
await page.goto('/developer/related-projects/');
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 - developer_roadmap', () => {
test('developer_roadmap: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/roadmap/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_roadmap: images load correctly', async ({ page }) => {
await page.goto('/developer/roadmap/');
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('developer_roadmap: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/roadmap/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_roadmap: images have alt attributes', async ({ page }) => {
await page.goto('/developer/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 - developer_testing', () => {
test('developer_testing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/developer/testing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('developer_testing: images load correctly', async ({ page }) => {
await page.goto('/developer/testing/');
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('developer_testing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/developer/testing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('developer_testing: images have alt attributes', async ({ page }) => {
await page.goto('/developer/testing/');
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 - docs_14_index_html', () => {
test('docs_14_index_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/14/index.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_14_index_html: images load correctly', async ({ page }) => {
await page.goto('/docs/14/index.html');
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('docs_14_index_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/14/index.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_14_index_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/14/index.html');
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 - docs_15_index_html', () => {
test('docs_15_index_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/15/index.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_15_index_html: images load correctly', async ({ page }) => {
await page.goto('/docs/15/index.html');
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('docs_15_index_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/15/index.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_15_index_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/15/index.html');
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 - docs_16_index_html', () => {
test('docs_16_index_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/16/index.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_16_index_html: images load correctly', async ({ page }) => {
await page.goto('/docs/16/index.html');
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('docs_16_index_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/16/index.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_16_index_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/16/index.html');
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 - docs_17_index_html', () => {
test('docs_17_index_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/17/index.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_17_index_html: images load correctly', async ({ page }) => {
await page.goto('/docs/17/index.html');
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('docs_17_index_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/17/index.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_17_index_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/17/index.html');
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 - docs_books', () => {
test('docs_books: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/books/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_books: images load correctly', async ({ page }) => {
await page.goto('/docs/books/');
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('docs_books: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/books/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_books: images have alt attributes', async ({ page }) => {
await page.goto('/docs/books/');
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 - docs_current', () => {
test('docs_current: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current: images load correctly', async ({ page }) => {
await page.goto('/docs/current/');
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('docs_current: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/');
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 - docs_current_features_html', () => {
test('docs_current_features_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/features.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current_features_html: images load correctly', async ({ page }) => {
await page.goto('/docs/current/features.html');
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('docs_current_features_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/features.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current_features_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/features.html');
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 - docs_current_history_html', () => {
test('docs_current_history_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/history.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current_history_html: images load correctly', async ({ page }) => {
await page.goto('/docs/current/history.html');
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('docs_current_history_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/history.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current_history_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/history.html');
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 - docs_current_installation_html', () => {
test('docs_current_installation_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/installation.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current_installation_html: images load correctly', async ({ page }) => {
await page.goto('/docs/current/installation.html');
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('docs_current_installation_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/installation.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current_installation_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/installation.html');
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 - docs_current_tutorial_html', () => {
test('docs_current_tutorial_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/tutorial.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current_tutorial_html: images load correctly', async ({ page }) => {
await page.goto('/docs/current/tutorial.html');
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('docs_current_tutorial_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/tutorial.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current_tutorial_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/tutorial.html');
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 - docs_current_xplang_html', () => {
test('docs_current_xplang_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/current/xplang.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_current_xplang_html: images load correctly', async ({ page }) => {
await page.goto('/docs/current/xplang.html');
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('docs_current_xplang_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/current/xplang.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_current_xplang_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/current/xplang.html');
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 - docs_devel_index_html', () => {
test('docs_devel_index_html: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/devel/index.html');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_devel_index_html: images load correctly', async ({ page }) => {
await page.goto('/docs/devel/index.html');
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('docs_devel_index_html: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/devel/index.html');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_devel_index_html: images have alt attributes', async ({ page }) => {
await page.goto('/docs/devel/index.html');
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 - docs_faq', () => {
test('docs_faq: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/faq/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_faq: images load correctly', async ({ page }) => {
await page.goto('/docs/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('docs_faq: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/faq/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_faq: images have alt attributes', async ({ page }) => {
await page.goto('/docs/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 - docs_manuals_archive', () => {
test('docs_manuals_archive: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/manuals/archive/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_manuals_archive: images load correctly', async ({ page }) => {
await page.goto('/docs/manuals/archive/');
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('docs_manuals_archive: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/manuals/archive/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_manuals_archive: images have alt attributes', async ({ page }) => {
await page.goto('/docs/manuals/archive/');
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 - docs_online_resources', () => {
test('docs_online_resources: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/online-resources/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_online_resources: images load correctly', async ({ page }) => {
await page.goto('/docs/online-resources/');
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('docs_online_resources: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/online-resources/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_online_resources: images have alt attributes', async ({ page }) => {
await page.goto('/docs/online-resources/');
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 - download_linux', () => {
test('download_linux: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/linux/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_linux: images load correctly', async ({ page }) => {
await page.goto('/download/linux/');
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('download_linux: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/linux/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_linux: images have alt attributes', async ({ page }) => {
await page.goto('/download/linux/');
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 - download_linux_debian', () => {
test('download_linux_debian: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/linux/debian/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_linux_debian: images load correctly', async ({ page }) => {
await page.goto('/download/linux/debian/');
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('download_linux_debian: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/linux/debian/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_linux_debian: images have alt attributes', async ({ page }) => {
await page.goto('/download/linux/debian/');
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 - download_linux_redhat', () => {
test('download_linux_redhat: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/linux/redhat/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_linux_redhat: images load correctly', async ({ page }) => {
await page.goto('/download/linux/redhat/');
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('download_linux_redhat: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/linux/redhat/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_linux_redhat: images have alt attributes', async ({ page }) => {
await page.goto('/download/linux/redhat/');
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 - download_linux_suse', () => {
test('download_linux_suse: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/linux/suse/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_linux_suse: images load correctly', async ({ page }) => {
await page.goto('/download/linux/suse/');
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('download_linux_suse: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/linux/suse/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_linux_suse: images have alt attributes', async ({ page }) => {
await page.goto('/download/linux/suse/');
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 - download_linux_ubuntu', () => {
test('download_linux_ubuntu: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/linux/ubuntu/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_linux_ubuntu: images load correctly', async ({ page }) => {
await page.goto('/download/linux/ubuntu/');
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('download_linux_ubuntu: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/linux/ubuntu/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_linux_ubuntu: images have alt attributes', async ({ page }) => {
await page.goto('/download/linux/ubuntu/');
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 - download_macosx', () => {
test('download_macosx: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/macosx/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_macosx: images load correctly', async ({ page }) => {
await page.goto('/download/macosx/');
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('download_macosx: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/macosx/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_macosx: images have alt attributes', async ({ page }) => {
await page.goto('/download/macosx/');
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 - download_product_categories', () => {
test('download_product_categories: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/product-categories/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_product_categories: images load correctly', async ({ page }) => {
await page.goto('/download/product-categories/');
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('download_product_categories: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/product-categories/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_product_categories: images have alt attributes', async ({ page }) => {
await page.goto('/download/product-categories/');
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 - download_snapshots', () => {
test('download_snapshots: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/snapshots/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_snapshots: images load correctly', async ({ page }) => {
await page.goto('/download/snapshots/');
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('download_snapshots: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/snapshots/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_snapshots: images have alt attributes', async ({ page }) => {
await page.goto('/download/snapshots/');
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 - download_windows', () => {
test('download_windows: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/download/windows/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('download_windows: images load correctly', async ({ page }) => {
await page.goto('/download/windows/');
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('download_windows: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/download/windows/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('download_windows: images have alt attributes', async ({ page }) => {
await page.goto('/download/windows/');
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 - ftp_source', () => {
test('ftp_source: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/ftp/source/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('ftp_source: images load correctly', async ({ page }) => {
await page.goto('/ftp/source/');
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('ftp_source: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/ftp/source/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('ftp_source: images have alt attributes', async ({ page }) => {
await page.goto('/ftp/source/');
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 - list_pgsql_announce', () => {
test('list_pgsql_announce: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/list/pgsql-announce/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('list_pgsql_announce: images load correctly', async ({ page }) => {
await page.goto('/list/pgsql-announce/');
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('list_pgsql_announce: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/list/pgsql-announce/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('list_pgsql_announce: images have alt attributes', async ({ page }) => {
await page.goto('/list/pgsql-announce/');
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 - list_pgsql_general', () => {
test('list_pgsql_general: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/list/pgsql-general/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('list_pgsql_general: images load correctly', async ({ page }) => {
await page.goto('/list/pgsql-general/');
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('list_pgsql_general: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/list/pgsql-general/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('list_pgsql_general: images have alt attributes', async ({ page }) => {
await page.goto('/list/pgsql-general/');
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 - list_pgsql_hackers', () => {
test('list_pgsql_hackers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/list/pgsql-hackers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('list_pgsql_hackers: images load correctly', async ({ page }) => {
await page.goto('/list/pgsql-hackers/');
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('list_pgsql_hackers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/list/pgsql-hackers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('list_pgsql_hackers: images have alt attributes', async ({ page }) => {
await page.goto('/list/pgsql-hackers/');
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 - list_pgsql_jobs', () => {
test('list_pgsql_jobs: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/list/pgsql-jobs/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('list_pgsql_jobs: images load correctly', async ({ page }) => {
await page.goto('/list/pgsql-jobs/');
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('list_pgsql_jobs: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/list/pgsql-jobs/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('list_pgsql_jobs: images have alt attributes', async ({ page }) => {
await page.goto('/list/pgsql-jobs/');
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_event_how2026_postgresql_ivorysql_ecosystem_conference_2575', () => {
test('about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: images load correctly', async ({ page }) => {
await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/');
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_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_how2026_postgresql_ivorysql_ecosystem_conference_2575: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/how2026-postgresql-ivorysql-ecosystem-conference-2575/');
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_event_pgconfbe_2026_2564', () => {
test('about_event_pgconfbe_2026_2564: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/pgconfbe-2026-2564/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_pgconfbe_2026_2564: images load correctly', async ({ page }) => {
await page.goto('/about/event/pgconfbe-2026-2564/');
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_event_pgconfbe_2026_2564: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/pgconfbe-2026-2564/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_pgconfbe_2026_2564: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/pgconfbe-2026-2564/');
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_event_pgday_armenia_2026_2586', () => {
test('about_event_pgday_armenia_2026_2586: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/pgday-armenia-2026-2586/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_pgday_armenia_2026_2586: images load correctly', async ({ page }) => {
await page.goto('/about/event/pgday-armenia-2026-2586/');
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_event_pgday_armenia_2026_2586: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/pgday-armenia-2026-2586/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_pgday_armenia_2026_2586: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/pgday-armenia-2026-2586/');
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_event_pgday_france_2026_2581', () => {
test('about_event_pgday_france_2026_2581: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/pgday-france-2026-2581/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_pgday_france_2026_2581: images load correctly', async ({ page }) => {
await page.goto('/about/event/pgday-france-2026-2581/');
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_event_pgday_france_2026_2581: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/pgday-france-2026-2581/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_pgday_france_2026_2581: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/pgday-france-2026-2581/');
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_event_postgresql_conference_ankara_2026_2589', () => {
test('about_event_postgresql_conference_ankara_2026_2589: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/postgresql-conference-ankara-2026-2589/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_postgresql_conference_ankara_2026_2589: images load correctly', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-ankara-2026-2589/');
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_event_postgresql_conference_ankara_2026_2589: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-ankara-2026-2589/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_postgresql_conference_ankara_2026_2589: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-ankara-2026-2589/');
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_event_postgresql_conference_germany_2026_2568', () => {
test('about_event_postgresql_conference_germany_2026_2568: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/postgresql-conference-germany-2026-2568/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_postgresql_conference_germany_2026_2568: images load correctly', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-germany-2026-2568/');
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_event_postgresql_conference_germany_2026_2568: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-germany-2026-2568/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_postgresql_conference_germany_2026_2568: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/postgresql-conference-germany-2026-2568/');
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_event_postgresql_development_conference_2026_pgconfdev_2543', () => {
test('about_event_postgresql_development_conference_2026_pgconfdev_2543: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_event_postgresql_development_conference_2026_pgconfdev_2543: images load correctly', async ({ page }) => {
await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/');
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_event_postgresql_development_conference_2026_pgconfdev_2543: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_event_postgresql_development_conference_2026_pgconfdev_2543: images have alt attributes', async ({ page }) => {
await page.goto('/about/event/postgresql-development-conference-2026-pgconfdev-2543/');
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_news_autobase_270_released_3269', () => {
test('about_news_autobase_270_released_3269: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/autobase-270-released-3269/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_autobase_270_released_3269: images load correctly', async ({ page }) => {
await page.goto('/about/news/autobase-270-released-3269/');
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_news_autobase_270_released_3269: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/autobase-270-released-3269/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_autobase_270_released_3269: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/autobase-270-released-3269/');
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_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268', () => {
test('about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: images load correctly', async ({ page }) => {
await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/');
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_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_dbconvert_streams_20_released_with_postgresql_cdc_and_cross_database_querying_3268: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/dbconvert-streams-20-released-with-postgresql-cdc-and-cross-database-querying-3268/');
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_news_dotconnect_for_postgresql_91_new_release_3260', () => {
test('about_news_dotconnect_for_postgresql_91_new_release_3260: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_dotconnect_for_postgresql_91_new_release_3260: images load correctly', async ({ page }) => {
await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/');
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_news_dotconnect_for_postgresql_91_new_release_3260: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_dotconnect_for_postgresql_91_new_release_3260: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/dotconnect-for-postgresql-91-new-release-3260/');
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_news_out_of_cycle_release_scheduled_for_february_26_2026_3241', () => {
test('about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: images load correctly', async ({ page }) => {
await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/');
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_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_out_of_cycle_release_scheduled_for_february_26_2026_3241: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/');
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_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272', () => {
test('about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: images load correctly', async ({ page }) => {
await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/');
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_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_pgconfbe_preliminary_schedule_registrations_open_and_speakers_online_3272: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/pgconfbe-preliminary-schedule-registrations-open-and-speakers-online-3272/');
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_news_postgresql_183_179_1613_1517_and_1422_released_3246', () => {
test('about_news_postgresql_183_179_1613_1517_and_1422_released_3246: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_postgresql_183_179_1613_1517_and_1422_released_3246: images load correctly', async ({ page }) => {
await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/');
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_news_postgresql_183_179_1613_1517_and_1422_released_3246: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_postgresql_183_179_1613_1517_and_1422_released_3246: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/postgresql-183-179-1613-1517-and-1422-released-3246/');
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_news_swiss_pgday_2026_open_for_registration_3273', () => {
test('about_news_swiss_pgday_2026_open_for_registration_3273: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_news_swiss_pgday_2026_open_for_registration_3273: images load correctly', async ({ page }) => {
await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/');
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_news_swiss_pgday_2026_open_for_registration_3273: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_news_swiss_pgday_2026_open_for_registration_3273: images have alt attributes', async ({ page }) => {
await page.goto('/about/news/swiss-pgday-2026-open-for-registration-3273/');
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_policies_coc', () => {
test('about_policies_coc: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/policies/coc/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_policies_coc: images load correctly', async ({ page }) => {
await page.goto('/about/policies/coc/');
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_policies_coc: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/policies/coc/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_policies_coc: images have alt attributes', async ({ page }) => {
await page.goto('/about/policies/coc/');
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_policies_conferences', () => {
test('about_policies_conferences: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/policies/conferences/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_policies_conferences: images load correctly', async ({ page }) => {
await page.goto('/about/policies/conferences/');
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_policies_conferences: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/policies/conferences/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_policies_conferences: images have alt attributes', async ({ page }) => {
await page.goto('/about/policies/conferences/');
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_policies_npos', () => {
test('about_policies_npos: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/about/policies/npos/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('about_policies_npos: images load correctly', async ({ page }) => {
await page.goto('/about/policies/npos/');
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_policies_npos: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/about/policies/npos/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('about_policies_npos: images have alt attributes', async ({ page }) => {
await page.goto('/about/policies/npos/');
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();
});
});