RecreationBench / web /aperlio.example /tests /static /hygiene.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 14)
2cdec24 verified
Raw History Blame Contribute Delete
212 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 - stock_photos', () => {
test('stock_photos: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_prairie_woman_at_sunset', () => {
test('stock_photos_photos_prairie_woman_at_sunset: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/prairie-woman-at-sunset/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_prairie_woman_at_sunset: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/prairie-woman-at-sunset/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_prairie_woman_at_sunset: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/prairie-woman-at-sunset/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_prairie_woman_at_sunset: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/prairie-woman-at-sunset/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires', () => {
test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_two_customized_cars_rolling_through_a_city_street', () => {
test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling', () => {
test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_woman_dressed_in_white_leans_against_a_wall', () => {
test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background', () => {
test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_portraits', () => {
test('stock_photos_portraits: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/portraits/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_portraits: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/portraits/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_portraits: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/portraits/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_portraits: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/portraits/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_product', () => {
test('stock_photos_product: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/product/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_product: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/product/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_product: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/product/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_product: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/product/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_recreation', () => {
test('stock_photos_recreation: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/recreation/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_recreation: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/recreation/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_recreation: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/recreation/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_recreation: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/recreation/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_retail', () => {
test('stock_photos_retail: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/retail/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_retail: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/retail/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_retail: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/retail/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_retail: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/retail/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_seasons', () => {
test('stock_photos_seasons: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/seasons/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_seasons: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/seasons/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_seasons: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/seasons/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_seasons: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/seasons/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_shirt', () => {
test('stock_photos_shirt: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/shirt/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_shirt: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/shirt/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_shirt: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/shirt/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_shirt: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/shirt/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_shop_local', () => {
test('stock_photos_shop_local: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/shop-local/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_shop_local: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/shop-local/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_shop_local: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/shop-local/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_shop_local: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/shop-local/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_shopify_hardware', () => {
test('stock_photos_shopify_hardware: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/shopify-hardware/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_shopify_hardware: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/shopify-hardware/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_shopify_hardware: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/shopify-hardware/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_shopify_hardware: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/shopify-hardware/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_sitemap', () => {
test('stock_photos_sitemap: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/sitemap/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_sitemap: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/sitemap/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_sitemap: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/sitemap/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_sitemap: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/sitemap/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_spring', () => {
test('stock_photos_spring: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/spring/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_spring: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/spring/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_spring: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/spring/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_spring: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/spring/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_summer', () => {
test('stock_photos_summer: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/summer/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_summer: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/summer/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_summer: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/summer/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_summer: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/summer/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tea_cup', () => {
test('stock_photos_tea_cup: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tea-cup/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tea_cup: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tea-cup/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tea_cup: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tea-cup/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tea_cup: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tea-cup/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_technology', () => {
test('stock_photos_technology: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/technology/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_technology: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/technology/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_technology: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/technology/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_technology: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/technology/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings', () => {
test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_aperlio_photos_not_stock_photos', () => {
test('stock_photos_tips_aperlio_photos_not_stock_photos: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_aperlio_photos_not_stock_photos: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_aperlio_photos_not_stock_photos: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_aperlio_photos_not_stock_photos: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_facebook_ads_how_to_get_started', () => {
test('stock_photos_tips_facebook_ads_how_to_get_started: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_facebook_ads_how_to_get_started: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-ads-how-to-get-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('stock_photos_tips_facebook_ads_how_to_get_started: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_facebook_ads_how_to_get_started: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-ads-how-to-get-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 - stock_photos_tips_facebook_cover_photo_size_1', () => {
test('stock_photos_tips_facebook_cover_photo_size_1: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_facebook_cover_photo_size_1: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_facebook_cover_photo_size_1: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_facebook_cover_photo_size_1: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page', () => {
test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_how_to_master_flat_lay_photography_in_2020', () => {
test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment', () => {
test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_transportation', () => {
test('stock_photos_transportation: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/transportation/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_transportation: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/transportation/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_transportation: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/transportation/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_transportation: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/transportation/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_travel', () => {
test('stock_photos_travel: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/travel/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_travel: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/travel/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_travel: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/travel/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_travel: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/travel/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_video_call_backgrounds', () => {
test('stock_photos_video_call_backgrounds: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/video-call-backgrounds/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_video_call_backgrounds: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/video-call-backgrounds/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_video_call_backgrounds: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/video-call-backgrounds/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_video_call_backgrounds: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/video-call-backgrounds/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_village', () => {
test('stock_photos_village: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/village/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_village: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/village/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_village: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/village/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_village: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/village/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_weather', () => {
test('stock_photos_weather: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/weather/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_weather: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/weather/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_weather: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/weather/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_weather: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/weather/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_winter', () => {
test('stock_photos_winter: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/winter/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_winter: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/winter/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_winter: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/winter/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_winter: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/winter/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_woman', () => {
test('stock_photos_woman: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/woman/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_woman: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/woman/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_woman: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/woman/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_woman: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/woman/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_work', () => {
test('stock_photos_work: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/work/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_work: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/work/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_work: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/work/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_work: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/work/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_work_from_home', () => {
test('stock_photos_work_from_home: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/work-from-home/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_work_from_home: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/work-from-home/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_work_from_home: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/work-from-home/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_work_from_home: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/work-from-home/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_yoga', () => {
test('stock_photos_yoga: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/yoga/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_yoga: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/yoga/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_yoga: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/yoga/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_yoga: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/yoga/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - legal_terms', () => {
test('legal_terms: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/legal/terms/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('legal_terms: images load correctly', async ({ page }) => {
await page.goto('/legal/terms/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('legal_terms: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/legal/terms/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('legal_terms: images have alt attributes', async ({ page }) => {
await page.goto('/legal/terms/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_about_us', () => {
test('stock_photos_about_us: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/about-us/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_about_us: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/about-us/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_about_us: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/about-us/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_about_us: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/about-us/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_airport', () => {
test('stock_photos_airport: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/airport/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_airport: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/airport/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_airport: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/airport/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_airport: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/airport/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_animal', () => {
test('stock_photos_animal: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/animal/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_animal: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/animal/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_animal: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/animal/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_animal: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/animal/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_around_the_world', () => {
test('stock_photos_around_the_world: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/around-the-world/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_around_the_world: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/around-the-world/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_around_the_world: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/around-the-world/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_around_the_world: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/around-the-world/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_arrow', () => {
test('stock_photos_arrow: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/arrow/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_arrow: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/arrow/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_arrow: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/arrow/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_arrow: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/arrow/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_arts', () => {
test('stock_photos_arts: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/arts/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_arts: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/arts/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_arts: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/arts/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_arts: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/arts/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_baby', () => {
test('stock_photos_baby: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/baby/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_baby: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/baby/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_baby: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/baby/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_baby: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/baby/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_background', () => {
test('stock_photos_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_banana', () => {
test('stock_photos_banana: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/banana/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_banana: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/banana/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_banana: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/banana/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_banana: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/banana/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_beauty', () => {
test('stock_photos_beauty: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/beauty/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_beauty: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/beauty/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_beauty: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/beauty/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_beauty: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/beauty/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_bible', () => {
test('stock_photos_bible: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/bible/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_bible: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/bible/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_bible: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/bible/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_bible: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/bible/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_black_and_white', () => {
test('stock_photos_black_and_white: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/black-and-white/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_black_and_white: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/black-and-white/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_black_and_white: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/black-and-white/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_black_and_white: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/black-and-white/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_black_backgrounds', () => {
test('stock_photos_black_backgrounds: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/black-backgrounds/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_black_backgrounds: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/black-backgrounds/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_black_backgrounds: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/black-backgrounds/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_black_backgrounds: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/black-backgrounds/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_blue_background', () => {
test('stock_photos_blue_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/blue-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_blue_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/blue-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_blue_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/blue-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_blue_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/blue-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_blur_background', () => {
test('stock_photos_blur_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/blur-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_blur_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/blur-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_blur_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/blur-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_blur_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/blur-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business', () => {
test('stock_photos_business: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas', () => {
test('stock_photos_business_ideas: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_butterfly', () => {
test('stock_photos_butterfly: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/butterfly/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_butterfly: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/butterfly/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_butterfly: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/butterfly/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_butterfly: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/butterfly/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_cat', () => {
test('stock_photos_cat: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/cat/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_cat: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/cat/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_cat: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/cat/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_cat: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/cat/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_celebrate', () => {
test('stock_photos_celebrate: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/celebrate/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_celebrate: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/celebrate/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_celebrate: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/celebrate/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_celebrate: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/celebrate/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_children', () => {
test('stock_photos_children: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/children/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_children: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/children/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_children: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/children/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_children: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/children/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_cinemagraphs', () => {
test('stock_photos_cinemagraphs: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/cinemagraphs/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_cinemagraphs: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/cinemagraphs/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_cinemagraphs: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/cinemagraphs/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_cinemagraphs: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/cinemagraphs/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_city', () => {
test('stock_photos_city: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/city/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_city: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/city/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_city: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/city/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_city: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/city/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_classroom', () => {
test('stock_photos_classroom: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/classroom/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_classroom: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/classroom/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_classroom: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/classroom/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_classroom: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/classroom/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_coffee', () => {
test('stock_photos_coffee: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/coffee/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_coffee: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/coffee/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_coffee: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/coffee/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_coffee: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/coffee/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_color_backgrounds', () => {
test('stock_photos_color_backgrounds: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/color-backgrounds/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_color_backgrounds: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/color-backgrounds/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_color_backgrounds: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/color-backgrounds/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_color_backgrounds: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/color-backgrounds/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_computer', () => {
test('stock_photos_computer: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/computer/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_computer: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/computer/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_computer: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/computer/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_computer: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/computer/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_cool_background', () => {
test('stock_photos_cool_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/cool-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_cool_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/cool-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_cool_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/cool-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_cool_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/cool-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_cute', () => {
test('stock_photos_cute: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/cute/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_cute: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/cute/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_cute: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/cute/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_cute: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/cute/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_dark', () => {
test('stock_photos_dark: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/dark/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_dark: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/dark/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_dark: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/dark/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_dark: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/dark/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_dog', () => {
test('stock_photos_dog: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/dog/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_dog: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/dog/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_dog: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/dog/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_dog: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/dog/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_education', () => {
test('stock_photos_education: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/education/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_education: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/education/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_education: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/education/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_education: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/education/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_elephant', () => {
test('stock_photos_elephant: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/elephant/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_elephant: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/elephant/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_elephant: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/elephant/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_elephant: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/elephant/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_environment', () => {
test('stock_photos_environment: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/environment/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_environment: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/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('stock_photos_environment: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/environment/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_environment: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/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 - stock_photos_fall', () => {
test('stock_photos_fall: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/fall/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_fall: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/fall/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_fall: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/fall/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_fall: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/fall/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_family', () => {
test('stock_photos_family: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/family/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_family: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/family/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_family: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/family/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_family: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/family/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_fashion', () => {
test('stock_photos_fashion: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/fashion/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_fashion: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/fashion/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_fashion: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/fashion/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_fashion: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/fashion/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_female_photographer', () => {
test('stock_photos_female_photographer: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/female-photographer/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_female_photographer: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/female-photographer/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_female_photographer: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/female-photographer/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_female_photographer: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/female-photographer/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_fitness', () => {
test('stock_photos_fitness: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/fitness/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_fitness: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/fitness/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_fitness: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/fitness/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_fitness: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/fitness/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_flatlay', () => {
test('stock_photos_flatlay: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/flatlay/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_flatlay: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/flatlay/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_flatlay: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/flatlay/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_flatlay: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/flatlay/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_flower_background', () => {
test('stock_photos_flower_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/flower-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_flower_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/flower-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_flower_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/flower-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_flower_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/flower-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_flowers', () => {
test('stock_photos_flowers: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/flowers/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_flowers: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/flowers/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_flowers: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/flowers/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_flowers: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/flowers/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_food', () => {
test('stock_photos_food: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/food/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_food: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/food/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_food: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/food/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_food: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/food/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_forest_images', () => {
test('stock_photos_forest_images: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/forest-images/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_forest_images: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/forest-images/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_forest_images: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/forest-images/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_forest_images: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/forest-images/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_free_images', () => {
test('stock_photos_free_images: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/free-images/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_free_images: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/free-images/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_free_images: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/free-images/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_free_images: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/free-images/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_gardening', () => {
test('stock_photos_gardening: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/gardening/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_gardening: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/gardening/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_gardening: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/gardening/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_gardening: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/gardening/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_golf', () => {
test('stock_photos_golf: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/golf/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_golf: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/golf/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_golf: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/golf/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_golf: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/golf/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_happy_holidays', () => {
test('stock_photos_happy_holidays: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/happy-holidays/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_happy_holidays: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/happy-holidays/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_happy_holidays: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/happy-holidays/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_happy_holidays: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/happy-holidays/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_healthcare', () => {
test('stock_photos_healthcare: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/healthcare/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_healthcare: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/healthcare/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_healthcare: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/healthcare/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_healthcare: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/healthcare/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_history', () => {
test('stock_photos_history: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/history/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_history: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/history/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_history: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/history/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_history: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/history/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_holidays', () => {
test('stock_photos_holidays: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/holidays/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_holidays: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/holidays/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_holidays: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/holidays/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_holidays: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/holidays/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_home', () => {
test('stock_photos_home: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/home/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_home: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/home/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_home: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/home/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_home: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/home/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_home_office', () => {
test('stock_photos_home_office: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/home-office/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_home_office: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/home-office/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_home_office: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/home-office/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_home_office: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/home-office/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_ice_cream', () => {
test('stock_photos_ice_cream: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/ice-cream/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_ice_cream: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/ice-cream/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_ice_cream: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/ice-cream/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_ice_cream: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/ice-cream/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_india', () => {
test('stock_photos_india: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/india/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_india: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/india/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_india: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/india/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_india: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/india/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_internet', () => {
test('stock_photos_internet: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/internet/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_internet: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/internet/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_internet: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/internet/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_internet: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/internet/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_jewelry', () => {
test('stock_photos_jewelry: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/jewelry/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_jewelry: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/jewelry/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_jewelry: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/jewelry/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_jewelry: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/jewelry/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_kids', () => {
test('stock_photos_kids: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/kids/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_kids: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/kids/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_kids: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/kids/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_kids: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/kids/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_landscape', () => {
test('stock_photos_landscape: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/landscape/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_landscape: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/landscape/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_landscape: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/landscape/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_landscape: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/landscape/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_leadership', () => {
test('stock_photos_leadership: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/leadership/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_leadership: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/leadership/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_leadership: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/leadership/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_leadership: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/leadership/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_life', () => {
test('stock_photos_life: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/life/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_life: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/life/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_life: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/life/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_life: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/life/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_light_background', () => {
test('stock_photos_light_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/light-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_light_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/light-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_light_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/light-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_light_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/light-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_love', () => {
test('stock_photos_love: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/love/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_love: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/love/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_love: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/love/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_love: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/love/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_love_background', () => {
test('stock_photos_love_background: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/love-background/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_love_background: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/love-background/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_love_background: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/love-background/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_love_background: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/love-background/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_makeup', () => {
test('stock_photos_makeup: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/makeup/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_makeup: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/makeup/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_makeup: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/makeup/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_makeup: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/makeup/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_man', () => {
test('stock_photos_man: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/man/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_man: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/man/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_man: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/man/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_man: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/man/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_mens_fashion', () => {
test('stock_photos_mens_fashion: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/mens-fashion/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_mens_fashion: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/mens-fashion/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_mens_fashion: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/mens-fashion/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_mens_fashion: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/mens-fashion/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_mental_health', () => {
test('stock_photos_mental_health: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/mental-health/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_mental_health: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/mental-health/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_mental_health: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/mental-health/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_mental_health: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/mental-health/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_mobile_backgrounds', () => {
test('stock_photos_mobile_backgrounds: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/mobile-backgrounds/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_mobile_backgrounds: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/mobile-backgrounds/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_mobile_backgrounds: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/mobile-backgrounds/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_mobile_backgrounds: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/mobile-backgrounds/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_money', () => {
test('stock_photos_money: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/money/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_money: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/money/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_money: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/money/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_money: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/money/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_moon', () => {
test('stock_photos_moon: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/moon/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_moon: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/moon/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_moon: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/moon/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_moon: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/moon/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_nature', () => {
test('stock_photos_nature: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/nature/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_nature: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/nature/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_nature: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/nature/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_nature: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/nature/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_office', () => {
test('stock_photos_office: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/office/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_office: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/office/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_office: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/office/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_office: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/office/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_outdoor', () => {
test('stock_photos_outdoor: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/outdoor/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_outdoor: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/outdoor/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_outdoor: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/outdoor/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_outdoor: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/outdoor/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_pants', () => {
test('stock_photos_pants: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/pants/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_pants: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/pants/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_pants: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/pants/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_pants: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/pants/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_people', () => {
test('stock_photos_people: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/people/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_people: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/people/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_people: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/people/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_people: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/people/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos', () => {
test('stock_photos_photos: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_sun', () => {
test('stock_photos_sun: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/sun/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_sun: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/sun/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_sun: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/sun/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_sun: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/sun/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_bath_bombs_online', () => {
test('stock_photos_business_ideas_sell_bath_bombs_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_bath_bombs_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_bath_bombs_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_bath_bombs_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_candles_online', () => {
test('stock_photos_business_ideas_sell_candles_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-candles-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_candles_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-candles-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_candles_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-candles-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_candles_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-candles-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_coffee_online', () => {
test('stock_photos_business_ideas_sell_coffee_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-coffee-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_coffee_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-coffee-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_coffee_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-coffee-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_coffee_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-coffee-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_enamel_pins_online', () => {
test('stock_photos_business_ideas_sell_enamel_pins_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_enamel_pins_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_enamel_pins_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_enamel_pins_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_jewelry_online', () => {
test('stock_photos_business_ideas_sell_jewelry_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-jewelry-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_jewelry_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-jewelry-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_jewelry_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-jewelry-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_jewelry_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-jewelry-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_lip_balm_online', () => {
test('stock_photos_business_ideas_sell_lip_balm_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_lip_balm_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_lip_balm_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_lip_balm_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_t_shirts_online', () => {
test('stock_photos_business_ideas_sell_t_shirts_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_t_shirts_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_t_shirts_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_t_shirts_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_tea_online', () => {
test('stock_photos_business_ideas_sell_tea_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-tea-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_tea_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-tea-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_tea_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-tea-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_tea_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-tea-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_business_ideas_sell_yoga_products_online', () => {
test('stock_photos_business_ideas_sell_yoga_products_online: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_business_ideas_sell_yoga_products_online: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_business_ideas_sell_yoga_products_online: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_business_ideas_sell_yoga_products_online: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_a_christmas_package_being_wrapped', () => {
test('stock_photos_photos_a_christmas_package_being_wrapped: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_a_christmas_package_being_wrapped: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_a_christmas_package_being_wrapped: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_a_christmas_package_being_wrapped: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees', () => {
test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book', () => {
test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks', () => {
test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_making_a_budget_tracking_finances', () => {
test('stock_photos_photos_making_a_budget_tracking_finances: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_making_a_budget_tracking_finances: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_making_a_budget_tracking_finances: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_making_a_budget_tracking_finances: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_man_takes_time_to_ponder', () => {
test('stock_photos_photos_man_takes_time_to_ponder: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/man-takes-time-to-ponder/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_man_takes_time_to_ponder: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/man-takes-time-to-ponder/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_man_takes_time_to_ponder: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/man-takes-time-to-ponder/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_man_takes_time_to_ponder: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/man-takes-time-to-ponder/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_painter_working_in_studio', () => {
test('stock_photos_photos_painter_working_in_studio: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/painter-working-in-studio/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_painter_working_in_studio: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/painter-working-in-studio/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_painter_working_in_studio: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/painter-working-in-studio/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_painter_working_in_studio: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/painter-working-in-studio/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page', () => {
test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/');
const imagesWithoutAlt = await page.locator('img:not([alt])').count();
const totalImages = await page.locator('img').count();
if (totalImages > 0) {
expect(imagesWithoutAlt / totalImages).toBeLessThan(0.5);
}
});
});
test.describe('Quality - stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel', () => {
test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: no console errors', async ({ page }) => {
const errors: string[] = [];
page.on('console', msg => { if (msg.type() === 'error') errors.push(msg.text()); });
await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/');
await page.waitForTimeout(1000);
expect(errors).toHaveLength(0);
});
test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: images load correctly', async ({ page }) => {
await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/');
await page.waitForTimeout(1000);
const images = page.locator('img[src]');
const count = await images.count();
for (let i = 0; i < Math.min(count, 10); i++) {
const naturalWidth = await images.nth(i).evaluate(
(el: HTMLImageElement) => el.naturalWidth
);
expect(naturalWidth).toBeGreaterThan(0);
}
});
test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: has selectable text (anti-cheat)', async ({ page }) => {
await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/');
const text = await page.evaluate(() => document.body.innerText);
expect(text.trim().length).toBeGreaterThan(50);
});
test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: images have alt attributes', async ({ page }) => {
await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/');
const imagesWithoutAlt = await page.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();
});
});