import { test, expect } from '@playwright/test'; test.describe('Functional - homepage', () => { test('homepage: title matches GT', async ({ page }) => { await page.goto('/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('explore 25,000+ high'); }); test('homepage: h1 "Free stock photos and royalty-"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free stock photos and royalty-free images' || t.startsWith('Free stock photos and royalty-free images'))).toBeTruthy(); }); test('homepage: h2 "Download beautiful photos for "', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Download beautiful photos for websites and commercial projects' || t.startsWith('Download beautiful photos for websites and commercial projects'))).toBeTruthy(); }); test('homepage: h2 "See all business concepts"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('homepage: h2 "Mindful Living"', async ({ page }) => { await page.goto('/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mindful Living' || t.startsWith('Mindful Living'))).toBeTruthy(); }); test('homepage: nav link "Aperlio"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Animals"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Cats"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('homepage: nav link "Dogs"', async ({ page }) => { await page.goto('/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos', () => { test('stock_photos: title matches GT', async ({ page }) => { await page.goto('/stock-photos/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('20,000+ free stock photos and royalty'); }); test('stock_photos: h1 "Free stock photos and royalty-"', async ({ page }) => { await page.goto('/stock-photos/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free stock photos and royalty-free images' || t.startsWith('Free stock photos and royalty-free images'))).toBeTruthy(); }); test('stock_photos: h2 "Trending topics:"', async ({ page }) => { await page.goto('/stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending topics:' || t.startsWith('Trending topics:'))).toBeTruthy(); }); test('stock_photos: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos: h2 "Wellness & Mind"', async ({ page }) => { await page.goto('/stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Wellness & Mind' || t.startsWith('Wellness & Mind'))).toBeTruthy(); }); test('stock_photos: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_prairie_woman_at_sunset', () => { test('stock_photos_photos_prairie_woman_at_sunset: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('woman on the prairie at sunset'); }); test('stock_photos_photos_prairie_woman_at_sunset: h1 "Resolution"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Resolution' || t.startsWith('Resolution'))).toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: h2 "Ideal for print and web use"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and web use' || t.startsWith('Ideal for print and web use'))).toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_prairie_woman_at_sunset: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/prairie-woman-at-sunset/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos of trains crossing frames'); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: h1 "Image Size"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image Size' || t.startsWith('Image Size'))).toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: h2 "Ideal for print and large web"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and large web' || t.startsWith('Ideal for print and large web'))).toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_train_travels_across_the_frame_with_tracks_and_wires: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/train-travels-across-the-frame-with-tracks-and-wires/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_two_customized_cars_rolling_through_a_city_street', () => { test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos of two custom cars cruisi'); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: h1 "Image dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image dimensions' || t.startsWith('Image dimensions'))).toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: h2 "Ideal for digital and print me"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for digital and print media' || t.startsWith('Ideal for digital and print media'))).toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_customized_cars_rolling_through_a_city_street: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/two-customized-cars-rolling-through-a-city-street/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photo'); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: h1 "Two People In A Car Looking At"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Two People In A Car Looking At A Map While Smiling' || t.startsWith('Two People In A Car Looking At A Map While Smiling'))).toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: h2 "Premium quality for digital an"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Premium quality for digital and print' || t.startsWith('Premium quality for digital and print'))).toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_two_people_in_a_car_look_at_a_map_while_smiling: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/two-people-in-a-car-look-at-a-map-while-smiling/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_woman_dressed_in_white_leans_against_a_wall', () => { test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photo'); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: h1 "Image size"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image size' || t.startsWith('Image size'))).toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: h2 "Ideal for print and large web "', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and large web use' || t.startsWith('Ideal for print and large web use'))).toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_woman_dressed_in_white_leans_against_a_wall: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/woman-dressed-in-white-leans-against-a-wall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background', () => { test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos'); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: h1 "Image Dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image Dimensions' || t.startsWith('Image Dimensions'))).toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: h2 "Ideal for high-quality print a"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for high-quality print and large displays' || t.startsWith('Ideal for high-quality print and large displays'))).toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: h2 "Sign up"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign up' || t.startsWith('Sign up'))).toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_wooden_toothbrushes_lined_up_against_a_green_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/wooden-toothbrushes-lined-up-against-a-green-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_portraits', () => { test('stock_photos_portraits: title matches GT', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free portrait photos'); }); test('stock_photos_portraits: h1 "Portrait Photography"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Portrait Photography' || t.startsWith('Portrait Photography'))).toBeTruthy(); }); test('stock_photos_portraits: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_portraits: h2 "Your photo is downloading now…"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your photo is downloading now…' || t.startsWith('Your photo is downloading now…'))).toBeTruthy(); }); test('stock_photos_portraits: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_portraits: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_portraits: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_portraits: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_portraits: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/portraits/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_product', () => { test('stock_photos_product: title matches GT', async ({ page }) => { await page.goto('/stock-photos/product/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('product photography [hd]'); }); test('stock_photos_product: h1 "Product Images"', async ({ page }) => { await page.goto('/stock-photos/product/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Product Images' || t.startsWith('Product Images'))).toBeTruthy(); }); test('stock_photos_product: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/product/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_product: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/product/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_product: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/product/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_product: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/product/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_product: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/product/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_product: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/product/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_product: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/product/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_recreation', () => { test('stock_photos_recreation: title matches GT', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('leisure images'); }); test('stock_photos_recreation: h1 "Recreation photos"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Recreation photos' || t.startsWith('Recreation photos'))).toBeTruthy(); }); test('stock_photos_recreation: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_recreation: h2 "Join Now"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join Now' || t.startsWith('Join Now'))).toBeTruthy(); }); test('stock_photos_recreation: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_recreation: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_recreation: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_recreation: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_recreation: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/recreation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_retail', () => { test('stock_photos_retail: title matches GT', async ({ page }) => { await page.goto('/stock-photos/retail/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('retail stock photos'); }); test('stock_photos_retail: h1 "Retail images"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Retail images' || t.startsWith('Retail images'))).toBeTruthy(); }); test('stock_photos_retail: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_retail: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_retail: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_retail: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_retail: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_retail: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_retail: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/retail/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_seasons', () => { test('stock_photos_seasons: title matches GT', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free seasonal stock photos'); }); test('stock_photos_seasons: h1 "Seasons pictures"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Seasons pictures' || t.startsWith('Seasons pictures'))).toBeTruthy(); }); test('stock_photos_seasons: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_seasons: h2 "Sign up"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign up' || t.startsWith('Sign up'))).toBeTruthy(); }); test('stock_photos_seasons: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_seasons: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_seasons: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_seasons: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_seasons: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/seasons/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_shirt', () => { test('stock_photos_shirt: title matches GT', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('shirt photos [hd]'); }); test('stock_photos_shirt: h1 "Shirts Images"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Shirts Images' || t.startsWith('Shirts Images'))).toBeTruthy(); }); test('stock_photos_shirt: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_shirt: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_shirt: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_shirt: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shirt: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shirt: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shirt: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/shirt/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_shop_local', () => { test('stock_photos_shop_local: title matches GT', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('shop local'); }); test('stock_photos_shop_local: h1 "Shop Local"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Shop Local' || t.startsWith('Shop Local'))).toBeTruthy(); }); test('stock_photos_shop_local: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_shop_local: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_shop_local: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_shop_local: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shop_local: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shop_local: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shop_local: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/shop-local/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_shopify_hardware', () => { test('stock_photos_shopify_hardware: title matches GT', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('point of sale gear'); }); test('stock_photos_shopify_hardware: h1 "Point of Sale Hardware"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Point of Sale Hardware' || t.startsWith('Point of Sale Hardware'))).toBeTruthy(); }); test('stock_photos_shopify_hardware: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_shopify_hardware: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_shopify_hardware: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_shopify_hardware: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shopify_hardware: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shopify_hardware: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_shopify_hardware: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/shopify-hardware/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_sitemap', () => { test('stock_photos_sitemap: title matches GT', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('aperlio sitemap'); }); test('stock_photos_sitemap: h1 "Complimentary Images"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Complimentary Images' || t.startsWith('Complimentary Images'))).toBeTruthy(); }); test('stock_photos_sitemap: h2 "Fresh Public Domain Photos"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fresh Public Domain Photos' || t.startsWith('Fresh Public Domain Photos'))).toBeTruthy(); }); test('stock_photos_sitemap: h2 "Reach Out Flatlay"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Reach Out Flatlay' || t.startsWith('Reach Out Flatlay'))).toBeTruthy(); }); test('stock_photos_sitemap: h2 "Sell Bath Bombs Web"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sell Bath Bombs Web' || t.startsWith('Sell Bath Bombs Web'))).toBeTruthy(); }); test('stock_photos_sitemap: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sitemap: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sitemap: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sitemap: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/sitemap/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_spring', () => { test('stock_photos_spring: title matches GT', async ({ page }) => { await page.goto('/stock-photos/spring/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('spring stock photos'); }); test('stock_photos_spring: h1 "Spring pictures"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Spring pictures' || t.startsWith('Spring pictures'))).toBeTruthy(); }); test('stock_photos_spring: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_spring: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_spring: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_spring: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_spring: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_spring: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_spring: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/spring/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_summer', () => { test('stock_photos_summer: title matches GT', async ({ page }) => { await page.goto('/stock-photos/summer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('summer photos'); }); test('stock_photos_summer: h1 "Summer pictures"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Summer pictures' || t.startsWith('Summer pictures'))).toBeTruthy(); }); test('stock_photos_summer: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_summer: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_summer: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_summer: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_summer: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_summer: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_summer: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/summer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_tea_cup', () => { test('stock_photos_tea_cup: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('tea cup photos [hd]'); }); test('stock_photos_tea_cup: h1 "Tea Cup Images"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Tea Cup Images' || t.startsWith('Tea Cup Images'))).toBeTruthy(); }); test('stock_photos_tea_cup: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_tea_cup: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_tea_cup: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_tea_cup: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tea_cup: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tea_cup: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tea_cup: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tea-cup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_technology', () => { test('stock_photos_technology: title matches GT', async ({ page }) => { await page.goto('/stock-photos/technology/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('tech stock photos'); }); test('stock_photos_technology: h1 "Technology Images"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Technology Images' || t.startsWith('Technology Images'))).toBeTruthy(); }); test('stock_photos_technology: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_technology: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_technology: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_technology: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_technology: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_technology: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_technology: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/technology/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('top 20 free virtual meeting backgrounds '); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: h1 "How Virtual Backgrounds Work"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'How Virtual Backgrounds Work' || t.startsWith('How Virtual Backgrounds Work'))).toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: h2 "The virtual background feature"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The virtual background feature is included in all service plans. It intelligently distinguishes betw' || t.startsWith('The virtual background feature is included in all service plans. It intelligently distinguishes betw'))).toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: h2 "It employs chroma key technolo"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'It employs chroma key technology to swap your real surroundings with a chosen image or clip. This cr' || t.startsWith('It employs chroma key technology to swap your real surroundings with a chosen image or clip. This cr'))).toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_20_best_free_zoom_background_images_to_brighten_up_your_virtual_meetings: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/20-best-free-zoom-background-images-to-brighten-up-your-virtual-meetings/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_tips_aperlio_photos_not_stock_photos', () => { test('stock_photos_tips_aperlio_photos_not_stock_photos: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('aperlio images are not stock'); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: h1 "Photo Styles, By The Numbers"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Photo Styles, By The Numbers' || t.startsWith('Photo Styles, By The Numbers'))).toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: h2 "Popular:"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Popular:' || t.startsWith('Popular:'))).toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: h2 "Photo by Fenn Yarnbrook"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Photo by Fenn Yarnbrook' || t.startsWith('Photo by Fenn Yarnbrook'))).toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: h2 "Launching a venture involves m"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Launching a venture involves many essential expenses, but we believe high-quality photography should' || t.startsWith('Launching a venture involves many essential expenses, but we believe high-quality photography should'))).toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_aperlio_photos_not_stock_photos: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/aperlio-photos-not-stock-photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_tips_facebook_ads_how_to_get_started', () => { test('stock_photos_tips_facebook_ads_how_to_get_started: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launching ads'); }); test('stock_photos_tips_facebook_ads_how_to_get_started: h1 "Ad Formats: Sizes & Types"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ad Formats: Sizes & Types' || t.startsWith('Ad Formats: Sizes & Types'))).toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: h2 "Users spend huge amounts of ti"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Users spend huge amounts of time here' || t.startsWith('Users spend huge amounts of time here'))).toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: h2 "Postly Image Ads"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Postly Image Ads' || t.startsWith('Postly Image Ads'))).toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_ads_how_to_get_started: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-ads-how-to-get-started/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_tips_facebook_cover_photo_size_1', () => { test('stock_photos_tips_facebook_cover_photo_size_1: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('postly cover dimensions'); }); test('stock_photos_tips_facebook_cover_photo_size_1: h1 "Template for Postly Cover Art"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Template for Postly Cover Art' || t.startsWith('Template for Postly Cover Art'))).toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: h2 "Whether you aim to capture lea"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Whether you aim to capture leads, drive sales, or foster customer loyalty, your header image sets th' || t.startsWith('Whether you aim to capture leads, drive sales, or foster customer loyalty, your header image sets th'))).toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: h2 "The vertical box indicates the"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The vertical box indicates the mobile viewport, measuring 640 by 360 pixels.' || t.startsWith('The vertical box indicates the mobile viewport, measuring 640 by 360 pixels.'))).toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_cover_photo_size_1: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-cover-photo-size-1/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('maximizing engagement on your business p'); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: h1 "Using link posts effectively"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Using link posts effectively' || t.startsWith('Using link posts effectively'))).toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: h2 "conversion funnel"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'conversion funnel' || t.startsWith('conversion funnel'))).toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: h2 "10-30% more engagement than li"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '10-30% more engagement than link or image posts' || t.startsWith('10-30% more engagement than link or image posts'))).toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_facebook_posts_how_to_get_the_most_out_of_your_business_page: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/facebook-posts-how-to-get-the-most-out-of-your-business-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_tips_how_to_master_flat_lay_photography_in_2020', () => { test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mastering flat lay photography in 2023'); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: h1 "Top Flat Lay Photo Tips"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Top Flat Lay Photo Tips' || t.startsWith('Top Flat Lay Photo Tips'))).toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: h2 "Does your product stand out as"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Does your product stand out as the focal point?' || t.startsWith('Does your product stand out as the focal point?'))).toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: h2 "Lumen"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Lumen' || t.startsWith('Lumen'))).toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_master_flat_lay_photography_in_2020: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-master-flat-lay-photography-in-2020/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('diy product photography at home'); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: h1 "Essential Gear for Product Sho"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Essential Gear for Product Shots' || t.startsWith('Essential Gear for Product Shots'))).toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: h2 "Trending:"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Trending:' || t.startsWith('Trending:'))).toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: h2 "1. Standard Product"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Standard Product' || t.startsWith('1. Standard Product'))).toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: h2 "Pixora Lumen"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pixora Lumen' || t.startsWith('Pixora Lumen'))).toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_tips_how_to_take_product_photos_at_home_with_almost_no_equipment: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/tips/how-to-take-product-photos-at-home-with-almost-no-equipment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_transportation', () => { test('stock_photos_transportation: title matches GT', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd transportation photos & vehicle '); }); test('stock_photos_transportation: h1 "Transportation & vehicle image"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Transportation & vehicle images' || t.startsWith('Transportation & vehicle images'))).toBeTruthy(); }); test('stock_photos_transportation: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_transportation: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_transportation: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_transportation: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_transportation: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_transportation: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_transportation: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/transportation/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_travel', () => { test('stock_photos_travel: title matches GT', async ({ page }) => { await page.goto('/stock-photos/travel/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('wanderlust'); }); test('stock_photos_travel: h1 "Travel photography"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Travel photography' || t.startsWith('Travel photography'))).toBeTruthy(); }); test('stock_photos_travel: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_travel: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_travel: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_travel: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_travel: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_travel: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_travel: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/travel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_video_call_backgrounds', () => { test('stock_photos_video_call_backgrounds: title matches GT', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('virtual meeting backdrops'); }); test('stock_photos_video_call_backgrounds: h1 "Video Call Backgrounds"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Video Call Backgrounds' || t.startsWith('Video Call Backgrounds'))).toBeTruthy(); }); test('stock_photos_video_call_backgrounds: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_video_call_backgrounds: h2 "Fresh, free visuals are added "', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fresh, free visuals are added every day.' || t.startsWith('Fresh, free visuals are added every day.'))).toBeTruthy(); }); test('stock_photos_video_call_backgrounds: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_video_call_backgrounds: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_video_call_backgrounds: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_video_call_backgrounds: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_video_call_backgrounds: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/video-call-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_village', () => { test('stock_photos_village: title matches GT', async ({ page }) => { await page.goto('/stock-photos/village/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('village photos [hd]'); }); test('stock_photos_village: h1 "Village Images"', async ({ page }) => { await page.goto('/stock-photos/village/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Village Images' || t.startsWith('Village Images'))).toBeTruthy(); }); test('stock_photos_village: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/village/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_village: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/village/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_village: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/village/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_village: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/village/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_village: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/village/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_village: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/village/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_village: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/village/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_weather', () => { test('stock_photos_weather: title matches GT', async ({ page }) => { await page.goto('/stock-photos/weather/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('100+ weather photos [hd]'); }); test('stock_photos_weather: h1 "Weather Images"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Weather Images' || t.startsWith('Weather Images'))).toBeTruthy(); }); test('stock_photos_weather: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_weather: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_weather: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_weather: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_weather: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_weather: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_weather: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/weather/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_winter', () => { test('stock_photos_winter: title matches GT', async ({ page }) => { await page.goto('/stock-photos/winter/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('winter images'); }); test('stock_photos_winter: h1 "Winter pictures"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Winter pictures' || t.startsWith('Winter pictures'))).toBeTruthy(); }); test('stock_photos_winter: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_winter: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_winter: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_winter: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_winter: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_winter: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_winter: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/winter/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_woman', () => { test('stock_photos_woman: title matches GT', async ({ page }) => { await page.goto('/stock-photos/woman/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('women stock photos'); }); test('stock_photos_woman: h1 "Pictures of women"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pictures of women' || t.startsWith('Pictures of women'))).toBeTruthy(); }); test('stock_photos_woman: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_woman: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_woman: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_woman: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_woman: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_woman: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_woman: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/woman/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_work', () => { test('stock_photos_work: title matches GT', async ({ page }) => { await page.goto('/stock-photos/work/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('professional work photos'); }); test('stock_photos_work: h1 "Work images"', async ({ page }) => { await page.goto('/stock-photos/work/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Work images' || t.startsWith('Work images'))).toBeTruthy(); }); test('stock_photos_work: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/work/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_work: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/work/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_work: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/work/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_work: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/work/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/work/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/work/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/work/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_work_from_home', () => { test('stock_photos_work_from_home: title matches GT', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('remote work'); }); test('stock_photos_work_from_home: h1 "Work From Home"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Work From Home' || t.startsWith('Work From Home'))).toBeTruthy(); }); test('stock_photos_work_from_home: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_work_from_home: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_work_from_home: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_work_from_home: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work_from_home: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work_from_home: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_work_from_home: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/work-from-home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_yoga', () => { test('stock_photos_yoga: title matches GT', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('yoga photos'); }); test('stock_photos_yoga: h1 "Yoga images"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Yoga images' || t.startsWith('Yoga images'))).toBeTruthy(); }); test('stock_photos_yoga: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_yoga: h2 "Sign Up"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign Up' || t.startsWith('Sign Up'))).toBeTruthy(); }); test('stock_photos_yoga: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_yoga: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_yoga: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_yoga: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_yoga: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/yoga/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - legal_terms', () => { test('legal_terms: title matches GT', async ({ page }) => { await page.goto('/legal/terms/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('aperlio'); }); test('legal_terms: h1 "Aperlio Terms of Service"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio Terms of Service' || t.startsWith('Aperlio Terms of Service'))).toBeTruthy(); }); test('legal_terms: h2 "1. Aperlio Account Terms"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1. Aperlio Account Terms' || t.startsWith('1. Aperlio Account Terms'))).toBeTruthy(); }); test('legal_terms: h2 "2. Aperlio Account Owner"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '2. Aperlio Account Owner' || t.startsWith('2. Aperlio Account Owner'))).toBeTruthy(); }); test('legal_terms: h2 "3. General Conditions"', async ({ page }) => { await page.goto('/legal/terms/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '3. General Conditions' || t.startsWith('3. General Conditions'))).toBeTruthy(); }); test('legal_terms: nav link "Aperlio"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('legal_terms: nav link "Animals"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('legal_terms: nav link "Cats"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('legal_terms: nav link "Dogs"', async ({ page }) => { await page.goto('/legal/terms/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_about_us', () => { test('stock_photos_about_us: title matches GT', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('aperlio'); }); test('stock_photos_about_us: h1 "Myriads of public domain visua"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Myriads of public domain visuals' || t.startsWith('Myriads of public domain visuals'))).toBeTruthy(); }); test('stock_photos_about_us: h2 "Use our photos freely for any "', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Use our photos freely for any project or purpose' || t.startsWith('Use our photos freely for any project or purpose'))).toBeTruthy(); }); test('stock_photos_about_us: h2 "Read more about our image lice"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Read more about our image licenses and legal terms here.' || t.startsWith('Read more about our image licenses and legal terms here.'))).toBeTruthy(); }); test('stock_photos_about_us: h2 "Show appreciation by giving cr"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Show appreciation by giving credit to photographers' || t.startsWith('Show appreciation by giving credit to photographers'))).toBeTruthy(); }); test('stock_photos_about_us: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_about_us: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_about_us: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_about_us: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/about-us/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_airport', () => { test('stock_photos_airport: title matches GT', async ({ page }) => { await page.goto('/stock-photos/airport/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('airport photos [hd]'); }); test('stock_photos_airport: h1 "Airport Pictures"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Airport Pictures' || t.startsWith('Airport Pictures'))).toBeTruthy(); }); test('stock_photos_airport: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_airport: h2 "Find the perfect airport photo"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find the perfect airport photo' || t.startsWith('Find the perfect airport photo'))).toBeTruthy(); }); test('stock_photos_airport: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_airport: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_airport: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_airport: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_airport: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/airport/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_animal', () => { test('stock_photos_animal: title matches GT', async ({ page }) => { await page.goto('/stock-photos/animal/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free animal stock photos'); }); test('stock_photos_animal: h1 "Animal pictures"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animal pictures' || t.startsWith('Animal pictures'))).toBeTruthy(); }); test('stock_photos_animal: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_animal: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_animal: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_animal: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_animal: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_animal: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_animal: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/animal/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_around_the_world', () => { test('stock_photos_around_the_world: title matches GT', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('global vistas'); }); test('stock_photos_around_the_world: h1 "Pictures from around the world"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pictures from around the world' || t.startsWith('Pictures from around the world'))).toBeTruthy(); }); test('stock_photos_around_the_world: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_around_the_world: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_around_the_world: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_around_the_world: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_around_the_world: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_around_the_world: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_around_the_world: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/around-the-world/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_arrow', () => { test('stock_photos_arrow: title matches GT', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('arrow stock photos hd'); }); test('stock_photos_arrow: h1 "Arrow Images"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Arrow Images' || t.startsWith('Arrow Images'))).toBeTruthy(); }); test('stock_photos_arrow: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_arrow: h2 "Given the diverse applications"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Given the diverse applications for arrow imagery, begin by refining your search criteria. Do you nee' || t.startsWith('Given the diverse applications for arrow imagery, begin by refining your search criteria. Do you nee'))).toBeTruthy(); }); test('stock_photos_arrow: h2 "Sign Up"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign Up' || t.startsWith('Sign Up'))).toBeTruthy(); }); test('stock_photos_arrow: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arrow: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arrow: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arrow: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/arrow/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_arts', () => { test('stock_photos_arts: title matches GT', async ({ page }) => { await page.goto('/stock-photos/arts/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('creative arts photos'); }); test('stock_photos_arts: h1 "Arts pictures"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Arts pictures' || t.startsWith('Arts pictures'))).toBeTruthy(); }); test('stock_photos_arts: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_arts: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_arts: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_arts: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arts: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arts: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_arts: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/arts/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_baby', () => { test('stock_photos_baby: title matches GT', async ({ page }) => { await page.goto('/stock-photos/baby/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('baby photos [hd]'); }); test('stock_photos_baby: h1 "Baby Photos"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Baby Photos' || t.startsWith('Baby Photos'))).toBeTruthy(); }); test('stock_photos_baby: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_baby: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_baby: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_baby: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_baby: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_baby: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_baby: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/baby/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_background', () => { test('stock_photos_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('1000+ free hd background images and phot'); }); test('stock_photos_background: h1 "1000+ HD Background Images and"', async ({ page }) => { await page.goto('/stock-photos/background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1000+ HD Background Images and Photos' || t.startsWith('1000+ HD Background Images and Photos'))).toBeTruthy(); }); test('stock_photos_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_background: h2 "Browse our free, downloadable "', async ({ page }) => { await page.goto('/stock-photos/background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Browse our free, downloadable high-resolution images, perfect for your next creative project.' || t.startsWith('Browse our free, downloadable high-resolution images, perfect for your next creative project.'))).toBeTruthy(); }); test('stock_photos_background: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_banana', () => { test('stock_photos_banana: title matches GT', async ({ page }) => { await page.goto('/stock-photos/banana/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free banana stock photos'); }); test('stock_photos_banana: h1 "Banana Images"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Banana Images' || t.startsWith('Banana Images'))).toBeTruthy(); }); test('stock_photos_banana: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_banana: h2 "Discover more free banana imag"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free banana images' || t.startsWith('Discover more free banana images'))).toBeTruthy(); }); test('stock_photos_banana: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_banana: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_banana: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_banana: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_banana: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/banana/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_beauty', () => { test('stock_photos_beauty: title matches GT', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free beauty stock photos'); }); test('stock_photos_beauty: h1 "Pictures of beauty products & "', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pictures of beauty products & industries' || t.startsWith('Pictures of beauty products & industries'))).toBeTruthy(); }); test('stock_photos_beauty: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_beauty: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_beauty: h2 "Resources"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Resources' || t.startsWith('Resources'))).toBeTruthy(); }); test('stock_photos_beauty: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_beauty: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_beauty: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_beauty: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/beauty/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_bible', () => { test('stock_photos_bible: title matches GT', async ({ page }) => { await page.goto('/stock-photos/bible/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('sacred scripture photos [hd]'); }); test('stock_photos_bible: h1 "Bible Images"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Bible Images' || t.startsWith('Bible Images'))).toBeTruthy(); }); test('stock_photos_bible: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_bible: h2 "Find the perfect bible photo"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find the perfect bible photo' || t.startsWith('Find the perfect bible photo'))).toBeTruthy(); }); test('stock_photos_bible: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_bible: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_bible: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_bible: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_bible: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/bible/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_black_and_white', () => { test('stock_photos_black_and_white: title matches GT', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('monochrome magic'); }); test('stock_photos_black_and_white: h1 "Black and white pictures"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Black and white pictures' || t.startsWith('Black and white pictures'))).toBeTruthy(); }); test('stock_photos_black_and_white: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_black_and_white: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_black_and_white: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_black_and_white: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_and_white: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_and_white: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_and_white: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/black-and-white/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_black_backgrounds', () => { test('stock_photos_black_backgrounds: title matches GT', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('dark backdrop photos [hd]'); }); test('stock_photos_black_backgrounds: h1 "Black Background Images"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Black Background Images' || t.startsWith('Black Background Images'))).toBeTruthy(); }); test('stock_photos_black_backgrounds: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_black_backgrounds: h2 "Find the perfect black backgro"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find the perfect black background' || t.startsWith('Find the perfect black background'))).toBeTruthy(); }); test('stock_photos_black_backgrounds: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_black_backgrounds: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_backgrounds: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_backgrounds: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_black_backgrounds: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/black-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_blue_background', () => { test('stock_photos_blue_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('hd blue background photos'); }); test('stock_photos_blue_background: h1 "Blue Background Images"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Blue Background Images' || t.startsWith('Blue Background Images'))).toBeTruthy(); }); test('stock_photos_blue_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_blue_background: h2 "Discover more free blue backgr"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free blue background images' || t.startsWith('Discover more free blue background images'))).toBeTruthy(); }); test('stock_photos_blue_background: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_blue_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blue_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blue_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blue_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/blue-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_blur_background', () => { test('stock_photos_blur_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('soft focus backgrounds [hd]'); }); test('stock_photos_blur_background: h1 "Blur Background Images"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Blur Background Images' || t.startsWith('Blur Background Images'))).toBeTruthy(); }); test('stock_photos_blur_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_blur_background: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_blur_background: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_blur_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blur_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blur_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_blur_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/blur-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business', () => { test('stock_photos_business: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('business photos'); }); test('stock_photos_business: h1 "Business photos"', async ({ page }) => { await page.goto('/stock-photos/business/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Business photos' || t.startsWith('Business photos'))).toBeTruthy(); }); test('stock_photos_business: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_business: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_business: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/business/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_business: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas', () => { test('stock_photos_business_ideas: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('startup concepts'); }); test('stock_photos_business_ideas: h1 "Popular startup concepts"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Popular startup concepts' || t.startsWith('Popular startup concepts'))).toBeTruthy(); }); test('stock_photos_business_ideas: h2 "Benefits of launching online"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Benefits of launching online' || t.startsWith('Benefits of launching online'))).toBeTruthy(); }); test('stock_photos_business_ideas: h2 "Choosing your ideal business m"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Choosing your ideal business model' || t.startsWith('Choosing your ideal business model'))).toBeTruthy(); }); test('stock_photos_business_ideas: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_business_ideas: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_butterfly', () => { test('stock_photos_butterfly: title matches GT', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free butterfly photos [hd]'); }); test('stock_photos_butterfly: h1 "Butterfly Images"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Butterfly Images' || t.startsWith('Butterfly Images'))).toBeTruthy(); }); test('stock_photos_butterfly: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_butterfly: h2 "Discover more free butterfly i"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free butterfly images' || t.startsWith('Discover more free butterfly images'))).toBeTruthy(); }); test('stock_photos_butterfly: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_butterfly: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_butterfly: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_butterfly: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_butterfly: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/butterfly/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_cat', () => { test('stock_photos_cat: title matches GT', async ({ page }) => { await page.goto('/stock-photos/cat/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('cat stock photos'); }); test('stock_photos_cat: h1 "Cat & kitten pictures"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cat & kitten pictures' || t.startsWith('Cat & kitten pictures'))).toBeTruthy(); }); test('stock_photos_cat: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_cat: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_cat: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_cat: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cat: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cat: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cat: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/cat/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_celebrate', () => { test('stock_photos_celebrate: title matches GT', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd celebration photos & party image'); }); test('stock_photos_celebrate: h1 "Celebration & party pictures"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Celebration & party pictures' || t.startsWith('Celebration & party pictures'))).toBeTruthy(); }); test('stock_photos_celebrate: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_celebrate: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_celebrate: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_celebrate: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_celebrate: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_celebrate: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_celebrate: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/celebrate/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_children', () => { test('stock_photos_children: title matches GT', async ({ page }) => { await page.goto('/stock-photos/children/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('childhood joy'); }); test('stock_photos_children: h1 "Children photos"', async ({ page }) => { await page.goto('/stock-photos/children/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Children photos' || t.startsWith('Children photos'))).toBeTruthy(); }); test('stock_photos_children: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/children/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_children: h2 "Find heartwarming royalty free"', async ({ page }) => { await page.goto('/stock-photos/children/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Find heartwarming royalty free young photos' || t.startsWith('Find heartwarming royalty free young photos'))).toBeTruthy(); }); test('stock_photos_children: h2 "Your photo is downloading now…"', async ({ page }) => { await page.goto('/stock-photos/children/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your photo is downloading now…' || t.startsWith('Your photo is downloading now…'))).toBeTruthy(); }); test('stock_photos_children: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/children/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_children: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/children/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_children: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/children/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_children: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/children/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_cinemagraphs', () => { test('stock_photos_cinemagraphs: title matches GT', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free cinemagraphs'); }); test('stock_photos_cinemagraphs: h1 "Cinemagraphs & Moving Images"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cinemagraphs & Moving Images' || t.startsWith('Cinemagraphs & Moving Images'))).toBeTruthy(); }); test('stock_photos_cinemagraphs: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_cinemagraphs: h2 "Public Domain Cinemagraphs"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Public Domain Cinemagraphs' || t.startsWith('Public Domain Cinemagraphs'))).toBeTruthy(); }); test('stock_photos_cinemagraphs: h2 "Complimentary Cinemagraphs — G"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Complimentary Cinemagraphs — Grab .GIFs' || t.startsWith('Complimentary Cinemagraphs — Grab .GIFs'))).toBeTruthy(); }); test('stock_photos_cinemagraphs: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cinemagraphs: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cinemagraphs: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cinemagraphs: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/cinemagraphs/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_city', () => { test('stock_photos_city: title matches GT', async ({ page }) => { await page.goto('/stock-photos/city/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('urban photos [hd]'); }); test('stock_photos_city: h1 "City pictures"', async ({ page }) => { await page.goto('/stock-photos/city/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'City pictures' || t.startsWith('City pictures'))).toBeTruthy(); }); test('stock_photos_city: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/city/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_city: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/city/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_city: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/city/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_city: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/city/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_city: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/city/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_city: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/city/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_city: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/city/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_classroom', () => { test('stock_photos_classroom: title matches GT', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('classroom photos [hd]'); }); test('stock_photos_classroom: h1 "Classroom Pictures"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Classroom Pictures' || t.startsWith('Classroom Pictures'))).toBeTruthy(); }); test('stock_photos_classroom: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_classroom: h2 "Discover more free classroom p"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free classroom pictures' || t.startsWith('Discover more free classroom pictures'))).toBeTruthy(); }); test('stock_photos_classroom: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_classroom: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_classroom: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_classroom: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_classroom: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/classroom/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_coffee', () => { test('stock_photos_coffee: title matches GT', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('coffee stock photos'); }); test('stock_photos_coffee: h1 "Coffee images"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Coffee images' || t.startsWith('Coffee images'))).toBeTruthy(); }); test('stock_photos_coffee: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_coffee: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_coffee: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_coffee: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_coffee: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_coffee: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_coffee: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/coffee/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_color_backgrounds', () => { test('stock_photos_color_backgrounds: title matches GT', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('vibrant backdrops'); }); test('stock_photos_color_backgrounds: h1 "Color Background Images"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Color Background Images' || t.startsWith('Color Background Images'))).toBeTruthy(); }); test('stock_photos_color_backgrounds: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_color_backgrounds: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_color_backgrounds: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_color_backgrounds: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_color_backgrounds: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_color_backgrounds: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_color_backgrounds: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/color-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_computer', () => { test('stock_photos_computer: title matches GT', async ({ page }) => { await page.goto('/stock-photos/computer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('computer photos [hd]'); }); test('stock_photos_computer: h1 "Free Computer Images"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free Computer Images' || t.startsWith('Free Computer Images'))).toBeTruthy(); }); test('stock_photos_computer: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_computer: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_computer: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_computer: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_computer: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_computer: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_computer: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/computer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_cool_background', () => { test('stock_photos_cool_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('100+ stylish background photos [hd]'); }); test('stock_photos_cool_background: h1 "Cool Background Images"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cool Background Images' || t.startsWith('Cool Background Images'))).toBeTruthy(); }); test('stock_photos_cool_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_cool_background: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_cool_background: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_cool_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cool_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cool_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cool_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/cool-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_cute', () => { test('stock_photos_cute: title matches GT', async ({ page }) => { await page.goto('/stock-photos/cute/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('adorable stock photos [hd]'); }); test('stock_photos_cute: h1 "Cute Pictures"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cute Pictures' || t.startsWith('Cute Pictures'))).toBeTruthy(); }); test('stock_photos_cute: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_cute: h2 "Discover more free cute pictur"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free cute pictures' || t.startsWith('Discover more free cute pictures'))).toBeTruthy(); }); test('stock_photos_cute: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_cute: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cute: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cute: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_cute: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/cute/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_dark', () => { test('stock_photos_dark: title matches GT', async ({ page }) => { await page.goto('/stock-photos/dark/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('moody photos [hd]'); }); test('stock_photos_dark: h1 "Dark Images"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dark Images' || t.startsWith('Dark Images'))).toBeTruthy(); }); test('stock_photos_dark: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_dark: h2 "Discover more free dark images"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free dark images' || t.startsWith('Discover more free dark images'))).toBeTruthy(); }); test('stock_photos_dark: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_dark: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dark: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dark: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dark: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/dark/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_dog', () => { test('stock_photos_dog: title matches GT', async ({ page }) => { await page.goto('/stock-photos/dog/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('high'); }); test('stock_photos_dog: h1 "Pictures of dogs"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pictures of dogs' || t.startsWith('Pictures of dogs'))).toBeTruthy(); }); test('stock_photos_dog: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_dog: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_dog: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_dog: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dog: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dog: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_dog: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/dog/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_education', () => { test('stock_photos_education: title matches GT', async ({ page }) => { await page.goto('/stock-photos/education/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('education photos [hd]'); }); test('stock_photos_education: h1 "Education Images"', async ({ page }) => { await page.goto('/stock-photos/education/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Education Images' || t.startsWith('Education Images'))).toBeTruthy(); }); test('stock_photos_education: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/education/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_education: h2 "Discover more free education i"', async ({ page }) => { await page.goto('/stock-photos/education/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free education images' || t.startsWith('Discover more free education images'))).toBeTruthy(); }); test('stock_photos_education: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/education/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_education: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/education/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_education: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/education/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_education: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/education/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_education: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/education/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_elephant', () => { test('stock_photos_elephant: title matches GT', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free elephant photos [hd]'); }); test('stock_photos_elephant: h1 "Elephant Pictures"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Elephant Pictures' || t.startsWith('Elephant Pictures'))).toBeTruthy(); }); test('stock_photos_elephant: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_elephant: h2 "Discover more free elephant pi"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free elephant pictures' || t.startsWith('Discover more free elephant pictures'))).toBeTruthy(); }); test('stock_photos_elephant: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_elephant: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_elephant: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_elephant: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_elephant: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/elephant/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_environment', () => { test('stock_photos_environment: title matches GT', async ({ page }) => { await page.goto('/stock-photos/environment/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('100+ nature & landscape photos [hd]'); }); test('stock_photos_environment: h1 "Environment Pictures"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Environment Pictures' || t.startsWith('Environment Pictures'))).toBeTruthy(); }); test('stock_photos_environment: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_environment: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_environment: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_environment: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_environment: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_environment: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_environment: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/environment/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_fall', () => { test('stock_photos_fall: title matches GT', async ({ page }) => { await page.goto('/stock-photos/fall/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('autumn imagery'); }); test('stock_photos_fall: h1 "Autumn & fall pictures"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Autumn & fall pictures' || t.startsWith('Autumn & fall pictures'))).toBeTruthy(); }); test('stock_photos_fall: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_fall: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_fall: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_fall: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fall: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fall: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fall: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/fall/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_family', () => { test('stock_photos_family: title matches GT', async ({ page }) => { await page.goto('/stock-photos/family/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('family photos [hd]'); }); test('stock_photos_family: h1 "Family Images"', async ({ page }) => { await page.goto('/stock-photos/family/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Family Images' || t.startsWith('Family Images'))).toBeTruthy(); }); test('stock_photos_family: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/family/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_family: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/family/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_family: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/family/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_family: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/family/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_family: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/family/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_family: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/family/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_family: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/family/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_fashion', () => { test('stock_photos_fashion: title matches GT', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free fashion stock photos (hd)'); }); test('stock_photos_fashion: h1 "Fashion images and pictures"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fashion images and pictures' || t.startsWith('Fashion images and pictures'))).toBeTruthy(); }); test('stock_photos_fashion: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_fashion: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_fashion: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_fashion: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fashion: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fashion: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fashion: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_female_photographer', () => { test('stock_photos_female_photographer: title matches GT', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('stock photos by women'); }); test('stock_photos_female_photographer: h1 "Female Photographers"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Female Photographers' || t.startsWith('Female Photographers'))).toBeTruthy(); }); test('stock_photos_female_photographer: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_female_photographer: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_female_photographer: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_female_photographer: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_female_photographer: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_female_photographer: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_female_photographer: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/female-photographer/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_fitness', () => { test('stock_photos_fitness: title matches GT', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free high'); }); test('stock_photos_fitness: h1 "Fitness Images"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fitness Images' || t.startsWith('Fitness Images'))).toBeTruthy(); }); test('stock_photos_fitness: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_fitness: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_fitness: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_fitness: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fitness: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fitness: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_fitness: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/fitness/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_flatlay', () => { test('stock_photos_flatlay: title matches GT', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('flat lays'); }); test('stock_photos_flatlay: h1 "Flat Lay Photos: Pictures of F"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Flat Lay Photos: Pictures of Flatlays' || t.startsWith('Flat Lay Photos: Pictures of Flatlays'))).toBeTruthy(); }); test('stock_photos_flatlay: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_flatlay: h2 "Browse our extensive library o"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Browse our extensive library of flatlay images or explore the tips below to craft your own striking' || t.startsWith('Browse our extensive library of flatlay images or explore the tips below to craft your own striking'))).toBeTruthy(); }); test('stock_photos_flatlay: h2 "Experiment with Space and Ligh"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Experiment with Space and Lighting' || t.startsWith('Experiment with Space and Lighting'))).toBeTruthy(); }); test('stock_photos_flatlay: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flatlay: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flatlay: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flatlay: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/flatlay/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_flower_background', () => { test('stock_photos_flower_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('floral background photos [hd]'); }); test('stock_photos_flower_background: h1 "Flower Background Images"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Flower Background Images' || t.startsWith('Flower Background Images'))).toBeTruthy(); }); test('stock_photos_flower_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_flower_background: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_flower_background: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_flower_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flower_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flower_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flower_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/flower-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_flowers', () => { test('stock_photos_flowers: title matches GT', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('1000+ floral photos [hd]'); }); test('stock_photos_flowers: h1 "1000+ Flower Images"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1000+ Flower Images' || t.startsWith('1000+ Flower Images'))).toBeTruthy(); }); test('stock_photos_flowers: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_flowers: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_flowers: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_flowers: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flowers: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flowers: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_flowers: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/flowers/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_food', () => { test('stock_photos_food: title matches GT', async ({ page }) => { await page.goto('/stock-photos/food/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free food photos [hd]'); }); test('stock_photos_food: h1 "Food Images"', async ({ page }) => { await page.goto('/stock-photos/food/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Food Images' || t.startsWith('Food Images'))).toBeTruthy(); }); test('stock_photos_food: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/food/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_food: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/food/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_food: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/food/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_food: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/food/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_food: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/food/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_food: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/food/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_food: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/food/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_forest_images', () => { test('stock_photos_forest_images: title matches GT', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('forest photos [hd]'); }); test('stock_photos_forest_images: h1 "Forest Images"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Forest Images' || t.startsWith('Forest Images'))).toBeTruthy(); }); test('stock_photos_forest_images: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_forest_images: h2 "Discover more free forest imag"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free forest images' || t.startsWith('Discover more free forest images'))).toBeTruthy(); }); test('stock_photos_forest_images: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_forest_images: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_forest_images: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_forest_images: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_forest_images: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/forest-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_free_images', () => { test('stock_photos_free_images: title matches GT', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('top picks of free stock imagery'); }); test('stock_photos_free_images: h1 "Free image collections"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free image collections' || t.startsWith('Free image collections'))).toBeTruthy(); }); test('stock_photos_free_images: h2 "Discover more free stock image"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free stock images' || t.startsWith('Discover more free stock images'))).toBeTruthy(); }); test('stock_photos_free_images: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_free_images: h2 "Resources"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Resources' || t.startsWith('Resources'))).toBeTruthy(); }); test('stock_photos_free_images: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_free_images: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_free_images: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_free_images: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/free-images/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_gardening', () => { test('stock_photos_gardening: title matches GT', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('gardening photos [hd]'); }); test('stock_photos_gardening: h1 "Gardening Images"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Gardening Images' || t.startsWith('Gardening Images'))).toBeTruthy(); }); test('stock_photos_gardening: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_gardening: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_gardening: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_gardening: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_gardening: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_gardening: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_gardening: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/gardening/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_golf', () => { test('stock_photos_golf: title matches GT', async ({ page }) => { await page.goto('/stock-photos/golf/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('golf photos [hd]'); }); test('stock_photos_golf: h1 "Golf Images"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Golf Images' || t.startsWith('Golf Images'))).toBeTruthy(); }); test('stock_photos_golf: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_golf: h2 "Discover more free golf images"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free golf images' || t.startsWith('Discover more free golf images'))).toBeTruthy(); }); test('stock_photos_golf: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_golf: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_golf: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_golf: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_golf: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/golf/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_happy_holidays', () => { test('stock_photos_happy_holidays: title matches GT', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('festive season'); }); test('stock_photos_happy_holidays: h1 "Happy Holidays"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Happy Holidays' || t.startsWith('Happy Holidays'))).toBeTruthy(); }); test('stock_photos_happy_holidays: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_happy_holidays: h2 "Sign up"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sign up' || t.startsWith('Sign up'))).toBeTruthy(); }); test('stock_photos_happy_holidays: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_happy_holidays: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_happy_holidays: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_happy_holidays: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_happy_holidays: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/happy-holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_healthcare', () => { test('stock_photos_healthcare: title matches GT', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free healthcare photos [hd]'); }); test('stock_photos_healthcare: h1 "Healthcare Images"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Healthcare Images' || t.startsWith('Healthcare Images'))).toBeTruthy(); }); test('stock_photos_healthcare: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_healthcare: h2 "Discover more free healthcare "', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free healthcare images' || t.startsWith('Discover more free healthcare images'))).toBeTruthy(); }); test('stock_photos_healthcare: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_healthcare: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_healthcare: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_healthcare: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_healthcare: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/healthcare/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_history', () => { test('stock_photos_history: title matches GT', async ({ page }) => { await page.goto('/stock-photos/history/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('historic images [hd]'); }); test('stock_photos_history: h1 "History Photos"', async ({ page }) => { await page.goto('/stock-photos/history/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'History Photos' || t.startsWith('History Photos'))).toBeTruthy(); }); test('stock_photos_history: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_history: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_history: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/history/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_history: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_history: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_history: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_history: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/history/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_holidays', () => { test('stock_photos_holidays: title matches GT', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('festive holiday photos'); }); test('stock_photos_holidays: h1 "Holidays images"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Holidays images' || t.startsWith('Holidays images'))).toBeTruthy(); }); test('stock_photos_holidays: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_holidays: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_holidays: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_holidays: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_holidays: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_holidays: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_holidays: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/holidays/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_home', () => { test('stock_photos_home: title matches GT', async ({ page }) => { await page.goto('/stock-photos/home/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('interior design images'); }); test('stock_photos_home: h1 "Home and Living Room Images"', async ({ page }) => { await page.goto('/stock-photos/home/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Home and Living Room Images' || t.startsWith('Home and Living Room Images'))).toBeTruthy(); }); test('stock_photos_home: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_home: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_home: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/home/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_home: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/home/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_home_office', () => { test('stock_photos_home_office: title matches GT', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free home office photos [hd]'); }); test('stock_photos_home_office: h1 "Home Office Images"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Home Office Images' || t.startsWith('Home Office Images'))).toBeTruthy(); }); test('stock_photos_home_office: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_home_office: h2 "Discover more free home office"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free home office images' || t.startsWith('Discover more free home office images'))).toBeTruthy(); }); test('stock_photos_home_office: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_home_office: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home_office: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home_office: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_home_office: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/home-office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_ice_cream', () => { test('stock_photos_ice_cream: title matches GT', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd ice cream photos'); }); test('stock_photos_ice_cream: h1 "Ice Cream Images"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ice Cream Images' || t.startsWith('Ice Cream Images'))).toBeTruthy(); }); test('stock_photos_ice_cream: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_ice_cream: h2 "Match every scoop to your bran"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Match every scoop to your brand and let it tell your story' || t.startsWith('Match every scoop to your brand and let it tell your story'))).toBeTruthy(); }); test('stock_photos_ice_cream: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_ice_cream: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_ice_cream: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_ice_cream: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_ice_cream: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/ice-cream/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_india', () => { test('stock_photos_india: title matches GT', async ({ page }) => { await page.goto('/stock-photos/india/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('india stock photos'); }); test('stock_photos_india: h1 "India Photos"', async ({ page }) => { await page.goto('/stock-photos/india/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'India Photos' || t.startsWith('India Photos'))).toBeTruthy(); }); test('stock_photos_india: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/india/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_india: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/india/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_india: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/india/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_india: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/india/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_india: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/india/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_india: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/india/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_india: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/india/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_internet', () => { test('stock_photos_internet: title matches GT', async ({ page }) => { await page.goto('/stock-photos/internet/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('high'); }); test('stock_photos_internet: h1 "Internet Images"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Internet Images' || t.startsWith('Internet Images'))).toBeTruthy(); }); test('stock_photos_internet: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_internet: h2 "So, what visual representation"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'So, what visual representation of the internet do you need? For many creators, it is the' || t.startsWith('So, what visual representation of the internet do you need? For many creators, it is the'))).toBeTruthy(); }); test('stock_photos_internet: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_internet: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_internet: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_internet: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_internet: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/internet/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_jewelry', () => { test('stock_photos_jewelry: title matches GT', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('jewelry images'); }); test('stock_photos_jewelry: h1 "Jewelry photos"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Jewelry photos' || t.startsWith('Jewelry photos'))).toBeTruthy(); }); test('stock_photos_jewelry: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_jewelry: h2 "If you are selling handmade je"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'If you are selling handmade jewelry, here are tips to capture the best shots of your beautiful creat' || t.startsWith('If you are selling handmade jewelry, here are tips to capture the best shots of your beautiful creat'))).toBeTruthy(); }); test('stock_photos_jewelry: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_jewelry: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_jewelry: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_jewelry: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_jewelry: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/jewelry/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_kids', () => { test('stock_photos_kids: title matches GT', async ({ page }) => { await page.goto('/stock-photos/kids/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('kids photos [hd]'); }); test('stock_photos_kids: h1 "Kids Images"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Kids Images' || t.startsWith('Kids Images'))).toBeTruthy(); }); test('stock_photos_kids: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_kids: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_kids: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_kids: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_kids: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_kids: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_kids: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/kids/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_landscape', () => { test('stock_photos_landscape: title matches GT', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('landscape photos [hd]'); }); test('stock_photos_landscape: h1 "Landscape Pictures"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Landscape Pictures' || t.startsWith('Landscape Pictures'))).toBeTruthy(); }); test('stock_photos_landscape: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_landscape: h2 "Discover more free landscape p"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free landscape pictures' || t.startsWith('Discover more free landscape pictures'))).toBeTruthy(); }); test('stock_photos_landscape: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_landscape: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_landscape: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_landscape: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_landscape: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/landscape/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_leadership', () => { test('stock_photos_leadership: title matches GT', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('leadership photos [hd]'); }); test('stock_photos_leadership: h1 "Leadership Images"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Leadership Images' || t.startsWith('Leadership Images'))).toBeTruthy(); }); test('stock_photos_leadership: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_leadership: h2 "Discover more free leadership "', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free leadership images' || t.startsWith('Discover more free leadership images'))).toBeTruthy(); }); test('stock_photos_leadership: h2 "Subscribe"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Subscribe' || t.startsWith('Subscribe'))).toBeTruthy(); }); test('stock_photos_leadership: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_leadership: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_leadership: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_leadership: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/leadership/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_life', () => { test('stock_photos_life: title matches GT', async ({ page }) => { await page.goto('/stock-photos/life/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('life photos [hd]'); }); test('stock_photos_life: h1 "Life Photos"', async ({ page }) => { await page.goto('/stock-photos/life/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Life Photos' || t.startsWith('Life Photos'))).toBeTruthy(); }); test('stock_photos_life: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/life/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_life: h2 "Discover more free life photos"', async ({ page }) => { await page.goto('/stock-photos/life/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free life photos' || t.startsWith('Discover more free life photos'))).toBeTruthy(); }); test('stock_photos_life: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/life/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_life: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/life/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_life: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/life/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_life: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/life/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_life: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/life/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_light_background', () => { test('stock_photos_light_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('100+ light background photos [hd]'); }); test('stock_photos_light_background: h1 "Light Background Images"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Light Background Images' || t.startsWith('Light Background Images'))).toBeTruthy(); }); test('stock_photos_light_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_light_background: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_light_background: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_light_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_light_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_light_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_light_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/light-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_love', () => { test('stock_photos_love: title matches GT', async ({ page }) => { await page.goto('/stock-photos/love/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('1000+ love photos [hd]'); }); test('stock_photos_love: h1 "1000+ Love images: Download lo"', async ({ page }) => { await page.goto('/stock-photos/love/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '1000+ Love images: Download love pictures & photos' || t.startsWith('1000+ Love images: Download love pictures & photos'))).toBeTruthy(); }); test('stock_photos_love: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/love/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_love: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/love/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_love: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/love/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_love: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/love/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/love/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/love/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/love/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_love_background', () => { test('stock_photos_love_background: title matches GT', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('1000+ romantic background photos [hd]'); }); test('stock_photos_love_background: h1 "Love Background Images"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Love Background Images' || t.startsWith('Love Background Images'))).toBeTruthy(); }); test('stock_photos_love_background: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_love_background: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_love_background: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_love_background: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love_background: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love_background: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_love_background: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/love-background/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_makeup', () => { test('stock_photos_makeup: title matches GT', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('makeup photos'); }); test('stock_photos_makeup: h1 "Makeup Photos"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Makeup Photos' || t.startsWith('Makeup Photos'))).toBeTruthy(); }); test('stock_photos_makeup: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_makeup: h2 "Use these makeup shots to high"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Use these makeup shots to highlight project features' || t.startsWith('Use these makeup shots to highlight project features'))).toBeTruthy(); }); test('stock_photos_makeup: h2 "Your photo is downloading now…"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Your photo is downloading now…' || t.startsWith('Your photo is downloading now…'))).toBeTruthy(); }); test('stock_photos_makeup: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_makeup: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_makeup: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_makeup: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/makeup/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_man', () => { test('stock_photos_man: title matches GT', async ({ page }) => { await page.goto('/stock-photos/man/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free stock photos of men'); }); test('stock_photos_man: h1 "Pictures of men"', async ({ page }) => { await page.goto('/stock-photos/man/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pictures of men' || t.startsWith('Pictures of men'))).toBeTruthy(); }); test('stock_photos_man: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/man/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_man: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/man/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_man: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/man/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_man: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/man/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_man: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/man/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_man: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/man/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_man: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/man/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_mens_fashion', () => { test('stock_photos_mens_fashion: title matches GT', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('men\'s fashion photography'); }); test('stock_photos_mens_fashion: h1 "Mens Fashion and Urban Streetw"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mens Fashion and Urban Streetwear Photos' || t.startsWith('Mens Fashion and Urban Streetwear Photos'))).toBeTruthy(); }); test('stock_photos_mens_fashion: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_mens_fashion: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_mens_fashion: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_mens_fashion: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mens_fashion: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mens_fashion: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mens_fashion: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/mens-fashion/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_mental_health', () => { test('stock_photos_mental_health: title matches GT', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mental wellness'); }); test('stock_photos_mental_health: h1 "Mental Health"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mental Health' || t.startsWith('Mental Health'))).toBeTruthy(); }); test('stock_photos_mental_health: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_mental_health: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_mental_health: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_mental_health: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mental_health: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mental_health: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mental_health: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/mental-health/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_mobile_backgrounds', () => { test('stock_photos_mobile_backgrounds: title matches GT', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('mobile wallpapers'); }); test('stock_photos_mobile_backgrounds: h1 "Mobile Backgrounds: Stock Phot"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Mobile Backgrounds: Stock Photos | HD & Royalty-Free' || t.startsWith('Mobile Backgrounds: Stock Photos | HD & Royalty-Free'))).toBeTruthy(); }); test('stock_photos_mobile_backgrounds: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_mobile_backgrounds: h2 "Fresh, free visuals are added "', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Fresh, free visuals are added every day.' || t.startsWith('Fresh, free visuals are added every day.'))).toBeTruthy(); }); test('stock_photos_mobile_backgrounds: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_mobile_backgrounds: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mobile_backgrounds: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mobile_backgrounds: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_mobile_backgrounds: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/mobile-backgrounds/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_money', () => { test('stock_photos_money: title matches GT', async ({ page }) => { await page.goto('/stock-photos/money/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('currency photos'); }); test('stock_photos_money: h1 "Money images"', async ({ page }) => { await page.goto('/stock-photos/money/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Money images' || t.startsWith('Money images'))).toBeTruthy(); }); test('stock_photos_money: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/money/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_money: h2 "Currency in Fiscal Content"', async ({ page }) => { await page.goto('/stock-photos/money/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Currency in Fiscal Content' || t.startsWith('Currency in Fiscal Content'))).toBeTruthy(); }); test('stock_photos_money: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/money/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_money: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/money/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_money: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/money/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_money: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/money/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_money: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/money/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_moon', () => { test('stock_photos_moon: title matches GT', async ({ page }) => { await page.goto('/stock-photos/moon/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('lunar imagery (hd)'); }); test('stock_photos_moon: h1 "Moon Pictures"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Moon Pictures' || t.startsWith('Moon Pictures'))).toBeTruthy(); }); test('stock_photos_moon: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_moon: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_moon: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_moon: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_moon: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_moon: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_moon: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/moon/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_nature', () => { test('stock_photos_nature: title matches GT', async ({ page }) => { await page.goto('/stock-photos/nature/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free nature photos [hd]'); }); test('stock_photos_nature: h1 "Nature Images"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Nature Images' || t.startsWith('Nature Images'))).toBeTruthy(); }); test('stock_photos_nature: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_nature: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_nature: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_nature: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_nature: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_nature: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_nature: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/nature/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_office', () => { test('stock_photos_office: title matches GT', async ({ page }) => { await page.goto('/stock-photos/office/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('office stock photos'); }); test('stock_photos_office: h1 "Office pictures"', async ({ page }) => { await page.goto('/stock-photos/office/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Office pictures' || t.startsWith('Office pictures'))).toBeTruthy(); }); test('stock_photos_office: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_office: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_office: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/office/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_office: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_office: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_office: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_office: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/office/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_outdoor', () => { test('stock_photos_outdoor: title matches GT', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('outdoor stock photos'); }); test('stock_photos_outdoor: h1 "Outdoor photos"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Outdoor photos' || t.startsWith('Outdoor photos'))).toBeTruthy(); }); test('stock_photos_outdoor: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_outdoor: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_outdoor: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_outdoor: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_outdoor: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_outdoor: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_outdoor: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/outdoor/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_pants', () => { test('stock_photos_pants: title matches GT', async ({ page }) => { await page.goto('/stock-photos/pants/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free pants photos [hd]'); }); test('stock_photos_pants: h1 "Pants Pictures"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Pants Pictures' || t.startsWith('Pants Pictures'))).toBeTruthy(); }); test('stock_photos_pants: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_pants: h2 "Do you need athletic trousers "', async ({ page }) => { await page.goto('/stock-photos/pants/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Do you need athletic trousers or a chic, urban aesthetic? This choice determines if you should begin' || t.startsWith('Do you need athletic trousers or a chic, urban aesthetic? This choice determines if you should begin'))).toBeTruthy(); }); test('stock_photos_pants: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_pants: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_pants: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_pants: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_pants: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/pants/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_people', () => { test('stock_photos_people: title matches GT', async ({ page }) => { await page.goto('/stock-photos/people/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('human subjects'); }); test('stock_photos_people: h1 "People pictures"', async ({ page }) => { await page.goto('/stock-photos/people/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'People pictures' || t.startsWith('People pictures'))).toBeTruthy(); }); test('stock_photos_people: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/people/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_people: h2 "Send"', async ({ page }) => { await page.goto('/stock-photos/people/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Send' || t.startsWith('Send'))).toBeTruthy(); }); test('stock_photos_people: h2 "More resources"', async ({ page }) => { await page.goto('/stock-photos/people/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'More resources' || t.startsWith('More resources'))).toBeTruthy(); }); test('stock_photos_people: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/people/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_people: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/people/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_people: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/people/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_people: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/people/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos', () => { test('stock_photos_photos: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('20,000+ free hd photos & high'); }); test('stock_photos_photos: h1 "Free HD photos"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Free HD photos' || t.startsWith('Free HD photos'))).toBeTruthy(); }); test('stock_photos_photos: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos: h2 "Discover more free stock photo"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Discover more free stock photos' || t.startsWith('Discover more free stock photos'))).toBeTruthy(); }); test('stock_photos_photos: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_photos: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_sun', () => { test('stock_photos_sun: title matches GT', async ({ page }) => { await page.goto('/stock-photos/sun/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('sun photos [hd]'); }); test('stock_photos_sun: h1 "Sun Images"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Sun Images' || t.startsWith('Sun Images'))).toBeTruthy(); }); test('stock_photos_sun: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_sun: h2 "Radiant, free HD sun photograp"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Radiant, free HD sun photography for every project' || t.startsWith('Radiant, free HD sun photography for every project'))).toBeTruthy(); }); test('stock_photos_sun: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_sun: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sun: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sun: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_sun: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/sun/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_bath_bombs_online', () => { test('stock_photos_business_ideas_sell_bath_bombs_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your bath bomb brand'); }); test('stock_photos_business_ideas_sell_bath_bombs_online: h1 "Get the image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the image bundle' || t.startsWith('Get the image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: h2 "In 2017, major retailer Blissm"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'In 2017, major retailer Blissmere shared that sales hit 21 million units, jumping 71% from 2015 leve' || t.startsWith('In 2017, major retailer Blissmere shared that sales hit 21 million units, jumping 71% from 2015 leve'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: h2 "To craft your first batch of b"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'To craft your first batch of bath bombs for sale, gather these ingredients:' || t.startsWith('To craft your first batch of bath bombs for sale, gather these ingredients:'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: h2 "Begin building your business b"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Begin building your business by following these four key steps:' || t.startsWith('Begin building your business by following these four key steps:'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_bath_bombs_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-bath-bombs-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_candles_online', () => { test('stock_photos_business_ideas_sell_candles_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your handmade candle business onl'); }); test('stock_photos_business_ideas_sell_candles_online: h1 "Get image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get image bundle' || t.startsWith('Get image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: h2 "The global candle market was w"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The global candle market was worth \$1.7bn in 2021' || t.startsWith('The global candle market was worth \$1.7bn in 2021'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: h2 "Gather your candle-making supp"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Gather your candle-making supplies' || t.startsWith('Gather your candle-making supplies'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: h2 "Consider these four steps befo"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Consider these four steps before you begin selling candles online:' || t.startsWith('Consider these four steps before you begin selling candles online:'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_candles_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-candles-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_coffee_online', () => { test('stock_photos_business_ideas_sell_coffee_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your online coffee shop'); }); test('stock_photos_business_ideas_sell_coffee_online: h1 "Get the image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the image bundle' || t.startsWith('Get the image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: h2 "Locating a Reliable Coffee Ful"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Locating a Reliable Coffee Fulfillment Partner' || t.startsWith('Locating a Reliable Coffee Fulfillment Partner'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: h2 "A simple web search reveals ma"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'A simple web search reveals many capable partners for' || t.startsWith('A simple web search reveals many capable partners for'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: h2 "Advice from experienced founde"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Advice from experienced founders' || t.startsWith('Advice from experienced founders'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_coffee_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-coffee-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_enamel_pins_online', () => { test('stock_photos_business_ideas_sell_enamel_pins_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('designing and selling custom enamel pins'); }); test('stock_photos_business_ideas_sell_enamel_pins_online: h1 "Get the image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the image bundle' || t.startsWith('Get the image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: h2 "Design and produce your pins"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Design and produce your pins' || t.startsWith('Design and produce your pins'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: h2 "Guidance from a pin pro"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Guidance from a pin pro' || t.startsWith('Guidance from a pin pro'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: h2 "Choose ePackets"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Choose ePackets' || t.startsWith('Choose ePackets'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_enamel_pins_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-enamel-pins-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_jewelry_online', () => { test('stock_photos_business_ideas_sell_jewelry_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your online jewelry store'); }); test('stock_photos_business_ideas_sell_jewelry_online: h1 "Get the image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the image bundle' || t.startsWith('Get the image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: h2 "Create a jewelry brand from ze"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Create a jewelry brand from zero' || t.startsWith('Create a jewelry brand from zero'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: h2 "Influencer marketing on Photor"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Influencer marketing on Photora' || t.startsWith('Influencer marketing on Photora'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: h2 "Ship With ePackets"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ship With ePackets' || t.startsWith('Ship With ePackets'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_jewelry_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-jewelry-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_lip_balm_online', () => { test('stock_photos_business_ideas_sell_lip_balm_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('crafting lip balm for online sales'); }); test('stock_photos_business_ideas_sell_lip_balm_online: h1 "Get the image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the image bundle' || t.startsWith('Get the image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: h2 "Producing bulk lip balm batche"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Producing bulk lip balm batches' || t.startsWith('Producing bulk lip balm batches'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: h2 "Dropshipping Advice"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dropshipping Advice' || t.startsWith('Dropshipping Advice'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: h2 "Use ePacket Shipping"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Use ePacket Shipping' || t.startsWith('Use ePacket Shipping'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_lip_balm_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-lip-balm-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_t_shirts_online', () => { test('stock_photos_business_ideas_sell_t_shirts_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your custom tee brand'); }); test('stock_photos_business_ideas_sell_t_shirts_online: h1 "Get the photo bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the photo bundle' || t.startsWith('Get the photo bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: h2 "The custom apparel market has "', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The custom apparel market has grown by roughly 9% to about \$3.7 billion today' || t.startsWith('The custom apparel market has grown by roughly 9% to about \$3.7 billion today'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: h2 "Choose your print-on-demand pa"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Choose your print-on-demand partner' || t.startsWith('Choose your print-on-demand partner'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: h2 "Dropshipping advice"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dropshipping advice' || t.startsWith('Dropshipping advice'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_t_shirts_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-t-shirts-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_tea_online', () => { test('stock_photos_business_ideas_sell_tea_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch your own online tea shop'); }); test('stock_photos_business_ideas_sell_tea_online: h1 "Get image bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get image bundle' || t.startsWith('Get image bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: h2 "80% of all U.S. households enj"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === '80% of all U.S. households enjoy tea, with the market projected to expand annually by 5.74% between' || t.startsWith('80% of all U.S. households enjoy tea, with the market projected to expand annually by 5.74% between'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: h2 "Source and price your tea"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Source and price your tea' || t.startsWith('Source and price your tea'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: h2 "Become a tea expert"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Become a tea expert' || t.startsWith('Become a tea expert'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_tea_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-tea-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_business_ideas_sell_yoga_products_online', () => { test('stock_photos_business_ideas_sell_yoga_products_online: title matches GT', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('launch a yoga brand'); }); test('stock_photos_business_ideas_sell_yoga_products_online: h1 "Get the photo bundle"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Get the photo bundle' || t.startsWith('Get the photo bundle'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: h2 "The yoga market has been on th"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'The yoga market has been on the rise since 2012' || t.startsWith('The yoga market has been on the rise since 2012'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: h2 "Finding your audience"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Finding your audience' || t.startsWith('Finding your audience'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: h2 "Use ePackets"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Use ePackets' || t.startsWith('Use ePackets'))).toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_business_ideas_sell_yoga_products_online: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/business-ideas/sell-yoga-products-online/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_a_christmas_package_being_wrapped', () => { test('stock_photos_photos_a_christmas_package_being_wrapped: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('download free hd photos of a wrapped chr'); }); test('stock_photos_photos_a_christmas_package_being_wrapped: h1 "Image size"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image size' || t.startsWith('Image size'))).toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: h2 "Ideal for print and large disp"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and large displays' || t.startsWith('Ideal for print and large displays'))).toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_a_christmas_package_being_wrapped: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/a-christmas-package-being-wrapped/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees', () => { test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos of azure seas and white c'); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: h1 "Resolution"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Resolution' || t.startsWith('Resolution'))).toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: h2 "Ideal for print and web use"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and web use' || t.startsWith('Ideal for print and web use'))).toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_blue_water_and_white_cliffs_surrounded_by_trees: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/blue-water-and-white-cliffs-surrounded-by-trees/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos'); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: h1 "Image size"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image size' || t.startsWith('Image size'))).toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: h2 "Ideal for print and web use"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and web use' || t.startsWith('Ideal for print and web use'))).toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_hand_holds_the_bottom_corner_of_a_large_coffee_table_book: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/hand-holds-the-bottom-corner-of-a-large-coffee-table-book/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks', () => { test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photos of green rolling hills an'); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: h1 "Image Dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image Dimensions' || t.startsWith('Image Dimensions'))).toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: h2 "Ideal for high-quality print a"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for high-quality print and large displays' || t.startsWith('Ideal for high-quality print and large displays'))).toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_landscape_of_green_rolling_hills_and_mountain_peaks: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/landscape-of-green-rolling-hills-and-mountain-peaks/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_making_a_budget_tracking_finances', () => { test('stock_photos_photos_making_a_budget_tracking_finances: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free budget tracking photo'); }); test('stock_photos_photos_making_a_budget_tracking_finances: h1 "Image dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image dimensions' || t.startsWith('Image dimensions'))).toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: h2 "Ideal for digital and print me"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for digital and print media' || t.startsWith('Ideal for digital and print media'))).toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_making_a_budget_tracking_finances: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/making-a-budget-tracking-finances/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_man_takes_time_to_ponder', () => { test('stock_photos_photos_man_takes_time_to_ponder: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('contemplative man stock photos'); }); test('stock_photos_photos_man_takes_time_to_ponder: h1 "Image Size"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image Size' || t.startsWith('Image Size'))).toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: h2 "Perfect for high-quality print"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Perfect for high-quality prints' || t.startsWith('Perfect for high-quality prints'))).toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_man_takes_time_to_ponder: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/man-takes-time-to-ponder/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_painter_working_in_studio', () => { test('stock_photos_photos_painter_working_in_studio: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('painter at work in studio'); }); test('stock_photos_photos_painter_working_in_studio: h1 "Image dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image dimensions' || t.startsWith('Image dimensions'))).toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: h2 "Ideal for print and large scre"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and large screens' || t.startsWith('Ideal for print and large screens'))).toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_painter_working_in_studio: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/painter-working-in-studio/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - 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: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('free hd photo'); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: h1 "Image size"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image size' || t.startsWith('Image size'))).toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: h2 "Ideal for print and web use"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and web use' || t.startsWith('Ideal for print and web use'))).toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: h2 "Join"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Join' || t.startsWith('Join'))).toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_person_holds_a_book_over_a_stack_and_turns_the_page: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/person-holds-a-book-over-a-stack-and-turns-the-page/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel', () => { test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: title matches GT', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const t = (await page.title()).toLowerCase(); expect(t).toContain('explore free hd photos of cityscapes fea'); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: h1 "Image dimensions"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Image dimensions' || t.startsWith('Image dimensions'))).toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: h2 "Ideal for print and high-def"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Ideal for print and high-def' || t.startsWith('Ideal for print and high-def'))).toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: h2 "See all business concepts"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'See all business concepts' || t.startsWith('See all business concepts'))).toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: h2 "Submit"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Submit' || t.startsWith('Submit'))).toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: nav link "Aperlio"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Aperlio' || t.startsWith('Aperlio')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('stock-photos')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: nav link "Animals"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Animals' || t.startsWith('Animals')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('animal')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: nav link "Cats"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Cats' || t.startsWith('Cats')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('cat')), 'href fragment present').toBeTruthy(); }); test('stock_photos_photos_photo_of_a_cityscape_with_a_ferris_wheel: nav link "Dogs"', async ({ page }) => { await page.goto('/stock-photos/photos/photo-of-a-cityscape-with-a-ferris-wheel/'); const links = page.locator('nav a'); const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim()); expect(texts.some(t => t === 'Dogs' || t.startsWith('Dogs')), 'link text in nav').toBeTruthy(); const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase())); expect(hrefs.some(h => h.includes('dog')), 'href fragment present').toBeTruthy(); }); }); test.describe('Functional - Routing', () => { test('navigate to stock_photos via "Aperlio"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="stock-photos"]').first(); expect(await link.count(), 'nav link to stock_photos exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('stock-photos'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Free stock photos and royalty-free images'); }); test('navigate to stock_photos_animal via "Animals"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="animal"]').first(); expect(await link.count(), 'nav link to stock_photos_animal exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('animal'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Animal pictures'); }); test('navigate to stock_photos_cat via "Cats"', async ({ page }) => { await page.goto('/'); const link = page.locator('a[href*="cat"]').first(); expect(await link.count(), 'nav link to stock_photos_cat exists').toBeGreaterThan(0); await link.click(); await page.waitForTimeout(1200); expect(page.url().toLowerCase(), 'URL changed to destination').toContain('cat'); const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' '); expect(bodyText, 'destination distinctive content shown').toContain('Cat & kitten pictures'); }); });