RecreationBench / web /breezel.example /tests /static /hygiene.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 21)
98a0e53 verified
Raw History Blame Contribute Delete
153 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 - blog', () => {
test('blog: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/blog/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('blog: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/blog/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('blog: images have alt attributes', async ({ page }) => {
await page.goto('/blog/');
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 - brand', () => {
test('brand: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/brand/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('brand: images load correctly', async ({ page }) => {
await page.goto('/brand/');
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('brand: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/brand/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('brand: images have alt attributes', async ({ page }) => {
await page.goto('/brand/');
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 - build_uis_that_dont_suck', () => {
test('build_uis_that_dont_suck: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/build-uis-that-dont-suck/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('build_uis_that_dont_suck: images load correctly', async ({ page }) => {
await page.goto('/build-uis-that-dont-suck/');
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('build_uis_that_dont_suck: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/build-uis-that-dont-suck/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('build_uis_that_dont_suck: images have alt attributes', async ({ page }) => {
await page.goto('/build-uis-that-dont-suck/');
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: 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 - plus', () => {
test('plus: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plus/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plus: images load correctly', async ({ page }) => {
await page.goto('/plus/');
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('plus: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plus/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plus: images have alt attributes', async ({ page }) => {
await page.goto('/plus/');
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 - plus_templates', () => {
test('plus_templates: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plus/templates/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plus_templates: images load correctly', async ({ page }) => {
await page.goto('/plus/templates/');
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('plus_templates: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plus/templates/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plus_templates: images have alt attributes', async ({ page }) => {
await page.goto('/plus/templates/');
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 - plus_ui_blocks', () => {
test('plus_ui_blocks: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plus/ui-blocks/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plus_ui_blocks: images load correctly', async ({ page }) => {
await page.goto('/plus/ui-blocks/');
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('plus_ui_blocks: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plus/ui-blocks/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plus_ui_blocks: images have alt attributes', async ({ page }) => {
await page.goto('/plus/ui-blocks/');
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 - plus_ui_kit', () => {
test('plus_ui_kit: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/plus/ui-kit/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('plus_ui_kit: images load correctly', async ({ page }) => {
await page.goto('/plus/ui-kit/');
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('plus_ui_kit: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/plus/ui-kit/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('plus_ui_kit: images have alt attributes', async ({ page }) => {
await page.goto('/plus/ui-kit/');
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 - showcase', () => {
test('showcase: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/showcase/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('showcase: images load correctly', async ({ page }) => {
await page.goto('/showcase/');
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('showcase: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/showcase/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('showcase: images have alt attributes', async ({ page }) => {
await page.goto('/showcase/');
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 - sponsor', () => {
test('sponsor: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/sponsor/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('sponsor: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/sponsor/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('sponsor: images have alt attributes', async ({ page }) => {
await page.goto('/sponsor/');
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_accent_color', () => {
test('docs_accent_color: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/accent-color/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_accent_color: images load correctly', async ({ page }) => {
await page.goto('/docs/accent-color/');
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_accent_color: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/accent-color/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_accent_color: images have alt attributes', async ({ page }) => {
await page.goto('/docs/accent-color/');
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_adding_custom_styles', () => {
test('docs_adding_custom_styles: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/adding-custom-styles/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_adding_custom_styles: images load correctly', async ({ page }) => {
await page.goto('/docs/adding-custom-styles/');
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_adding_custom_styles: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/adding-custom-styles/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_adding_custom_styles: images have alt attributes', async ({ page }) => {
await page.goto('/docs/adding-custom-styles/');
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_align_content', () => {
test('docs_align_content: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/align-content/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_align_content: images load correctly', async ({ page }) => {
await page.goto('/docs/align-content/');
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_align_content: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/align-content/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_align_content: images have alt attributes', async ({ page }) => {
await page.goto('/docs/align-content/');
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_animation', () => {
test('docs_animation: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/animation/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_animation: images load correctly', async ({ page }) => {
await page.goto('/docs/animation/');
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_animation: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/animation/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_animation: images have alt attributes', async ({ page }) => {
await page.goto('/docs/animation/');
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_appearance', () => {
test('docs_appearance: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/appearance/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_appearance: images load correctly', async ({ page }) => {
await page.goto('/docs/appearance/');
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_appearance: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/appearance/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_appearance: images have alt attributes', async ({ page }) => {
await page.goto('/docs/appearance/');
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_backface_visibility', () => {
test('docs_backface_visibility: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/backface-visibility/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_backface_visibility: images load correctly', async ({ page }) => {
await page.goto('/docs/backface-visibility/');
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_backface_visibility: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/backface-visibility/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_backface_visibility: images have alt attributes', async ({ page }) => {
await page.goto('/docs/backface-visibility/');
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_background_attachment', () => {
test('docs_background_attachment: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-attachment/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_attachment: images load correctly', async ({ page }) => {
await page.goto('/docs/background-attachment/');
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_background_attachment: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-attachment/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_attachment: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-attachment/');
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_background_blend_mode', () => {
test('docs_background_blend_mode: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-blend-mode/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_blend_mode: images load correctly', async ({ page }) => {
await page.goto('/docs/background-blend-mode/');
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_background_blend_mode: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-blend-mode/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_blend_mode: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-blend-mode/');
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_background_clip', () => {
test('docs_background_clip: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-clip/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_clip: images load correctly', async ({ page }) => {
await page.goto('/docs/background-clip/');
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_background_clip: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-clip/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_clip: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-clip/');
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_background_color', () => {
test('docs_background_color: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-color/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_color: images load correctly', async ({ page }) => {
await page.goto('/docs/background-color/');
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_background_color: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-color/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_color: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-color/');
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_background_image', () => {
test('docs_background_image: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-image/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_image: images load correctly', async ({ page }) => {
await page.goto('/docs/background-image/');
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_background_image: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-image/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_image: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-image/');
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_background_origin', () => {
test('docs_background_origin: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-origin/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_origin: images load correctly', async ({ page }) => {
await page.goto('/docs/background-origin/');
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_background_origin: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-origin/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_origin: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-origin/');
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_background_repeat', () => {
test('docs_background_repeat: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-repeat/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_repeat: images load correctly', async ({ page }) => {
await page.goto('/docs/background-repeat/');
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_background_repeat: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-repeat/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_repeat: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-repeat/');
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_background_size', () => {
test('docs_background_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/background-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_background_size: images load correctly', async ({ page }) => {
await page.goto('/docs/background-size/');
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_background_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/background-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_background_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/background-size/');
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_block_size', () => {
test('docs_block_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/block-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_block_size: images load correctly', async ({ page }) => {
await page.goto('/docs/block-size/');
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_block_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/block-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_block_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/block-size/');
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_border_collapse', () => {
test('docs_border_collapse: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-collapse/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_collapse: images load correctly', async ({ page }) => {
await page.goto('/docs/border-collapse/');
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_border_collapse: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-collapse/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_collapse: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-collapse/');
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_border_color', () => {
test('docs_border_color: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-color/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_color: images load correctly', async ({ page }) => {
await page.goto('/docs/border-color/');
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_border_color: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-color/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_color: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-color/');
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_border_radius', () => {
test('docs_border_radius: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-radius/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_radius: images load correctly', async ({ page }) => {
await page.goto('/docs/border-radius/');
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_border_radius: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-radius/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_radius: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-radius/');
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_border_spacing', () => {
test('docs_border_spacing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-spacing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_spacing: images load correctly', async ({ page }) => {
await page.goto('/docs/border-spacing/');
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_border_spacing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-spacing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_spacing: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-spacing/');
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_border_style', () => {
test('docs_border_style: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-style/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_style: images load correctly', async ({ page }) => {
await page.goto('/docs/border-style/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('docs_border_style: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-style/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_style: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-style/');
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_border_width', () => {
test('docs_border_width: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/border-width/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_border_width: images load correctly', async ({ page }) => {
await page.goto('/docs/border-width/');
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_border_width: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/border-width/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_border_width: images have alt attributes', async ({ page }) => {
await page.goto('/docs/border-width/');
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_box_decoration_break', () => {
test('docs_box_decoration_break: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/box-decoration-break/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_box_decoration_break: images load correctly', async ({ page }) => {
await page.goto('/docs/box-decoration-break/');
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_box_decoration_break: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/box-decoration-break/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_box_decoration_break: images have alt attributes', async ({ page }) => {
await page.goto('/docs/box-decoration-break/');
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_box_shadow', () => {
test('docs_box_shadow: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/box-shadow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_box_shadow: images load correctly', async ({ page }) => {
await page.goto('/docs/box-shadow/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('docs_box_shadow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/box-shadow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_box_shadow: images have alt attributes', async ({ page }) => {
await page.goto('/docs/box-shadow/');
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_box_sizing', () => {
test('docs_box_sizing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/box-sizing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_box_sizing: images load correctly', async ({ page }) => {
await page.goto('/docs/box-sizing/');
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_box_sizing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/box-sizing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_box_sizing: images have alt attributes', async ({ page }) => {
await page.goto('/docs/box-sizing/');
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_break_after', () => {
test('docs_break_after: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/break-after/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_break_after: images load correctly', async ({ page }) => {
await page.goto('/docs/break-after/');
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_break_after: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/break-after/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_break_after: images have alt attributes', async ({ page }) => {
await page.goto('/docs/break-after/');
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_break_before', () => {
test('docs_break_before: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/break-before/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_break_before: images load correctly', async ({ page }) => {
await page.goto('/docs/break-before/');
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_break_before: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/break-before/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_break_before: images have alt attributes', async ({ page }) => {
await page.goto('/docs/break-before/');
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_break_inside', () => {
test('docs_break_inside: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/break-inside/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_break_inside: images load correctly', async ({ page }) => {
await page.goto('/docs/break-inside/');
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_break_inside: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/break-inside/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_break_inside: images have alt attributes', async ({ page }) => {
await page.goto('/docs/break-inside/');
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_caption_side', () => {
test('docs_caption_side: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/caption-side/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_caption_side: images load correctly', async ({ page }) => {
await page.goto('/docs/caption-side/');
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_caption_side: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/caption-side/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_caption_side: images have alt attributes', async ({ page }) => {
await page.goto('/docs/caption-side/');
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_caret_color', () => {
test('docs_caret_color: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/caret-color/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_caret_color: images load correctly', async ({ page }) => {
await page.goto('/docs/caret-color/');
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_caret_color: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/caret-color/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_caret_color: images have alt attributes', async ({ page }) => {
await page.goto('/docs/caret-color/');
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_color', () => {
test('docs_color: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/color/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_color: images load correctly', async ({ page }) => {
await page.goto('/docs/color/');
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_color: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/color/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_color: images have alt attributes', async ({ page }) => {
await page.goto('/docs/color/');
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_color_scheme', () => {
test('docs_color_scheme: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/color-scheme/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_color_scheme: images load correctly', async ({ page }) => {
await page.goto('/docs/color-scheme/');
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_color_scheme: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/color-scheme/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_color_scheme: images have alt attributes', async ({ page }) => {
await page.goto('/docs/color-scheme/');
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_colors', () => {
test('docs_colors: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/colors/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_colors: images load correctly', async ({ page }) => {
await page.goto('/docs/colors/');
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_colors: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/colors/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_colors: images have alt attributes', async ({ page }) => {
await page.goto('/docs/colors/');
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_compatibility', () => {
test('docs_compatibility: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/compatibility/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_compatibility: images load correctly', async ({ page }) => {
await page.goto('/docs/compatibility/');
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_compatibility: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/compatibility/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_compatibility: images have alt attributes', async ({ page }) => {
await page.goto('/docs/compatibility/');
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_content', () => {
test('docs_content: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/content/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_content: images load correctly', async ({ page }) => {
await page.goto('/docs/content/');
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_content: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/content/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_content: images have alt attributes', async ({ page }) => {
await page.goto('/docs/content/');
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_cursor', () => {
test('docs_cursor: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/cursor/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_cursor: images load correctly', async ({ page }) => {
await page.goto('/docs/cursor/');
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_cursor: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/cursor/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_cursor: images have alt attributes', async ({ page }) => {
await page.goto('/docs/cursor/');
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_dark_mode', () => {
test('docs_dark_mode: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/dark-mode/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_dark_mode: images load correctly', async ({ page }) => {
await page.goto('/docs/dark-mode/');
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_dark_mode: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/dark-mode/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_dark_mode: images have alt attributes', async ({ page }) => {
await page.goto('/docs/dark-mode/');
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_detecting_classes_in_source_files', () => {
test('docs_detecting_classes_in_source_files: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/detecting-classes-in-source-files/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_detecting_classes_in_source_files: images load correctly', async ({ page }) => {
await page.goto('/docs/detecting-classes-in-source-files/');
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_detecting_classes_in_source_files: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/detecting-classes-in-source-files/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_detecting_classes_in_source_files: images have alt attributes', async ({ page }) => {
await page.goto('/docs/detecting-classes-in-source-files/');
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_editor_setup', () => {
test('docs_editor_setup: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/editor-setup/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_editor_setup: images load correctly', async ({ page }) => {
await page.goto('/docs/editor-setup/');
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_editor_setup: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/editor-setup/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_editor_setup: images have alt attributes', async ({ page }) => {
await page.goto('/docs/editor-setup/');
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_field_sizing', () => {
test('docs_field_sizing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/field-sizing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_field_sizing: images load correctly', async ({ page }) => {
await page.goto('/docs/field-sizing/');
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_field_sizing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/field-sizing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_field_sizing: images have alt attributes', async ({ page }) => {
await page.goto('/docs/field-sizing/');
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_filter_drop_shadow', () => {
test('docs_filter_drop_shadow: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/filter-drop-shadow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_filter_drop_shadow: images load correctly', async ({ page }) => {
await page.goto('/docs/filter-drop-shadow/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('docs_filter_drop_shadow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/filter-drop-shadow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_filter_drop_shadow: images have alt attributes', async ({ page }) => {
await page.goto('/docs/filter-drop-shadow/');
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_flex', () => {
test('docs_flex: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex: images load correctly', async ({ page }) => {
await page.goto('/docs/flex/');
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_flex: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex/');
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_flex_basis', () => {
test('docs_flex_basis: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex-basis/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex_basis: images load correctly', async ({ page }) => {
await page.goto('/docs/flex-basis/');
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_flex_basis: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex-basis/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex_basis: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex-basis/');
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_flex_direction', () => {
test('docs_flex_direction: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex-direction/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex_direction: images load correctly', async ({ page }) => {
await page.goto('/docs/flex-direction/');
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_flex_direction: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex-direction/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex_direction: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex-direction/');
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_flex_grow', () => {
test('docs_flex_grow: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex-grow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex_grow: images load correctly', async ({ page }) => {
await page.goto('/docs/flex-grow/');
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_flex_grow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex-grow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex_grow: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex-grow/');
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_flex_shrink', () => {
test('docs_flex_shrink: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex-shrink/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex_shrink: images load correctly', async ({ page }) => {
await page.goto('/docs/flex-shrink/');
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_flex_shrink: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex-shrink/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex_shrink: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex-shrink/');
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_flex_wrap', () => {
test('docs_flex_wrap: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/flex-wrap/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_flex_wrap: images load correctly', async ({ page }) => {
await page.goto('/docs/flex-wrap/');
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_flex_wrap: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/flex-wrap/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_flex_wrap: images have alt attributes', async ({ page }) => {
await page.goto('/docs/flex-wrap/');
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_font_family', () => {
test('docs_font_family: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-family/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_family: images load correctly', async ({ page }) => {
await page.goto('/docs/font-family/');
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_font_family: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-family/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_family: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-family/');
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_font_feature_settings', () => {
test('docs_font_feature_settings: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-feature-settings/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_feature_settings: images load correctly', async ({ page }) => {
await page.goto('/docs/font-feature-settings/');
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_font_feature_settings: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-feature-settings/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_feature_settings: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-feature-settings/');
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_font_size', () => {
test('docs_font_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_size: images load correctly', async ({ page }) => {
await page.goto('/docs/font-size/');
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_font_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-size/');
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_font_smoothing', () => {
test('docs_font_smoothing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-smoothing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_smoothing: images load correctly', async ({ page }) => {
await page.goto('/docs/font-smoothing/');
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_font_smoothing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-smoothing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_smoothing: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-smoothing/');
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_font_stretch', () => {
test('docs_font_stretch: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-stretch/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_stretch: images load correctly', async ({ page }) => {
await page.goto('/docs/font-stretch/');
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_font_stretch: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-stretch/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_stretch: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-stretch/');
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_font_style', () => {
test('docs_font_style: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-style/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_style: images load correctly', async ({ page }) => {
await page.goto('/docs/font-style/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('docs_font_style: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-style/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_style: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-style/');
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_font_variant_numeric', () => {
test('docs_font_variant_numeric: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-variant-numeric/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_variant_numeric: images load correctly', async ({ page }) => {
await page.goto('/docs/font-variant-numeric/');
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_font_variant_numeric: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-variant-numeric/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_variant_numeric: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-variant-numeric/');
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_font_weight', () => {
test('docs_font_weight: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/font-weight/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_font_weight: images load correctly', async ({ page }) => {
await page.goto('/docs/font-weight/');
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_font_weight: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/font-weight/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_font_weight: images have alt attributes', async ({ page }) => {
await page.goto('/docs/font-weight/');
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_gap', () => {
test('docs_gap: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/gap/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_gap: images load correctly', async ({ page }) => {
await page.goto('/docs/gap/');
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_gap: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/gap/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_gap: images have alt attributes', async ({ page }) => {
await page.goto('/docs/gap/');
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_grid_auto_columns', () => {
test('docs_grid_auto_columns: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-auto-columns/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_auto_columns: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-auto-columns/');
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_grid_auto_columns: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-auto-columns/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_auto_columns: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-auto-columns/');
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_grid_auto_flow', () => {
test('docs_grid_auto_flow: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-auto-flow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_auto_flow: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-auto-flow/');
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_grid_auto_flow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-auto-flow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_auto_flow: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-auto-flow/');
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_grid_auto_rows', () => {
test('docs_grid_auto_rows: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-auto-rows/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_auto_rows: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-auto-rows/');
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_grid_auto_rows: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-auto-rows/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_auto_rows: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-auto-rows/');
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_grid_column', () => {
test('docs_grid_column: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-column/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_column: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-column/');
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_grid_column: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-column/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_column: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-column/');
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_grid_row', () => {
test('docs_grid_row: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-row/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_row: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-row/');
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_grid_row: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-row/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_row: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-row/');
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_grid_template_columns', () => {
test('docs_grid_template_columns: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-template-columns/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_template_columns: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-template-columns/');
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_grid_template_columns: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-template-columns/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_template_columns: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-template-columns/');
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_grid_template_rows', () => {
test('docs_grid_template_rows: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/grid-template-rows/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_grid_template_rows: images load correctly', async ({ page }) => {
await page.goto('/docs/grid-template-rows/');
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_grid_template_rows: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/grid-template-rows/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_grid_template_rows: images have alt attributes', async ({ page }) => {
await page.goto('/docs/grid-template-rows/');
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_height', () => {
test('docs_height: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/height/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_height: images load correctly', async ({ page }) => {
await page.goto('/docs/height/');
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_height: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/height/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_height: images have alt attributes', async ({ page }) => {
await page.goto('/docs/height/');
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_hyphens', () => {
test('docs_hyphens: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/hyphens/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_hyphens: images load correctly', async ({ page }) => {
await page.goto('/docs/hyphens/');
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_hyphens: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/hyphens/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_hyphens: images have alt attributes', async ({ page }) => {
await page.goto('/docs/hyphens/');
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_inline_size', () => {
test('docs_inline_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/inline-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_inline_size: images load correctly', async ({ page }) => {
await page.goto('/docs/inline-size/');
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_inline_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/inline-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_inline_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/inline-size/');
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_installation', () => {
test('docs_installation: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/installation/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_installation: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/installation/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_installation: images have alt attributes', async ({ page }) => {
await page.goto('/docs/installation/');
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_isolation', () => {
test('docs_isolation: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/isolation/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_isolation: images load correctly', async ({ page }) => {
await page.goto('/docs/isolation/');
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_isolation: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/isolation/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_isolation: images have alt attributes', async ({ page }) => {
await page.goto('/docs/isolation/');
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_justify_content', () => {
test('docs_justify_content: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/justify-content/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_justify_content: images load correctly', async ({ page }) => {
await page.goto('/docs/justify-content/');
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_justify_content: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/justify-content/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_justify_content: images have alt attributes', async ({ page }) => {
await page.goto('/docs/justify-content/');
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_justify_items', () => {
test('docs_justify_items: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/justify-items/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_justify_items: images load correctly', async ({ page }) => {
await page.goto('/docs/justify-items/');
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_justify_items: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/justify-items/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_justify_items: images have alt attributes', async ({ page }) => {
await page.goto('/docs/justify-items/');
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_justify_self', () => {
test('docs_justify_self: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/justify-self/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_justify_self: images load correctly', async ({ page }) => {
await page.goto('/docs/justify-self/');
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_justify_self: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/justify-self/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_justify_self: images have alt attributes', async ({ page }) => {
await page.goto('/docs/justify-self/');
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_letter_spacing', () => {
test('docs_letter_spacing: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/letter-spacing/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_letter_spacing: images load correctly', async ({ page }) => {
await page.goto('/docs/letter-spacing/');
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_letter_spacing: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/letter-spacing/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_letter_spacing: images have alt attributes', async ({ page }) => {
await page.goto('/docs/letter-spacing/');
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_line_height', () => {
test('docs_line_height: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/line-height/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_line_height: images load correctly', async ({ page }) => {
await page.goto('/docs/line-height/');
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_line_height: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/line-height/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_line_height: images have alt attributes', async ({ page }) => {
await page.goto('/docs/line-height/');
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_list_style_image', () => {
test('docs_list_style_image: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/list-style-image/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_list_style_image: images load correctly', async ({ page }) => {
await page.goto('/docs/list-style-image/');
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_list_style_image: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/list-style-image/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_list_style_image: images have alt attributes', async ({ page }) => {
await page.goto('/docs/list-style-image/');
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_list_style_position', () => {
test('docs_list_style_position: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/list-style-position/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_list_style_position: images load correctly', async ({ page }) => {
await page.goto('/docs/list-style-position/');
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_list_style_position: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/list-style-position/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_list_style_position: images have alt attributes', async ({ page }) => {
await page.goto('/docs/list-style-position/');
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_list_style_type', () => {
test('docs_list_style_type: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/list-style-type/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_list_style_type: images load correctly', async ({ page }) => {
await page.goto('/docs/list-style-type/');
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_list_style_type: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/list-style-type/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_list_style_type: images have alt attributes', async ({ page }) => {
await page.goto('/docs/list-style-type/');
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_margin', () => {
test('docs_margin: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/margin/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_margin: images load correctly', async ({ page }) => {
await page.goto('/docs/margin/');
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_margin: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/margin/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_margin: images have alt attributes', async ({ page }) => {
await page.goto('/docs/margin/');
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_max_block_size', () => {
test('docs_max_block_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/max-block-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_max_block_size: images load correctly', async ({ page }) => {
await page.goto('/docs/max-block-size/');
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_max_block_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/max-block-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_max_block_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/max-block-size/');
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_max_height', () => {
test('docs_max_height: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/max-height/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_max_height: images load correctly', async ({ page }) => {
await page.goto('/docs/max-height/');
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_max_height: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/max-height/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_max_height: images have alt attributes', async ({ page }) => {
await page.goto('/docs/max-height/');
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_min_block_size', () => {
test('docs_min_block_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/min-block-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_min_block_size: images load correctly', async ({ page }) => {
await page.goto('/docs/min-block-size/');
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_min_block_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/min-block-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_min_block_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/min-block-size/');
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_min_height', () => {
test('docs_min_height: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/min-height/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_min_height: images load correctly', async ({ page }) => {
await page.goto('/docs/min-height/');
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_min_height: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/min-height/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_min_height: images have alt attributes', async ({ page }) => {
await page.goto('/docs/min-height/');
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_min_inline_size', () => {
test('docs_min_inline_size: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/min-inline-size/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_min_inline_size: images load correctly', async ({ page }) => {
await page.goto('/docs/min-inline-size/');
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_min_inline_size: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/min-inline-size/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_min_inline_size: images have alt attributes', async ({ page }) => {
await page.goto('/docs/min-inline-size/');
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_min_width', () => {
test('docs_min_width: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/min-width/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_min_width: images load correctly', async ({ page }) => {
await page.goto('/docs/min-width/');
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_min_width: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/min-width/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_min_width: images have alt attributes', async ({ page }) => {
await page.goto('/docs/min-width/');
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_order', () => {
test('docs_order: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/order/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_order: images load correctly', async ({ page }) => {
await page.goto('/docs/order/');
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_order: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/order/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_order: images have alt attributes', async ({ page }) => {
await page.goto('/docs/order/');
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_overscroll_behavior', () => {
test('docs_overscroll_behavior: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/overscroll-behavior/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_overscroll_behavior: images load correctly', async ({ page }) => {
await page.goto('/docs/overscroll-behavior/');
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_overscroll_behavior: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/overscroll-behavior/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_overscroll_behavior: images have alt attributes', async ({ page }) => {
await page.goto('/docs/overscroll-behavior/');
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_padding', () => {
test('docs_padding: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/padding/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_padding: images load correctly', async ({ page }) => {
await page.goto('/docs/padding/');
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_padding: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/padding/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_padding: images have alt attributes', async ({ page }) => {
await page.goto('/docs/padding/');
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_place_content', () => {
test('docs_place_content: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/place-content/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_place_content: images load correctly', async ({ page }) => {
await page.goto('/docs/place-content/');
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_place_content: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/place-content/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_place_content: images have alt attributes', async ({ page }) => {
await page.goto('/docs/place-content/');
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_place_items', () => {
test('docs_place_items: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/place-items/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_place_items: images load correctly', async ({ page }) => {
await page.goto('/docs/place-items/');
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_place_items: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/place-items/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_place_items: images have alt attributes', async ({ page }) => {
await page.goto('/docs/place-items/');
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_place_self', () => {
test('docs_place_self: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/place-self/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_place_self: images load correctly', async ({ page }) => {
await page.goto('/docs/place-self/');
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_place_self: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/place-self/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_place_self: images have alt attributes', async ({ page }) => {
await page.goto('/docs/place-self/');
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_preflight', () => {
test('docs_preflight: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/preflight/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_preflight: images load correctly', async ({ page }) => {
await page.goto('/docs/preflight/');
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_preflight: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/preflight/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_preflight: images have alt attributes', async ({ page }) => {
await page.goto('/docs/preflight/');
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_text_align', () => {
test('docs_text_align: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/text-align/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_text_align: images load correctly', async ({ page }) => {
await page.goto('/docs/text-align/');
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_text_align: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/text-align/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_text_align: images have alt attributes', async ({ page }) => {
await page.goto('/docs/text-align/');
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_theme', () => {
test('docs_theme: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/theme/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_theme: images load correctly', async ({ page }) => {
await page.goto('/docs/theme/');
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_theme: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/theme/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_theme: images have alt attributes', async ({ page }) => {
await page.goto('/docs/theme/');
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_top_right_bottom_left', () => {
test('docs_top_right_bottom_left: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/top-right-bottom-left/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_top_right_bottom_left: images load correctly', async ({ page }) => {
await page.goto('/docs/top-right-bottom-left/');
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_top_right_bottom_left: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/top-right-bottom-left/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_top_right_bottom_left: images have alt attributes', async ({ page }) => {
await page.goto('/docs/top-right-bottom-left/');
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_visibility', () => {
test('docs_visibility: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/visibility/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_visibility: images load correctly', async ({ page }) => {
await page.goto('/docs/visibility/');
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_visibility: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/visibility/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_visibility: images have alt attributes', async ({ page }) => {
await page.goto('/docs/visibility/');
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_width', () => {
test('docs_width: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/width/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_width: images load correctly', async ({ page }) => {
await page.goto('/docs/width/');
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_width: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/width/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_width: images have alt attributes', async ({ page }) => {
await page.goto('/docs/width/');
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_z_index', () => {
test('docs_z_index: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/docs/z-index/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('docs_z_index: images load correctly', async ({ page }) => {
await page.goto('/docs/z-index/');
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_z_index: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/docs/z-index/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('docs_z_index: images have alt attributes', async ({ page }) => {
await page.goto('/docs/z-index/');
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 - insiders', () => {
test('insiders: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/insiders/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('insiders: images load correctly', async ({ page }) => {
await page.goto('/insiders/');
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('insiders: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/insiders/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('insiders: images have alt attributes', async ({ page }) => {
await page.goto('/insiders/');
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();
});
});