Datasets:
Download web/detox.github.io/tests/static/hygiene.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 167 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/detox.github.io/tests/static/hygiene.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/detox.github.io/tests/static/hygiene.scripted.spec.ts
-
curl -L -o hygiene.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/detox.github.io/tests/static/hygiene.scripted.spec.ts
167 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: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(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 - docs_next_introduction_getting_started', () => { | |
| test('docs_next_introduction_getting_started: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/introduction/getting-started/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_getting_started: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/getting-started/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('docs_next_introduction_getting_started: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/getting-started/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_introduction_getting_started: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/getting-started/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - 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.describe('Quality - blog_2022_11_10_detox_20_is_out', () => { | |
| test('blog_2022_11_10_detox_20_is_out: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/2022/11/10/detox-20-is-out/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_2022_11_10_detox_20_is_out: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/2022/11/10/detox-20-is-out/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_2022_11_10_detox_20_is_out: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/2022/11/10/detox-20-is-out/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_2022_11_10_detox_20_is_out: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/2022/11/10/detox-20-is-out/'); | |
| const imagesWithoutAlt = await page.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_2024_10_09_detox_copilot_is_out', () => { | |
| test('blog_2024_10_09_detox_copilot_is_out: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_2024_10_09_detox_copilot_is_out: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_2024_10_09_detox_copilot_is_out: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_2024_10_09_detox_copilot_is_out: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/2024/10/09/detox-copilot-is-out/'); | |
| const imagesWithoutAlt = await page.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_tags', () => { | |
| test('blog_tags: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/'); | |
| const imagesWithoutAlt = await page.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_contributing', () => { | |
| test('docs_contributing: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('docs_contributing: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_config_overview', () => { | |
| test('docs_next_config_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/overview/'); | |
| const imagesWithoutAlt = await page.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_next_contributing', () => { | |
| test('docs_next_contributing: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('docs_next_contributing: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_guide_migration', () => { | |
| test('docs_next_guide_migration: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/guide/migration/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_guide_migration: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/guide/migration/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_guide_migration: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/guide/migration/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_guide_migration: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/guide/migration/'); | |
| const imagesWithoutAlt = await page.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_next_introduction_debugging', () => { | |
| test('docs_next_introduction_debugging: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/introduction/debugging/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_debugging: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/debugging/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_introduction_debugging: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/debugging/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_introduction_debugging: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/debugging/'); | |
| const imagesWithoutAlt = await page.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_next_introduction_environment_setup', () => { | |
| test('docs_next_introduction_environment_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/next/introduction/environment-setup/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_environment_setup: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/environment-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_next_introduction_environment_setup: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/environment-setup/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_introduction_environment_setup: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/environment-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_next_introduction_preparing_for_ci', () => { | |
| test('docs_next_introduction_preparing_for_ci: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/introduction/preparing-for-ci/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_preparing_for_ci: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/preparing-for-ci/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_introduction_preparing_for_ci: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/preparing-for-ci/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_introduction_preparing_for_ci: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/preparing-for-ci/'); | |
| const imagesWithoutAlt = await page.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_next_introduction_project_setup', () => { | |
| test('docs_next_introduction_project_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/next/introduction/project-setup/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_project_setup: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/project-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_next_introduction_project_setup: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/project-setup/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_introduction_your_first_test', () => { | |
| test('docs_next_introduction_your_first_test: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/introduction/your-first-test/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_introduction_your_first_test: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/your-first-test/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_introduction_your_first_test: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/your-first-test/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_introduction_your_first_test: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/introduction/your-first-test/'); | |
| const imagesWithoutAlt = await page.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_tags_ai_integration', () => { | |
| test('blog_tags_ai_integration: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/ai-integration/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags_ai_integration: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/ai-integration/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags_ai_integration: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/ai-integration/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags_ai_integration: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/ai-integration/'); | |
| const imagesWithoutAlt = await page.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_tags_detox_pilot', () => { | |
| test('blog_tags_detox_pilot: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/detox-pilot/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags_detox_pilot: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/detox-pilot/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags_detox_pilot: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/detox-pilot/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags_detox_pilot: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/detox-pilot/'); | |
| const imagesWithoutAlt = await page.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_tags_genymotion', () => { | |
| test('blog_tags_genymotion: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/genymotion/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags_genymotion: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/genymotion/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags_genymotion: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/genymotion/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags_genymotion: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/genymotion/'); | |
| const imagesWithoutAlt = await page.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_tags_major_release', () => { | |
| test('blog_tags_major_release: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/major-release/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags_major_release: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/major-release/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags_major_release: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/major-release/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags_major_release: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/major-release/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - blog_tags_minor_release', () => { | |
| test('blog_tags_minor_release: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/blog/tags/minor-release/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('blog_tags_minor_release: images load correctly', async ({ page }) => { | |
| await page.goto('/blog/tags/minor-release/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('blog_tags_minor_release: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/blog/tags/minor-release/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('blog_tags_minor_release: images have alt attributes', async ({ page }) => { | |
| await page.goto('/blog/tags/minor-release/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - docs_api_actions', () => { | |
| test('docs_api_actions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/actions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_actions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/actions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_actions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/actions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_actions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/actions/'); | |
| const imagesWithoutAlt = await page.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_api_device', () => { | |
| test('docs_api_device: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/device/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_device: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/device/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_device: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/device/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_device: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/device/'); | |
| const imagesWithoutAlt = await page.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_api_expect', () => { | |
| test('docs_api_expect: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/expect/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_expect: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/expect/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_expect: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/expect/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_expect: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/expect/'); | |
| const imagesWithoutAlt = await page.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_api_internals', () => { | |
| test('docs_api_internals: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/internals/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_internals: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/internals/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_internals: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/internals/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_internals: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/internals/'); | |
| const imagesWithoutAlt = await page.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_api_logger', () => { | |
| test('docs_api_logger: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/logger/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_logger: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/logger/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_logger: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/logger/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_api_matchers', () => { | |
| test('docs_api_matchers: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/matchers/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_matchers: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/matchers/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_matchers: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/matchers/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_matchers: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/matchers/'); | |
| const imagesWithoutAlt = await page.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_api_pilot', () => { | |
| test('docs_api_pilot: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/pilot/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_pilot: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/pilot/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_pilot: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/pilot/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_pilot: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/pilot/'); | |
| const imagesWithoutAlt = await page.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_api_system', () => { | |
| test('docs_api_system: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/system/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_system: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/system/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_system: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/system/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_system: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/system/'); | |
| const imagesWithoutAlt = await page.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_api_webviews', () => { | |
| test('docs_api_webviews: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/api/webviews/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_api_webviews: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/api/webviews/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_api_webviews: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/api/webviews/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_api_webviews: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/api/webviews/'); | |
| const imagesWithoutAlt = await page.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_articles_how_detox_works', () => { | |
| test('docs_articles_how_detox_works: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/articles/how-detox-works/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_articles_how_detox_works: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/articles/how-detox-works/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_articles_how_detox_works: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/articles/how-detox-works/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_articles_how_detox_works: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/articles/how-detox-works/'); | |
| const imagesWithoutAlt = await page.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_articles_third_party_drivers', () => { | |
| test('docs_articles_third_party_drivers: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/articles/third-party-drivers/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_articles_third_party_drivers: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/articles/third-party-drivers/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_articles_third_party_drivers: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/articles/third-party-drivers/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_articles_third_party_drivers: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/articles/third-party-drivers/'); | |
| const imagesWithoutAlt = await page.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_cli_build_framework_cache', () => { | |
| test('docs_cli_build_framework_cache: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/cli/build-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_cli_build_framework_cache: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/cli/build-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_cli_build_framework_cache: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/cli/build-framework-cache/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_cli_build_framework_cache: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/cli/build-framework-cache/'); | |
| const imagesWithoutAlt = await page.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_cli_clean_framework_cache', () => { | |
| test('docs_cli_clean_framework_cache: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/cli/clean-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_cli_clean_framework_cache: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/cli/clean-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_cli_clean_framework_cache: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/cli/clean-framework-cache/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_cli_clean_framework_cache: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/cli/clean-framework-cache/'); | |
| const imagesWithoutAlt = await page.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_cli_overview', () => { | |
| test('docs_cli_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/cli/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_cli_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/cli/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_cli_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/cli/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_cli_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/cli/overview/'); | |
| const imagesWithoutAlt = await page.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_cli_rebuild_framework_cache', () => { | |
| test('docs_cli_rebuild_framework_cache: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/cli/rebuild-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_cli_rebuild_framework_cache: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/cli/rebuild-framework-cache/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_cli_rebuild_framework_cache: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/cli/rebuild-framework-cache/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_cli_rebuild_framework_cache: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/cli/rebuild-framework-cache/'); | |
| const imagesWithoutAlt = await page.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_cli_test', () => { | |
| test('docs_cli_test: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/cli/test/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_cli_test: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/cli/test/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_cli_test: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/cli/test/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_cli_test: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/cli/test/'); | |
| const imagesWithoutAlt = await page.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_config_apps', () => { | |
| test('docs_config_apps: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/apps/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_apps: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/apps/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_apps: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/apps/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_apps: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/apps/'); | |
| const imagesWithoutAlt = await page.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_config_artifacts', () => { | |
| test('docs_config_artifacts: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_artifacts: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_artifacts: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/artifacts/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_artifacts: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/artifacts/'); | |
| const imagesWithoutAlt = await page.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_config_behavior', () => { | |
| test('docs_config_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/config/behavior/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_behavior: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/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_config_behavior: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/behavior/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_behavior: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/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_config_devices', () => { | |
| test('docs_config_devices: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/devices/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_devices: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/devices/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_devices: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/devices/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_devices: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/devices/'); | |
| const imagesWithoutAlt = await page.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_config_logger', () => { | |
| test('docs_config_logger: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/logger/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_logger: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/logger/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_logger: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/logger/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_config_overview', () => { | |
| test('docs_config_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/overview/'); | |
| const imagesWithoutAlt = await page.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_config_session', () => { | |
| test('docs_config_session: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/session/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_session: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/session/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_session: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/session/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_session: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/session/'); | |
| const imagesWithoutAlt = await page.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_config_testRunner', () => { | |
| test('docs_config_testRunner: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/config/testRunner/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_config_testRunner: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/config/testRunner/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_config_testRunner: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/config/testRunner/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_config_testRunner: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/config/testRunner/'); | |
| const imagesWithoutAlt = await page.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_contributing_code_of_conduct', () => { | |
| test('docs_contributing_code_of_conduct: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code-of-conduct/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_of_conduct: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code-of-conduct/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_code_of_conduct: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code-of-conduct/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_of_conduct: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code-of-conduct/'); | |
| const imagesWithoutAlt = await page.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_contributing_documentation', () => { | |
| test('docs_contributing_documentation: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/documentation/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_documentation: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/documentation/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_documentation: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/documentation/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_documentation: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/documentation/'); | |
| const imagesWithoutAlt = await page.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_contributing_feature_requests', () => { | |
| test('docs_contributing_feature_requests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/feature-requests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_feature_requests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/feature-requests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_feature_requests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/feature-requests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_feature_requests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/feature-requests/'); | |
| const imagesWithoutAlt = await page.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_contributing_reporting_bugs', () => { | |
| test('docs_contributing_reporting_bugs: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/reporting-bugs/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_reporting_bugs: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/reporting-bugs/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_reporting_bugs: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/reporting-bugs/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_reporting_bugs: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/reporting-bugs/'); | |
| const imagesWithoutAlt = await page.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_guide_android_dev_env', () => { | |
| test('docs_guide_android_dev_env: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/android-dev-env/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_android_dev_env: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/android-dev-env/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_android_dev_env: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/android-dev-env/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_android_dev_env: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/android-dev-env/'); | |
| const imagesWithoutAlt = await page.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_guide_cucumber_js_integration', () => { | |
| test('docs_guide_cucumber_js_integration: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/cucumber-js-integration/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_cucumber_js_integration: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/cucumber-js-integration/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_cucumber_js_integration: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/cucumber-js-integration/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_cucumber_js_integration: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/cucumber-js-integration/'); | |
| const imagesWithoutAlt = await page.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_guide_detox_repl', () => { | |
| test('docs_guide_detox_repl: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/detox-repl/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_detox_repl: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/detox-repl/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_detox_repl: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/detox-repl/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_detox_repl: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/detox-repl/'); | |
| const imagesWithoutAlt = await page.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_guide_developing_while_writing_tests', () => { | |
| test('docs_guide_developing_while_writing_tests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/developing-while-writing-tests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_developing_while_writing_tests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/developing-while-writing-tests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_developing_while_writing_tests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/developing-while-writing-tests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_developing_while_writing_tests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/developing-while-writing-tests/'); | |
| const imagesWithoutAlt = await page.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_guide_genymotion_saas', () => { | |
| test('docs_guide_genymotion_saas: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/genymotion-saas/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_genymotion_saas: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/genymotion-saas/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_genymotion_saas: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/genymotion-saas/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_guide_launch_args', () => { | |
| test('docs_guide_launch_args: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/launch-args/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_launch_args: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/launch-args/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_launch_args: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/launch-args/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_launch_args: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/launch-args/'); | |
| const imagesWithoutAlt = await page.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_guide_migration', () => { | |
| test('docs_guide_migration: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/migration/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_migration: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/migration/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_migration: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/migration/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_migration: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/migration/'); | |
| const imagesWithoutAlt = await page.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_guide_mocking', () => { | |
| test('docs_guide_mocking: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/mocking/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_mocking: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_mocking: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_mocking: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking/'); | |
| const imagesWithoutAlt = await page.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_guide_mocking_open_with_url', () => { | |
| test('docs_guide_mocking_open_with_url: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/mocking-open-with-url/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_mocking_open_with_url: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-open-with-url/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_mocking_open_with_url: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-open-with-url/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_mocking_open_with_url: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-open-with-url/'); | |
| const imagesWithoutAlt = await page.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_guide_mocking_user_activity', () => { | |
| test('docs_guide_mocking_user_activity: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/mocking-user-activity/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_mocking_user_activity: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-activity/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_mocking_user_activity: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-activity/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_mocking_user_activity: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-activity/'); | |
| const imagesWithoutAlt = await page.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_guide_mocking_user_notifications', () => { | |
| test('docs_guide_mocking_user_notifications: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/mocking-user-notifications/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_mocking_user_notifications: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-notifications/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_mocking_user_notifications: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-notifications/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_mocking_user_notifications: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/mocking-user-notifications/'); | |
| const imagesWithoutAlt = await page.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_guide_parallel_test_execution', () => { | |
| test('docs_guide_parallel_test_execution: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/parallel-test-execution/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_parallel_test_execution: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/parallel-test-execution/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_parallel_test_execution: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/parallel-test-execution/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_parallel_test_execution: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/parallel-test-execution/'); | |
| const imagesWithoutAlt = await page.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_guide_proguard_configuration', () => { | |
| test('docs_guide_proguard_configuration: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/proguard-configuration/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_proguard_configuration: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/proguard-configuration/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_proguard_configuration: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/proguard-configuration/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_proguard_configuration: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/proguard-configuration/'); | |
| const imagesWithoutAlt = await page.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_guide_taking_screenshots', () => { | |
| test('docs_guide_taking_screenshots: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/taking-screenshots/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_taking_screenshots: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/taking-screenshots/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_taking_screenshots: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/taking-screenshots/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_taking_screenshots: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/taking-screenshots/'); | |
| const imagesWithoutAlt = await page.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_guide_test_id', () => { | |
| test('docs_guide_test_id: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/test-id/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_test_id: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/test-id/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_test_id: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/test-id/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_test_id: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/test-id/'); | |
| const imagesWithoutAlt = await page.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_guide_testing_webviews', () => { | |
| test('docs_guide_testing_webviews: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/testing-webviews/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_testing_webviews: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/testing-webviews/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_testing_webviews: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/testing-webviews/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_testing_webviews: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/testing-webviews/'); | |
| const imagesWithoutAlt = await page.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_guide_typescript', () => { | |
| test('docs_guide_typescript: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/typescript/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_typescript: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/typescript/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_typescript: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/typescript/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_typescript: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/typescript/'); | |
| const imagesWithoutAlt = await page.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_guide_uninstalling', () => { | |
| test('docs_guide_uninstalling: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/guide/uninstalling/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_guide_uninstalling: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/guide/uninstalling/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_guide_uninstalling: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/guide/uninstalling/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_guide_uninstalling: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/guide/uninstalling/'); | |
| const imagesWithoutAlt = await page.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_introduction_debugging', () => { | |
| test('docs_introduction_debugging: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/introduction/debugging/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_introduction_debugging: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/introduction/debugging/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_introduction_debugging: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/introduction/debugging/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_introduction_debugging: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/introduction/debugging/'); | |
| const imagesWithoutAlt = await page.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_introduction_environment_setup', () => { | |
| test('docs_introduction_environment_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/introduction/environment-setup/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_introduction_environment_setup: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/introduction/environment-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_introduction_environment_setup: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/introduction/environment-setup/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_introduction_environment_setup: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/introduction/environment-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_introduction_getting_started', () => { | |
| test('docs_introduction_getting_started: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/introduction/getting-started/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_introduction_getting_started: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/introduction/getting-started/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('docs_introduction_getting_started: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/introduction/getting-started/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_introduction_getting_started: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/introduction/getting-started/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_config_artifacts', () => { | |
| test('docs_next_config_artifacts: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_artifacts: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_artifacts: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/artifacts/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_artifacts: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/artifacts/'); | |
| const imagesWithoutAlt = await page.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_next_config_behavior', () => { | |
| test('docs_next_config_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/next/config/behavior/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_behavior: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/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_next_config_behavior: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/behavior/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_behavior: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/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_next_config_devices', () => { | |
| test('docs_next_config_devices: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/devices/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_devices: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/devices/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_devices: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/devices/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_devices: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/devices/'); | |
| const imagesWithoutAlt = await page.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_next_config_logger', () => { | |
| test('docs_next_config_logger: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/logger/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_logger: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/logger/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_logger: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/logger/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_config_session', () => { | |
| test('docs_next_config_session: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/session/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_session: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/session/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_session: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/session/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_session: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/session/'); | |
| const imagesWithoutAlt = await page.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_next_config_testRunner', () => { | |
| test('docs_next_config_testRunner: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/testRunner/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_testRunner: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/testRunner/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_testRunner: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/testRunner/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_testRunner: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/testRunner/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_code_of_conduct', () => { | |
| test('docs_next_contributing_code_of_conduct: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/code-of-conduct/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_code_of_conduct: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code-of-conduct/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_code_of_conduct: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code-of-conduct/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_code_of_conduct: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code-of-conduct/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_code_overview', () => { | |
| test('docs_next_contributing_code_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/code/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_code_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_code_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_code_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/overview/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_code_reviewing_pull_requests', () => { | |
| test('docs_next_contributing_code_reviewing_pull_requests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_code_reviewing_pull_requests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_code_reviewing_pull_requests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_code_reviewing_pull_requests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/code/reviewing-pull-requests/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_documentation', () => { | |
| test('docs_next_contributing_documentation: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/documentation/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_documentation: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/documentation/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_documentation: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/documentation/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_documentation: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/documentation/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_feature_requests', () => { | |
| test('docs_next_contributing_feature_requests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/feature-requests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_feature_requests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/feature-requests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_feature_requests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/feature-requests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_feature_requests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/feature-requests/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_questions_answering_questions', () => { | |
| test('docs_next_contributing_questions_answering_questions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/questions/answering-questions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_questions_answering_questions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/answering-questions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_questions_answering_questions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/answering-questions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_questions_answering_questions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/answering-questions/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_questions_asking_questions', () => { | |
| test('docs_next_contributing_questions_asking_questions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/questions/asking-questions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_questions_asking_questions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/asking-questions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_questions_asking_questions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/asking-questions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_questions_asking_questions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/questions/asking-questions/'); | |
| const imagesWithoutAlt = await page.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_next_contributing_reporting_bugs', () => { | |
| test('docs_next_contributing_reporting_bugs: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/contributing/reporting-bugs/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_contributing_reporting_bugs: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/reporting-bugs/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_contributing_reporting_bugs: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/reporting-bugs/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_contributing_reporting_bugs: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/contributing/reporting-bugs/'); | |
| const imagesWithoutAlt = await page.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_next_guide_genymotion_saas', () => { | |
| test('docs_next_guide_genymotion_saas: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/guide/genymotion-saas/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_guide_genymotion_saas: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/guide/genymotion-saas/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_guide_genymotion_saas: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/guide/genymotion-saas/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_contributing_code_building_and_testing', () => { | |
| test('docs_contributing_code_building_and_testing: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code/building-and-testing/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_building_and_testing: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/building-and-testing/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let i = 0; i < Math.min(count, 10); i++) { | |
| const naturalWidth = await images.nth(i).evaluate( | |
| (el: HTMLImageElement) => el.naturalWidth | |
| ); | |
| expect(naturalWidth).toBeGreaterThan(0); | |
| } | |
| }); | |
| test('docs_contributing_code_building_and_testing: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/building-and-testing/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_building_and_testing: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/building-and-testing/'); | |
| const imagesWithoutAlt = await page.locator('img:not([alt])').count(); | |
| const totalImages = await page.locator('img').count(); | |
| if (totalImages > 0) { | |
| expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5); | |
| } | |
| }); | |
| }); | |
| test.describe('Quality - docs_contributing_code_overview', () => { | |
| test('docs_contributing_code_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_code_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/overview/'); | |
| const imagesWithoutAlt = await page.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_contributing_code_reviewing_pull_requests', () => { | |
| test('docs_contributing_code_reviewing_pull_requests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code/reviewing-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_reviewing_pull_requests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/reviewing-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_code_reviewing_pull_requests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/reviewing-pull-requests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_reviewing_pull_requests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/reviewing-pull-requests/'); | |
| const imagesWithoutAlt = await page.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_contributing_code_setting_up_the_dev_environment', () => { | |
| test('docs_contributing_code_setting_up_the_dev_environment: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_setting_up_the_dev_environment: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_code_setting_up_the_dev_environment: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_setting_up_the_dev_environment: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/setting-up-the-dev-environment/'); | |
| const imagesWithoutAlt = await page.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_contributing_code_submitting_pull_requests', () => { | |
| test('docs_contributing_code_submitting_pull_requests: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/code/submitting-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_code_submitting_pull_requests: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/submitting-pull-requests/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_code_submitting_pull_requests: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/submitting-pull-requests/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_code_submitting_pull_requests: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/code/submitting-pull-requests/'); | |
| const imagesWithoutAlt = await page.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_contributing_questions_answering_questions', () => { | |
| test('docs_contributing_questions_answering_questions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/questions/answering-questions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_questions_answering_questions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/answering-questions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_questions_answering_questions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/answering-questions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_questions_answering_questions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/answering-questions/'); | |
| const imagesWithoutAlt = await page.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_contributing_questions_asking_questions', () => { | |
| test('docs_contributing_questions_asking_questions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/contributing/questions/asking-questions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_contributing_questions_asking_questions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/asking-questions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_contributing_questions_asking_questions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/asking-questions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_contributing_questions_asking_questions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/contributing/questions/asking-questions/'); | |
| const imagesWithoutAlt = await page.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_next_api_actions', () => { | |
| test('docs_next_api_actions: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/actions/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_actions: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/actions/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_actions: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/actions/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_actions: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/actions/'); | |
| const imagesWithoutAlt = await page.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_next_api_device', () => { | |
| test('docs_next_api_device: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/device/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_device: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/device/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_device: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/device/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_device: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/device/'); | |
| const imagesWithoutAlt = await page.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_next_api_expect', () => { | |
| test('docs_next_api_expect: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/expect/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_expect: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/expect/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_expect: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/expect/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_expect: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/expect/'); | |
| const imagesWithoutAlt = await page.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_next_api_internals', () => { | |
| test('docs_next_api_internals: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/internals/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_internals: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/internals/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_internals: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/internals/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_internals: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/internals/'); | |
| const imagesWithoutAlt = await page.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_next_api_logger', () => { | |
| test('docs_next_api_logger: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/logger/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_logger: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/logger/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_logger: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/logger/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| }); | |
| test.describe('Quality - docs_next_api_matchers', () => { | |
| test('docs_next_api_matchers: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/matchers/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_matchers: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/matchers/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_matchers: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/matchers/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_matchers: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/matchers/'); | |
| const imagesWithoutAlt = await page.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_next_api_pilot', () => { | |
| test('docs_next_api_pilot: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/pilot/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_pilot: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/pilot/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_pilot: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/pilot/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_pilot: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/pilot/'); | |
| const imagesWithoutAlt = await page.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_next_api_system', () => { | |
| test('docs_next_api_system: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/system/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_system: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/system/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_system: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/system/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_system: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/system/'); | |
| const imagesWithoutAlt = await page.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_next_api_webviews', () => { | |
| test('docs_next_api_webviews: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/api/webviews/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_api_webviews: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/api/webviews/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_api_webviews: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/api/webviews/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_api_webviews: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/api/webviews/'); | |
| const imagesWithoutAlt = await page.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_next_architecture_artifacts', () => { | |
| test('docs_next_architecture_artifacts: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/architecture/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_architecture_artifacts: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/artifacts/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_architecture_artifacts: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/artifacts/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_architecture_artifacts: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/artifacts/'); | |
| const imagesWithoutAlt = await page.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_next_architecture_client_server', () => { | |
| test('docs_next_architecture_client_server: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/architecture/client-server/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_architecture_client_server: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/client-server/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_architecture_client_server: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/client-server/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_architecture_client_server: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/client-server/'); | |
| const imagesWithoutAlt = await page.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_next_architecture_devices', () => { | |
| test('docs_next_architecture_devices: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/architecture/devices/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_architecture_devices: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/devices/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_architecture_devices: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/devices/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_architecture_devices: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/architecture/devices/'); | |
| const imagesWithoutAlt = await page.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_next_articles_design_principles', () => { | |
| test('docs_next_articles_design_principles: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/articles/design-principles/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_articles_design_principles: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/articles/design-principles/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_articles_design_principles: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/articles/design-principles/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_articles_design_principles: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/articles/design-principles/'); | |
| const imagesWithoutAlt = await page.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_next_articles_how_detox_works', () => { | |
| test('docs_next_articles_how_detox_works: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/articles/how-detox-works/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_articles_how_detox_works: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/articles/how-detox-works/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_articles_how_detox_works: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/articles/how-detox-works/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_articles_how_detox_works: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/articles/how-detox-works/'); | |
| const imagesWithoutAlt = await page.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_next_articles_third_party_drivers', () => { | |
| test('docs_next_articles_third_party_drivers: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/articles/third-party-drivers/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_articles_third_party_drivers: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/articles/third-party-drivers/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_articles_third_party_drivers: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/articles/third-party-drivers/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_articles_third_party_drivers: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/articles/third-party-drivers/'); | |
| const imagesWithoutAlt = await page.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_next_cli_overview', () => { | |
| test('docs_next_cli_overview: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/cli/overview/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_cli_overview: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/cli/overview/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_cli_overview: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/cli/overview/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_cli_overview: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/cli/overview/'); | |
| const imagesWithoutAlt = await page.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_next_cli_test', () => { | |
| test('docs_next_cli_test: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/cli/test/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_cli_test: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/cli/test/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_cli_test: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/cli/test/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_cli_test: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/cli/test/'); | |
| const imagesWithoutAlt = await page.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_next_config_apps', () => { | |
| test('docs_next_config_apps: no console errors', async ({ page }) => { | |
| const errors: string[] = []; | |
| page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); }); | |
| await page.goto('/docs/next/config/apps/'); | |
| await page.waitForTimeout(1000); | |
| expect(errors).toHaveLength(0); | |
| }); | |
| test('docs_next_config_apps: images load correctly', async ({ page }) => { | |
| await page.goto('/docs/next/config/apps/'); | |
| await page.waitForTimeout(1000); | |
| const images = page.locator('img[src]'); | |
| const count = await images.count(); | |
| for (let 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_next_config_apps: has selectable text (anti-cheat)', async ({ page }) => { | |
| await page.goto('/docs/next/config/apps/'); | |
| const text = await page.evaluate(() => document.body.innerText); | |
| expect(text.trim().length).toBeGreaterThan(50); | |
| }); | |
| test('docs_next_config_apps: images have alt attributes', async ({ page }) => { | |
| await page.goto('/docs/next/config/apps/'); | |
| const imagesWithoutAlt = await page.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(); | |
| }); | |
| }); | |