RecreationBench / web /talvio.example /tests /static /structure.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 79)
ecdc786 verified
Raw History Blame Contribute Delete
211 kB
import { test, expect } from '@playwright/test';
test.describe('Structural - homepage', () => {
test('homepage: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('homepage: heading hierarchy is valid', async ({ page }) => {
await page.goto('/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('homepage: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - applicant_tracking_system', () => {
test('applicant_tracking_system: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/applicant-tracking-system/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('applicant_tracking_system: heading hierarchy is valid', async ({ page }) => {
await page.goto('/applicant-tracking-system/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('applicant_tracking_system: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/applicant-tracking-system/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - attract', () => {
test('attract: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/attract/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('attract: heading hierarchy is valid', async ({ page }) => {
await page.goto('/attract/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('attract: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/attract/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers', () => {
test('customers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - demo', () => {
test('demo: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/demo/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
});
test('demo: heading hierarchy is valid', async ({ page }) => {
await page.goto('/demo/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('demo: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/demo/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire', () => {
test('hire: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning', () => {
test('hire_learning: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_offers', () => {
test('hire_offers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire/offers/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_offers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire/offers/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_offers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire/offers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - integrations', () => {
test('integrations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/integrations/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('integrations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/integrations/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('integrations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/integrations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - onboard', () => {
test('onboard: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/onboard/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('onboard: heading hierarchy is valid', async ({ page }) => {
await page.goto('/onboard/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('onboard: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/onboard/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - partners', () => {
test('partners: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/partners/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('partners: heading hierarchy is valid', async ({ page }) => {
await page.goto('/partners/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('partners: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/partners/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - perform_features', () => {
test('perform_features: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/perform/features/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('perform_features: heading hierarchy is valid', async ({ page }) => {
await page.goto('/perform/features/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('perform_features: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/perform/features/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - perform_pricing', () => {
test('perform_pricing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/perform/pricing/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('perform_pricing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/perform/pricing/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('perform_pricing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/perform/pricing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - policies_terms', () => {
test('policies_terms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/policies/terms/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('policies_terms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/policies/terms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - pricing', () => {
test('pricing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/pricing/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('pricing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/pricing/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('pricing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/pricing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - pricing_old', () => {
test('pricing_old: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/pricing-old/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('pricing_old: heading hierarchy is valid', async ({ page }) => {
await page.goto('/pricing-old/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('pricing_old: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/pricing-old/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - qualify', () => {
test('qualify: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/qualify/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('qualify: heading hierarchy is valid', async ({ page }) => {
await page.goto('/qualify/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('qualify: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/qualify/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources', () => {
test('resources: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_courses', () => {
test('resources_courses: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/courses/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_courses: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/courses/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_courses: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/courses/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_guides', () => {
test('resources_guides: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/guides/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_guides: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/guides/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_guides: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/guides/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_hiring_reports', () => {
test('resources_hiring_reports: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/hiring-reports/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_hiring_reports: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/hiring-reports/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_hiring_reports: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/hiring-reports/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_hiring_reports_source_of_hire_report', () => {
test('resources_hiring_reports_source_of_hire_report: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/hiring-reports/source-of-hire-report/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_hiring_reports_source_of_hire_report: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/hiring-reports/source-of-hire-report/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_hiring_reports_source_of_hire_report: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/hiring-reports/source-of-hire-report/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_3_examples_of_termination_letters_done_right', () => {
test('blog_3_examples_of_termination_letters_done_right: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/3-examples-of-termination-letters-done-right/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_3_examples_of_termination_letters_done_right: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/3-examples-of-termination-letters-done-right/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_3_examples_of_termination_letters_done_right: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/3-examples-of-termination-letters-done-right/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_applicant_tracking_system_checklist_crucial_features_of_your_next_ats', () => {
test('blog_applicant_tracking_system_checklist_crucial_features_of_your_next_ats: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/applicant-tracking-system-checklist-crucial-features-of-your-next-ats/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_applicant_tracking_system_checklist_crucial_features_of_your_next_ats: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/applicant-tracking-system-checklist-crucial-features-of-your-next-ats/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_applicant_tracking_system_checklist_crucial_features_of_your_next_ats: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/applicant-tracking-system-checklist-crucial-features-of-your-next-ats/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_areas_of_improvement', () => {
test('blog_areas_of_improvement: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/areas-of-improvement/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_areas_of_improvement: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/areas-of-improvement/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_attract_and_retain_millennial_healthcare_workers', () => {
test('blog_attract_and_retain_millennial_healthcare_workers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/attract-and-retain-millennial-healthcare-workers/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_attract_and_retain_millennial_healthcare_workers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/attract-and-retain-millennial-healthcare-workers/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_attract_and_retain_millennial_healthcare_workers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/attract-and-retain-millennial-healthcare-workers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_blockchain_meets_recruitment', () => {
test('blog_blockchain_meets_recruitment: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/blockchain-meets-recruitment/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_blockchain_meets_recruitment: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/blockchain-meets-recruitment/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_blockchain_meets_recruitment: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/blockchain-meets-recruitment/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_talvio_accessible_site_redesign', () => {
test('blog_talvio_accessible_site_redesign: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/talvio-accessible-site-redesign/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_talvio_accessible_site_redesign: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/talvio-accessible-site-redesign/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_talvio_accessible_site_redesign: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/talvio-accessible-site-redesign/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_candidate_database', () => {
test('blog_candidate_database: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/candidate-database/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_candidate_database: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/candidate-database/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_candidate_database: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/candidate-database/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_candidate_fraud', () => {
test('blog_candidate_fraud: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/candidate-fraud/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_candidate_fraud: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/candidate-fraud/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_candidate_fraud: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/candidate-fraud/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_data_driven_assessment_structured_interviews', () => {
test('blog_data_driven_assessment_structured_interviews: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/data-driven-assessment-structured-interviews/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_data_driven_assessment_structured_interviews: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/data-driven-assessment-structured-interviews/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_data_driven_assessment_structured_interviews: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/data-driven-assessment-structured-interviews/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_dei_initiatives', () => {
test('blog_dei_initiatives: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/dei-initiatives/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_dei_initiatives: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/dei-initiatives/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_dei_initiatives: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/dei-initiatives/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_detect_ai_resume_cheating', () => {
test('blog_detect_ai_resume_cheating: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/detect-ai-resume-cheating/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_detect_ai_resume_cheating: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/detect-ai-resume-cheating/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_detect_ai_resume_cheating: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/detect-ai-resume-cheating/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_diversity_inclusion_quick_checklist', () => {
test('blog_diversity_inclusion_quick_checklist: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/diversity-inclusion-quick-checklist/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_diversity_inclusion_quick_checklist: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/diversity-inclusion-quick-checklist/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_diversity_inclusion_quick_checklist: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/diversity-inclusion-quick-checklist/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_do_interview_thank_you_emails_matter', () => {
test('blog_do_interview_thank_you_emails_matter: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/do-interview-thank-you-emails-matter/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_do_interview_thank_you_emails_matter: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/do-interview-thank-you-emails-matter/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_do_interview_thank_you_emails_matter: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/do-interview-thank-you-emails-matter/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_eeo_categories', () => {
test('blog_eeo_categories: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/eeo-categories/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_eeo_categories: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/eeo-categories/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_eeo_categories: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/eeo-categories/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employee_feedback_system', () => {
test('blog_employee_feedback_system: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employee-feedback-system/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employee_feedback_system: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/employee-feedback-system/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_employee_feedback_system: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employee-feedback-system/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employee_onboarding_that_works', () => {
test('blog_employee_onboarding_that_works: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employee-onboarding-that-works/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employee_onboarding_that_works: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employee-onboarding-that-works/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employee_recognition_ideas', () => {
test('blog_employee_recognition_ideas: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employee-recognition-ideas/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employee_recognition_ideas: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/employee-recognition-ideas/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_employee_recognition_ideas: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employee-recognition-ideas/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employee_referral_program', () => {
test('blog_employee_referral_program: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employee-referral-program/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employee_referral_program: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/employee-referral-program/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_employee_referral_program: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employee-referral-program/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employer_branding', () => {
test('blog_employer_branding: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employer-branding/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employer_branding: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/employer-branding/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_employer_branding: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employer-branding/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_employer_value_proposition', () => {
test('blog_employer_value_proposition: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/employer-value-proposition/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_employer_value_proposition: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/employer-value-proposition/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_employer_value_proposition: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/employer-value-proposition/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_free_job_posting_site', () => {
test('blog_free_job_posting_site: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/free-job-posting-site/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_free_job_posting_site: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/free-job-posting-site/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gen_z_in_the_workplace', () => {
test('blog_gen_z_in_the_workplace: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gen-z-in-the-workplace/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gen_z_in_the_workplace: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gen-z-in-the-workplace/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_gen_z_in_the_workplace: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gen-z-in-the-workplace/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_guide_to_your_best_interview_process', () => {
test('blog_guide_to_your_best_interview_process: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/guide-to-your-best-interview-process/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_guide_to_your_best_interview_process: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/guide-to-your-best-interview-process/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_guide_to_your_best_interview_process: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/guide-to-your-best-interview-process/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hire_content_manager', () => {
test('blog_hire_content_manager: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hire-content-manager/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hire_content_manager: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hire-content-manager/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hire_content_manager: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hire-content-manager/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hiring_an_seo_expert', () => {
test('blog_hiring_an_seo_expert: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hiring-an-seo-expert/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hiring_an_seo_expert: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hiring-an-seo-expert/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hiring_an_seo_expert: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hiring-an-seo-expert/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hiring_managers_guide_candidate_experience', () => {
test('blog_hiring_managers_guide_candidate_experience: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hiring-managers-guide-candidate-experience/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hiring_managers_guide_candidate_experience: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hiring-managers-guide-candidate-experience/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hiring_managers_guide_candidate_experience: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hiring-managers-guide-candidate-experience/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hiring_process_guide', () => {
test('blog_hiring_process_guide: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hiring-process-guide/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hiring_process_guide: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hiring-process-guide/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hiring_process_guide: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hiring-process-guide/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hiring_seasonal_employees', () => {
test('blog_hiring_seasonal_employees: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hiring-seasonal-employees/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hiring_seasonal_employees: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hiring-seasonal-employees/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hiring_seasonal_employees: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hiring-seasonal-employees/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_find_employees', () => {
test('blog_how_to_find_employees: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-find-employees/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_find_employees: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-find-employees/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_find_employees: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-find-employees/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_fire_someone', () => {
test('blog_how_to_fire_someone: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-fire-someone/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_fire_someone: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-fire-someone/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
});
test.describe('Structural - blog_how_to_give_feedback', () => {
test('blog_how_to_give_feedback: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-give-feedback/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_give_feedback: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-give-feedback/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_give_feedback: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-give-feedback/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_give_feedback_unsuccessful_candidates_will_appreciate_with_examples', () => {
test('blog_how_to_give_feedback_unsuccessful_candidates_will_appreciate_with_examples: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-give-feedback-unsuccessful-candidates-will-appreciate-with-examples/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_give_feedback_unsuccessful_candidates_will_appreciate_with_examples: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-give-feedback-unsuccessful-candidates-will-appreciate-with-examples/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_give_feedback_unsuccessful_candidates_will_appreciate_with_examples: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-give-feedback-unsuccessful-candidates-will-appreciate-with-examples/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_hire_fractional_executives', () => {
test('blog_how_to_hire_fractional_executives: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-hire-fractional-executives/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_hire_fractional_executives: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-hire-fractional-executives/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_hire_fractional_executives: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-hire-fractional-executives/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_identify_fake_candidates', () => {
test('blog_how_to_identify_fake_candidates: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-identify-fake-candidates/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_identify_fake_candidates: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-identify-fake-candidates/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_identify_fake_candidates: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-identify-fake-candidates/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_how_to_screen_candidates_with_ai', () => {
test('blog_how_to_screen_candidates_with_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/how-to-screen-candidates-with-ai/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_how_to_screen_candidates_with_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/how-to-screen-candidates-with-ai/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_how_to_screen_candidates_with_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/how-to-screen-candidates-with-ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hr_buzzwords', () => {
test('blog_hr_buzzwords: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hr-buzzwords/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hr_buzzwords: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hr-buzzwords/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hr_buzzwords: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hr-buzzwords/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hr_horror_stories_2023', () => {
test('blog_hr_horror_stories_2023: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hr-horror-stories-2023/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hr_horror_stories_2023: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hr-horror-stories-2023/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hr_horror_stories_2023: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hr-horror-stories-2023/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hr_horror_stories_2025', () => {
test('blog_hr_horror_stories_2025: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hr-horror-stories-2025/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hr_horror_stories_2025: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hr-horror-stories-2025/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_hr_horror_stories_2025: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hr-horror-stories-2025/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_indeed_vs_linkedin', () => {
test('blog_indeed_vs_linkedin: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/indeed-vs-linkedin/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_indeed_vs_linkedin: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/indeed-vs-linkedin/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_job_analysis', () => {
test('blog_job_analysis: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/job-analysis/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_job_analysis: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/job-analysis/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_job_analysis: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/job-analysis/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_job_requisition', () => {
test('blog_job_requisition: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/job-requisition/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_job_requisition: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/job-requisition/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_job_requisition: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/job-requisition/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_linkedin_job_posting', () => {
test('blog_linkedin_job_posting: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/linkedin-job-posting/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_linkedin_job_posting: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/linkedin-job-posting/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_mcdonalds_hiring_data_breach', () => {
test('blog_mcdonalds_hiring_data_breach: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/mcdonalds-hiring-data-breach/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_mcdonalds_hiring_data_breach: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/mcdonalds-hiring-data-breach/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_mcdonalds_hiring_data_breach: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/mcdonalds-hiring-data-breach/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_mid_year_review', () => {
test('blog_mid_year_review: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/mid-year-review/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_mid_year_review: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/mid-year-review/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_mid_year_review: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/mid-year-review/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_neuroinclusive_workplace', () => {
test('blog_neuroinclusive_workplace: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/neuroinclusive-workplace/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_neuroinclusive_workplace: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/neuroinclusive-workplace/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_neuroinclusive_workplace: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/neuroinclusive-workplace/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_niche_job_boards', () => {
test('blog_niche_job_boards: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/niche-job-boards/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_niche_job_boards: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/niche-job-boards/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_onboarding_best_practices', () => {
test('blog_onboarding_best_practices: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/onboarding-best-practices/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_onboarding_best_practices: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/onboarding-best-practices/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_onboarding_best_practices: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/onboarding-best-practices/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_organizational_communication', () => {
test('blog_organizational_communication: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/organizational-communication/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_organizational_communication: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/organizational-communication/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_organizational_communication: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/organizational-communication/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_performance_management_system', () => {
test('blog_performance_management_system: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/performance-management-system/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_performance_management_system: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/performance-management-system/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_performance_management_system: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/performance-management-system/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_post_a_job_on_google', () => {
test('blog_post_a_job_on_google: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/post-a-job-on-google/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_post_a_job_on_google: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/post-a-job-on-google/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_post_a_job_on_google: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/post-a-job-on-google/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_post_and_pray_vs_precision_hiring', () => {
test('blog_post_and_pray_vs_precision_hiring: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/post-and-pray-vs-precision-hiring/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_post_and_pray_vs_precision_hiring: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/post-and-pray-vs-precision-hiring/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_post_and_pray_vs_precision_hiring: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/post-and-pray-vs-precision-hiring/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_preboarding_checklist', () => {
test('blog_preboarding_checklist: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/preboarding-checklist/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_preboarding_checklist: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/preboarding-checklist/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_preboarding_checklist: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/preboarding-checklist/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_put_gdpr_compliance_on_auto_pilot_with_the_talvio_compliance_kit', () => {
test('blog_put_gdpr_compliance_on_auto_pilot_with_the_talvio_compliance_kit: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/put-gdpr-compliance-on-auto-pilot-with-the-talvio-compliance-kit/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_put_gdpr_compliance_on_auto_pilot_with_the_talvio_compliance_kit: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/put-gdpr-compliance-on-auto-pilot-with-the-talvio-compliance-kit/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_put_gdpr_compliance_on_auto_pilot_with_the_talvio_compliance_kit: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/put-gdpr-compliance-on-auto-pilot-with-the-talvio-compliance-kit/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_ready_to_use_employee_check_in_questions', () => {
test('blog_ready_to_use_employee_check_in_questions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/ready-to-use-employee-check-in-questions/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_ready_to_use_employee_check_in_questions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/ready-to-use-employee-check-in-questions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_ready_to_use_employee_check_in_questions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/ready-to-use-employee-check-in-questions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruiting_via_text_message_6_ways_sms_can_help_you_hire_better', () => {
test('blog_recruiting_via_text_message_6_ways_sms_can_help_you_hire_better: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruiting-via-text-message-6-ways-sms-can-help-you-hire-better/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruiting_via_text_message_6_ways_sms_can_help_you_hire_better: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruiting-via-text-message-6-ways-sms-can-help-you-hire-better/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruiting_via_text_message_6_ways_sms_can_help_you_hire_better: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruiting-via-text-message-6-ways-sms-can-help-you-hire-better/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruiting_with_linkedin', () => {
test('blog_recruiting_with_linkedin: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruiting-with-linkedin/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruiting_with_linkedin: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruiting-with-linkedin/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruiting_with_linkedin: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruiting-with-linkedin/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruitment_budget', () => {
test('blog_recruitment_budget: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruitment-budget/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruitment_budget: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruitment-budget/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruitment_budget: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruitment-budget/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruitment_compliance', () => {
test('blog_recruitment_compliance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruitment-compliance/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruitment_compliance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruitment-compliance/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruitment_compliance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruitment-compliance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruitment_funnel', () => {
test('blog_recruitment_funnel: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruitment-funnel/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruitment_funnel: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruitment-funnel/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruitment_funnel: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruitment-funnel/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_recruitment_plan', () => {
test('blog_recruitment_plan: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/recruitment-plan/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_recruitment_plan: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/recruitment-plan/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_recruitment_plan: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/recruitment-plan/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_remote_recruitment_a_to_z_guide', () => {
test('blog_remote_recruitment_a_to_z_guide: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/remote-recruitment-a-to-z-guide/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_remote_recruitment_a_to_z_guide: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/remote-recruitment-a-to-z-guide/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_remote_recruitment_a_to_z_guide: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/remote-recruitment-a-to-z-guide/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_should_you_use_ai_interviews', () => {
test('blog_should_you_use_ai_interviews: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/should-you-use-ai-interviews/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_should_you_use_ai_interviews: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/should-you-use-ai-interviews/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_stay_interview_questions', () => {
test('blog_stay_interview_questions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/stay-interview-questions/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_stay_interview_questions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/stay-interview-questions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_structured_interview_process', () => {
test('blog_structured_interview_process: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/structured-interview-process/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_structured_interview_process: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/structured-interview-process/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_structured_interview_process: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/structured-interview-process/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_talent_acquisition', () => {
test('blog_talent_acquisition: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/talent-acquisition/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_talent_acquisition: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/talent-acquisition/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_talent_acquisition: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/talent-acquisition/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_the_all_in_one_guide_to_your_best_interview_process_yet', () => {
test('blog_the_all_in_one_guide_to_your_best_interview_process_yet: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/the-all-in-one-guide-to-your-best-interview-process-yet/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_the_all_in_one_guide_to_your_best_interview_process_yet: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/the-all-in-one-guide-to-your-best-interview-process-yet/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_the_all_in_one_guide_to_your_best_interview_process_yet: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/the-all-in-one-guide-to-your-best-interview-process-yet/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_the_end_of_burnout_culture', () => {
test('blog_the_end_of_burnout_culture: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/the-end-of-burnout-culture/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_the_end_of_burnout_culture: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/the-end-of-burnout-culture/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_the_end_of_burnout_culture: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/the-end-of-burnout-culture/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_the_hiring_managers_complete_guide_to_creating_a_stellar_candidate_experience', () => {
test('blog_the_hiring_managers_complete_guide_to_creating_a_stellar_candidate_experience: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/the-hiring-managers-complete-guide-to-creating-a-stellar-candidate-experience/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_the_hiring_managers_complete_guide_to_creating_a_stellar_candidate_experience: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/the-hiring-managers-complete-guide-to-creating-a-stellar-candidate-experience/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_the_hiring_managers_complete_guide_to_creating_a_stellar_candidate_experience: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/the-hiring-managers-complete-guide-to-creating-a-stellar-candidate-experience/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_the_no_nonsense_guide_to_sourcing_talent', () => {
test('blog_the_no_nonsense_guide_to_sourcing_talent: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/the-no-nonsense-guide-to-sourcing-talent/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_the_no_nonsense_guide_to_sourcing_talent: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/the-no-nonsense-guide-to-sourcing-talent/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_the_no_nonsense_guide_to_sourcing_talent: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/the-no-nonsense-guide-to-sourcing-talent/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_top_20_job_boards_diversity_hiring', () => {
test('blog_top_20_job_boards_diversity_hiring: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/top-20-job-boards-diversity-hiring/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_top_20_job_boards_diversity_hiring: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/top-20-job-boards-diversity-hiring/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_top_20_job_boards_diversity_hiring: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/top-20-job-boards-diversity-hiring/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_toxic_work_environment', () => {
test('blog_toxic_work_environment: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/toxic-work-environment/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_toxic_work_environment: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/toxic-work-environment/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_toxic_work_environment: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/toxic-work-environment/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_vacation_policy_for_small_businesses', () => {
test('blog_vacation_policy_for_small_businesses: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/vacation-policy-for-small-businesses/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_vacation_policy_for_small_businesses: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/vacation-policy-for-small-businesses/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_vacation_policy_for_small_businesses: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/vacation-policy-for-small-businesses/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_video_interviews_made_easy_by_talvio_hr', () => {
test('blog_video_interviews_made_easy_by_talvio_hr: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/video-interviews-made-easy-by-talvio-hr/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_video_interviews_made_easy_by_talvio_hr: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/video-interviews-made-easy-by-talvio-hr/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_video_interviews_made_easy_by_talvio_hr: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/video-interviews-made-easy-by-talvio-hr/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_what_candidates_want', () => {
test('blog_what_candidates_want: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/what-candidates-want/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_what_candidates_want: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/what-candidates-want/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_what_candidates_want: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/what-candidates-want/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_women_in_the_workplace', () => {
test('blog_women_in_the_workplace: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/women-in-the-workplace/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_women_in_the_workplace: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/women-in-the-workplace/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_women_in_the_workplace: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/women-in-the-workplace/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_working_moms_report', () => {
test('blog_working_moms_report: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/working-moms-report/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_working_moms_report: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/working-moms-report/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('blog_working_moms_report: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/working-moms-report/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_booster_box', () => {
test('customers_booster_box: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/booster-box/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_booster_box: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/booster-box/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_booster_box: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/booster-box/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_docebo', () => {
test('customers_docebo: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/docebo/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_docebo: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/docebo/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_docebo: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/docebo/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_dodge', () => {
test('customers_dodge: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/dodge/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_dodge: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/dodge/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_dodge: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/dodge/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_dollar_flight_club', () => {
test('customers_dollar_flight_club: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/dollar-flight-club/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_dollar_flight_club: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/dollar-flight-club/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_dollar_flight_club: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/dollar-flight-club/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_dp_logistics', () => {
test('customers_dp_logistics: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/dp-logistics/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_dp_logistics: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/dp-logistics/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_dp_logistics: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/dp-logistics/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_elevation_church', () => {
test('customers_elevation_church: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/elevation-church/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_elevation_church: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/elevation-church/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_elevation_church: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/elevation-church/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_hip_creative', () => {
test('customers_hip_creative: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/hip-creative/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_hip_creative: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/hip-creative/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_hip_creative: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/hip-creative/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_kci_wireless', () => {
test('customers_kci_wireless: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/kci-wireless/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_kci_wireless: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/kci-wireless/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_kci_wireless: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/kci-wireless/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_knock', () => {
test('customers_knock: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/knock/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_knock: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/knock/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_knock: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/knock/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_mavha', () => {
test('customers_mavha: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/mavha/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_mavha: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/mavha/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_mavha: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/mavha/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_nandos_peri_peri', () => {
test('customers_nandos_peri_peri: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/nandos-peri-peri/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_nandos_peri_peri: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/nandos-peri-peri/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_nandos_peri_peri: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/nandos-peri-peri/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_nucamp', () => {
test('customers_nucamp: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/nucamp/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_nucamp: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/nucamp/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_nucamp: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/nucamp/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_p3', () => {
test('customers_p3: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/p3/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_p3: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/p3/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_p3: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/p3/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - customers_piksel', () => {
test('customers_piksel: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/customers/piksel/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('customers_piksel: heading hierarchy is valid', async ({ page }) => {
await page.goto('/customers/piksel/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('customers_piksel: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/customers/piksel/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_talvio_updates', () => {
test('hire_learning_talvio_updates: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/talvio-updates/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_talvio_updates: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/talvio-updates/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_talvio_updates: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/talvio-updates/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_candidate_experience', () => {
test('hire_learning_candidate_experience: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/candidate-experience/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_candidate_experience: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/candidate-experience/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_candidate_experience: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/candidate-experience/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_company_culture', () => {
test('hire_learning_company_culture: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/company-culture/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_company_culture: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/company-culture/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_company_culture: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/company-culture/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_dei', () => {
test('hire_learning_dei: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/dei/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_dei: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/dei/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_dei: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/dei/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_destress', () => {
test('hire_learning_destress: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/destress/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_destress: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/destress/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_destress: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/destress/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_employer_brand', () => {
test('hire_learning_employer_brand: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/employer-brand/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_employer_brand: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/employer-brand/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_employer_brand: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/employer-brand/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_future_of_recruiting', () => {
test('hire_learning_future_of_recruiting: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/future-of-recruiting/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_future_of_recruiting: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/future-of-recruiting/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_future_of_recruiting: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/future-of-recruiting/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_hiring_decisions', () => {
test('hire_learning_hiring_decisions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/hiring-decisions/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_hiring_decisions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/hiring-decisions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_hiring_decisions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/hiring-decisions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_hiring_process', () => {
test('hire_learning_hiring_process: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/hiring-process/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_hiring_process: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/hiring-process/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_hiring_process: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/hiring-process/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_hr_regulations', () => {
test('hire_learning_hr_regulations: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/hr-regulations/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_hr_regulations: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/hr-regulations/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_hr_regulations: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/hr-regulations/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_more_applicants', () => {
test('hire_learning_more_applicants: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/more-applicants/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_more_applicants: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/more-applicants/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_more_applicants: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/more-applicants/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_productive_interviewing', () => {
test('hire_learning_productive_interviewing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/productive-interviewing/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_productive_interviewing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/productive-interviewing/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_productive_interviewing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/productive-interviewing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_small_business', () => {
test('hire_learning_small_business: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/small-business/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_small_business: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/small-business/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_small_business: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/small-business/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - hire_learning_team_performance', () => {
test('hire_learning_team_performance: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/hire-learning/team-performance/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('hire_learning_team_performance: heading hierarchy is valid', async ({ page }) => {
await page.goto('/hire-learning/team-performance/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('hire_learning_team_performance: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/hire-learning/team-performance/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - qualify_diversity_inclusion', () => {
test('qualify_diversity_inclusion: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/qualify/diversity-inclusion/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('qualify_diversity_inclusion: heading hierarchy is valid', async ({ page }) => {
await page.goto('/qualify/diversity-inclusion/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('qualify_diversity_inclusion: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/qualify/diversity-inclusion/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_talvio_updates_sms_text_messaging', () => {
test('resources_talvio_updates_sms_text_messaging: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/talvio-updates/sms-text-messaging/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_talvio_updates_sms_text_messaging: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/talvio-updates/sms-text-messaging/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_talvio_updates_sms_text_messaging: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/talvio-updates/sms-text-messaging/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_ebooks_fake_job_applicants', () => {
test('resources_ebooks_fake_job_applicants: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/ebooks/fake-job-applicants/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
});
test('resources_ebooks_fake_job_applicants: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/ebooks/fake-job-applicants/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_ebooks_fake_job_applicants: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/ebooks/fake-job-applicants/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_hiring_reports_diversity_hiring_report', () => {
test('resources_hiring_reports_diversity_hiring_report: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/hiring-reports/diversity-hiring-report/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_hiring_reports_diversity_hiring_report: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/hiring-reports/diversity-hiring-report/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_hiring_reports_diversity_hiring_report: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/hiring-reports/diversity-hiring-report/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_hr_email_templates', () => {
test('resources_hr_email_templates: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/hr-email-templates/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_hr_email_templates: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/hr-email-templates/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_hr_email_templates: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/hr-email-templates/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_interview_questions', () => {
test('resources_interview_questions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/interview-questions/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_interview_questions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/interview-questions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_interview_questions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/interview-questions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_job_descriptions', () => {
test('resources_job_descriptions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/job-descriptions/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_job_descriptions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/job-descriptions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_job_descriptions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/job-descriptions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_onboarding_checklists', () => {
test('resources_onboarding_checklists: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/onboarding-checklists/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_onboarding_checklists: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/onboarding-checklists/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_onboarding_checklists: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/onboarding-checklists/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_recruiting_email_templates', () => {
test('resources_recruiting_email_templates: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/recruiting-email-templates/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_recruiting_email_templates: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/recruiting-email-templates/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_recruiting_email_templates: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/recruiting-email-templates/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_salary_profiles', () => {
test('resources_salary_profiles: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/salary-profiles/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_salary_profiles: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/salary-profiles/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_salary_profiles: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/salary-profiles/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - resources_topics', () => {
test('resources_topics: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/resources/topics/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('resources_topics: heading hierarchy is valid', async ({ page }) => {
await page.goto('/resources/topics/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('resources_topics: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/resources/topics/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - Consistency', () => {
test('header links are consistent across pages', async ({ page }) => {
const headerLinksByPage: string[][] = [];
{
await page.goto('/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/applicant-tracking-system/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/attract/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/customers/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
if (headerLinksByPage.length >= 2 && headerLinksByPage[0].length > 0) {
const first = new Set(headerLinksByPage[0]);
for (let i = 1; i < headerLinksByPage.length; i++) {
const current = new Set(headerLinksByPage[i]);
const overlap = [...first].filter(l => current.has(l));
if (first.size > 0) {
expect(overlap.length / first.size).toBeGreaterThanOrEqual(0.5);
}
}
}
});
});