RecreationBench / web /gradyn.example /tests /static /structure.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 38)
1c5f5f7 verified
Raw History Blame Contribute Delete
110 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('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
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 - about', () => {
test('about: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/about/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('about: heading hierarchy is valid', async ({ page }) => {
await page.goto('/about/');
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('about: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/about/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - careers', () => {
test('careers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/careers/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('careers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/careers/');
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('careers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/careers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - cla', () => {
test('cla: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/cla/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('cla: heading hierarchy is valid', async ({ page }) => {
await page.goto('/cla/');
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('cla: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/cla/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - contact', () => {
test('contact: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/contact/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('contact: heading hierarchy is valid', async ({ page }) => {
await page.goto('/contact/');
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('contact: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/contact/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - press', () => {
test('press: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/press/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('press: heading hierarchy is valid', async ({ page }) => {
await page.goto('/press/');
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('press: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/press/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - privacy', () => {
test('privacy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/privacy/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('privacy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/privacy/');
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('privacy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/privacy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - project', () => {
test('project: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/project/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('project: heading hierarchy is valid', async ({ page }) => {
await page.goto('/project/');
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('project: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/project/');
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('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 - blog_adaptive_asha', () => {
test('blog_adaptive_asha: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/adaptive-asha/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_adaptive_asha: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/adaptive-asha/');
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_adaptive_asha: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/adaptive-asha/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_ai_chips_in_the_real_world_recap', () => {
test('blog_ai_chips_in_the_real_world_recap: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/ai-chips-in-the-real-world-recap/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_ai_chips_in_the_real_world_recap: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/ai-chips-in-the-real-world-recap/');
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_ai_chips_in_the_real_world_recap: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/ai-chips-in-the-real-world-recap/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_ai_in_the_2020s_must_get_greener_and_heres_how', () => {
test('blog_ai_in_the_2020s_must_get_greener_and_heres_how: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/ai-in-the-2020s-must-get-greener-and-heres-how/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_ai_in_the_2020s_must_get_greener_and_heres_how: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/ai-in-the-2020s-must-get-greener-and-heres-how/');
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_ai_in_the_2020s_must_get_greener_and_heres_how: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/ai-in-the-2020s-must-get-greener-and-heres-how/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_ai_leadership_and_the_positive_impacts_on_economy_privacy_environmental_health', () => {
test('blog_ai_leadership_and_the_positive_impacts_on_economy_privacy_environmental_health: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/ai-leadership-and-the-positive-impacts-on-economy-privacy-environmental-health/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_ai_leadership_and_the_positive_impacts_on_economy_privacy_environmental_health: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/ai-leadership-and-the-positive-impacts-on-economy-privacy-environmental-health/');
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_ai_leadership_and_the_positive_impacts_on_economy_privacy_environmental_health: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/ai-leadership-and-the-positive-impacts-on-economy-privacy-environmental-health/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_alex_ratner_programmatic_data_labeling_machine_learning_podcast', () => {
test('blog_alex_ratner_programmatic_data_labeling_machine_learning_podcast: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/alex-ratner-programmatic-data-labeling-machine-learning-podcast/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_alex_ratner_programmatic_data_labeling_machine_learning_podcast: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/alex-ratner-programmatic-data-labeling-machine-learning-podcast/');
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_alex_ratner_programmatic_data_labeling_machine_learning_podcast: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/alex-ratner-programmatic-data-labeling-machine-learning-podcast/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_announcing_the_gradyn_model_registry', () => {
test('blog_announcing_the_gradyn_model_registry: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/announcing-the-gradyn-model-registry/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_announcing_the_gradyn_model_registry: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/announcing-the-gradyn-model-registry/');
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_announcing_the_gradyn_model_registry: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/announcing-the-gradyn-model-registry/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_apis', () => {
test('blog_apis: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/apis/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_apis: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/apis/');
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_apis: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/apis/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_building_an_enterprise_deep_learning_platform', () => {
test('blog_building_an_enterprise_deep_learning_platform: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_building_an_enterprise_deep_learning_platform: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform/');
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_building_an_enterprise_deep_learning_platform: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/building-an-enterprise-deep-learning-platform/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_building_an_enterprise_deep_learning_platform_2', () => {
test('blog_building_an_enterprise_deep_learning_platform_2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform-2/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_building_an_enterprise_deep_learning_platform_2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform-2/');
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_building_an_enterprise_deep_learning_platform_2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/building-an-enterprise-deep-learning-platform-2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_building_an_enterprise_deep_learning_platform_3', () => {
test('blog_building_an_enterprise_deep_learning_platform_3: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform-3/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_building_an_enterprise_deep_learning_platform_3: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/building-an-enterprise-deep-learning-platform-3/');
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_building_an_enterprise_deep_learning_platform_3: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/building-an-enterprise-deep-learning-platform-3/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_cloud_v_onprem', () => {
test('blog_cloud_v_onprem: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/cloud-v-onprem/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_cloud_v_onprem: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/cloud-v-onprem/');
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_cloud_v_onprem: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/cloud-v-onprem/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_data_scientists_dont_care_about_kubernetes', () => {
test('blog_data_scientists_dont_care_about_kubernetes: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/data-scientists-dont-care-about-kubernetes/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_data_scientists_dont_care_about_kubernetes: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/data-scientists-dont-care-about-kubernetes/');
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_scientists_dont_care_about_kubernetes: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/data-scientists-dont-care-about-kubernetes/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_data_version_control_gradyn', () => {
test('blog_data_version_control_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/data-version-control-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_data_version_control_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/data-version-control-gradyn/');
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_version_control_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/data-version-control-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_dave_patterson_podcast_new', () => {
test('blog_dave_patterson_podcast_new: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/dave-patterson-podcast-new/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_dave_patterson_podcast_new: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/dave-patterson-podcast-new/');
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_dave_patterson_podcast_new: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/dave-patterson-podcast-new/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_deep_in_the_trenches_p1', () => {
test('blog_deep_in_the_trenches_p1: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/deep-in-the-trenches-p1/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_deep_in_the_trenches_p1: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/deep-in-the-trenches-p1/');
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_deep_in_the_trenches_p1: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/deep-in-the-trenches-p1/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_deep_learning_tools_grad_students', () => {
test('blog_deep_learning_tools_grad_students: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/deep-learning-tools-grad-students/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_deep_learning_tools_grad_students: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/deep-learning-tools-grad-students/');
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_deep_learning_tools_grad_students: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/deep-learning-tools-grad-students/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_ai_sagemaker_comparison', () => {
test('blog_gradyn_ai_sagemaker_comparison: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-ai-sagemaker-comparison/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_ai_sagemaker_comparison: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-ai-sagemaker-comparison/');
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_gradyn_ai_sagemaker_comparison: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-ai-sagemaker-comparison/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_algorithmia_integration', () => {
test('blog_gradyn_algorithmia_integration: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-algorithmia-integration/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_algorithmia_integration: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-algorithmia-integration/');
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_gradyn_algorithmia_integration: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-algorithmia-integration/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_and_spark', () => {
test('blog_gradyn_and_spark: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-and-spark/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_and_spark: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-and-spark/');
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_gradyn_and_spark: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-and-spark/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_community_sync', () => {
test('blog_gradyn_community_sync: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-community-sync/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_community_sync: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-community-sync/');
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_gradyn_community_sync: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-community-sync/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_kubeflow_comparison', () => {
test('blog_gradyn_kubeflow_comparison: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-kubeflow-comparison/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_kubeflow_comparison: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-kubeflow-comparison/');
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_gradyn_kubeflow_comparison: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-kubeflow-comparison/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gradyn_on_kubernetes', () => {
test('blog_gradyn_on_kubernetes: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gradyn-on-kubernetes/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gradyn_on_kubernetes: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gradyn-on-kubernetes/');
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_gradyn_on_kubernetes: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gradyn-on-kubernetes/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_distributed_deep_learning_that_actually_works', () => {
test('blog_distributed_deep_learning_that_actually_works: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/distributed-deep-learning-that-actually-works/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_distributed_deep_learning_that_actually_works: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/distributed-deep-learning-that-actually-works/');
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_distributed_deep_learning_that_actually_works: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/distributed-deep-learning-that-actually-works/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_epoch_based_metrics', () => {
test('blog_epoch_based_metrics: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/epoch-based-metrics/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_epoch_based_metrics: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/epoch-based-metrics/');
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_epoch_based_metrics: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/epoch-based-metrics/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_faster_nlp_with_deep_learning_distributed_training', () => {
test('blog_faster_nlp_with_deep_learning_distributed_training: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/faster-nlp-with-deep-learning-distributed-training/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_faster_nlp_with_deep_learning_distributed_training: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/faster-nlp-with-deep-learning-distributed-training/');
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_faster_nlp_with_deep_learning_distributed_training: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/faster-nlp-with-deep-learning-distributed-training/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_fine_tune_bert', () => {
test('blog_fine_tune_bert: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/fine-tune-bert/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_fine_tune_bert: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/fine-tune-bert/');
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_fine_tune_bert: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/fine-tune-bert/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_first_time_user_experience_gradyn', () => {
test('blog_first_time_user_experience_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/first-time-user-experience-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_first_time_user_experience_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/first-time-user-experience-gradyn/');
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_first_time_user_experience_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/first-time-user-experience-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_first_time_user_experience_gradyn_part_2', () => {
test('blog_first_time_user_experience_gradyn_part_2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/first-time-user-experience-gradyn-part-2/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_first_time_user_experience_gradyn_part_2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/first-time-user-experience-gradyn-part-2/');
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_first_time_user_experience_gradyn_part_2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/first-time-user-experience-gradyn-part-2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gpu_cluster_p1', () => {
test('blog_gpu_cluster_p1: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gpu-cluster-p1/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gpu_cluster_p1: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gpu-cluster-p1/');
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_gpu_cluster_p1: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gpu-cluster-p1/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_gpu_cluster_p2', () => {
test('blog_gpu_cluster_p2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/gpu-cluster-p2/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_gpu_cluster_p2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/gpu-cluster-p2/');
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_gpu_cluster_p2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/gpu-cluster-p2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hpsearch_fasterrcnn_coco_pytorch', () => {
test('blog_hpsearch_fasterrcnn_coco_pytorch: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hpsearch-fasterrcnn-coco-pytorch/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hpsearch_fasterrcnn_coco_pytorch: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hpsearch-fasterrcnn-coco-pytorch/');
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_hpsearch_fasterrcnn_coco_pytorch: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hpsearch-fasterrcnn-coco-pytorch/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_hyperparameter_visualizations_gradyn', () => {
test('blog_hyperparameter_visualizations_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/hyperparameter-visualizations-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_hyperparameter_visualizations_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/hyperparameter-visualizations-gradyn/');
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_hyperparameter_visualizations_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/hyperparameter-visualizations-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_intro_to_core_api', () => {
test('blog_intro_to_core_api: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/intro-to-core-api/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_intro_to_core_api: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/intro-to-core-api/');
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_intro_to_core_api: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/intro-to-core-api/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_intro_to_core_api_pt2', () => {
test('blog_intro_to_core_api_pt2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/intro-to-core-api-pt2/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_intro_to_core_api_pt2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/intro-to-core-api-pt2/');
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_intro_to_core_api_pt2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/intro-to-core-api-pt2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_intro_to_gradyn', () => {
test('blog_intro_to_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/intro-to-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_intro_to_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/intro-to-gradyn/');
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_intro_to_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/intro-to-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_joe_hellerstein_data_wrangling_reproducibility_podcast', () => {
test('blog_joe_hellerstein_data_wrangling_reproducibility_podcast: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/joe-hellerstein-data-wrangling-reproducibility-podcast/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_joe_hellerstein_data_wrangling_reproducibility_podcast: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/joe-hellerstein-data-wrangling-reproducibility-podcast/');
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_joe_hellerstein_data_wrangling_reproducibility_podcast: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/joe-hellerstein-data-wrangling-reproducibility-podcast/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_llm_prompting', () => {
test('blog_llm_prompting: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/llm-prompting/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_llm_prompting: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/llm-prompting/');
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_llm_prompting: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/llm-prompting/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_maximize_juptyter_notebook_experience_gradyn', () => {
test('blog_maximize_juptyter_notebook_experience_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/maximize-juptyter-notebook-experience-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_maximize_juptyter_notebook_experience_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/maximize-juptyter-notebook-experience-gradyn/');
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_maximize_juptyter_notebook_experience_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/maximize-juptyter-notebook-experience-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_metaflow_gradyn_integration', () => {
test('blog_metaflow_gradyn_integration: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/metaflow-gradyn-integration/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_metaflow_gradyn_integration: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/metaflow-gradyn-integration/');
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_metaflow_gradyn_integration: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/metaflow-gradyn-integration/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_neil_conway_deep_learning_model_development_challenges_podcast', () => {
test('blog_neil_conway_deep_learning_model_development_challenges_podcast: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/neil-conway-deep-learning-model-development-challenges-podcast/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_neil_conway_deep_learning_model_development_challenges_podcast: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/neil-conway-deep-learning-model-development-challenges-podcast/');
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_neil_conway_deep_learning_model_development_challenges_podcast: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/neil-conway-deep-learning-model-development-challenges-podcast/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_neural_architecture_search', () => {
test('blog_neural_architecture_search: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/neural-architecture-search/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_neural_architecture_search: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/neural-architecture-search/');
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_neural_architecture_search: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/neural-architecture-search/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_object_detection_keras_gradyn', () => {
test('blog_object_detection_keras_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/object-detection-keras-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_object_detection_keras_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/object-detection-keras-gradyn/');
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_object_detection_keras_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/object-detection-keras-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_optimizing_horovod', () => {
test('blog_optimizing_horovod: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/optimizing-horovod/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_optimizing_horovod: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/optimizing-horovod/');
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_optimizing_horovod: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/optimizing-horovod/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_preemption', () => {
test('blog_preemption: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/preemption/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_preemption: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/preemption/');
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_preemption: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/preemption/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_product_feature_series_one_click_access_to_tensorboard', () => {
test('blog_product_feature_series_one_click_access_to_tensorboard: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/product-feature-series-one-click-access-to-tensorboard/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_product_feature_series_one_click_access_to_tensorboard: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/product-feature-series-one-click-access-to-tensorboard/');
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_product_feature_series_one_click_access_to_tensorboard: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/product-feature-series-one-click-access-to-tensorboard/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_production_training_pipelines_with_gradyn_and_kubeflow', () => {
test('blog_production_training_pipelines_with_gradyn_and_kubeflow: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/production-training-pipelines-with-gradyn-and-kubeflow/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_production_training_pipelines_with_gradyn_and_kubeflow: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/production-training-pipelines-with-gradyn-and-kubeflow/');
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_production_training_pipelines_with_gradyn_and_kubeflow: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/production-training-pipelines-with-gradyn-and-kubeflow/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_pytorch_trainer', () => {
test('blog_pytorch_trainer: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/pytorch-trainer/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_pytorch_trainer: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/pytorch-trainer/');
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_pytorch_trainer: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/pytorch-trainer/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_rag', () => {
test('blog_rag: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/rag/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_rag: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/rag/');
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_rag: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/rag/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_random_search_baseline_for_nas', () => {
test('blog_random_search_baseline_for_nas: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/random-search-baseline-for-nas/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_random_search_baseline_for_nas: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/random-search-baseline-for-nas/');
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_random_search_baseline_for_nas: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/random-search-baseline-for-nas/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_reproducibility_in_ml', () => {
test('blog_reproducibility_in_ml: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/reproducibility-in-ml/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_reproducibility_in_ml: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/reproducibility-in-ml/');
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_reproducibility_in_ml: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/reproducibility-in-ml/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_resource_pools', () => {
test('blog_resource_pools: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/resource-pools/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_resource_pools: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/resource-pools/');
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_resource_pools: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/resource-pools/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_sc23_recap', () => {
test('blog_sc23_recap: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/sc23-recap/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_sc23_recap: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/sc23-recap/');
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_sc23_recap: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/sc23-recap/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_scale_your_model_development_on_a_budget', () => {
test('blog_scale_your_model_development_on_a_budget: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/scale-your-model-development-on-a-budget/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_scale_your_model_development_on_a_budget: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/scale-your-model-development-on-a-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_scale_your_model_development_on_a_budget: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/scale-your-model-development-on-a-budget/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_slurm_lacking_deep_learning', () => {
test('blog_slurm_lacking_deep_learning: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/slurm-lacking-deep-learning/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_slurm_lacking_deep_learning: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/slurm-lacking-deep-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('blog_slurm_lacking_deep_learning: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/slurm-lacking-deep-learning/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_specialized_ai_chips_hold_both_promise_and_peril_for_developers', () => {
test('blog_specialized_ai_chips_hold_both_promise_and_peril_for_developers: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/specialized-ai-chips-hold-both-promise-and-peril-for-developers/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_specialized_ai_chips_hold_both_promise_and_peril_for_developers: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/specialized-ai-chips-hold-both-promise-and-peril-for-developers/');
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_specialized_ai_chips_hold_both_promise_and_peril_for_developers: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/specialized-ai-chips-hold-both-promise-and-peril-for-developers/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_speedy_model_training_rapids_gradyn', () => {
test('blog_speedy_model_training_rapids_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/speedy-model-training-rapids-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_speedy_model_training_rapids_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/speedy-model-training-rapids-gradyn/');
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_speedy_model_training_rapids_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/speedy-model-training-rapids-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_stable_diffusion_core_api', () => {
test('blog_stable_diffusion_core_api: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/stable-diffusion-core-api/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_stable_diffusion_core_api: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/stable-diffusion-core-api/');
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_stable_diffusion_core_api: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/stable-diffusion-core-api/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_standardized_models_with_gradyn', () => {
test('blog_standardized_models_with_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/standardized-models-with-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_standardized_models_with_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/standardized-models-with-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_stop_doing_iterative_model_development', () => {
test('blog_stop_doing_iterative_model_development: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/stop-doing-iterative-model-development/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_stop_doing_iterative_model_development: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/stop-doing-iterative-model-development/');
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_stop_doing_iterative_model_development: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/stop-doing-iterative-model-development/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_tensorflow_ai_service_partner', () => {
test('blog_tensorflow_ai_service_partner: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/tensorflow-ai-service-partner/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_tensorflow_ai_service_partner: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/tensorflow-ai-service-partner/');
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_tensorflow_ai_service_partner: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/tensorflow-ai-service-partner/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_tf_dataset_the_bad_parts', () => {
test('blog_tf_dataset_the_bad_parts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/tf-dataset-the-bad-parts/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_tf_dataset_the_bad_parts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/tf-dataset-the-bad-parts/');
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_tf_dataset_the_bad_parts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/tf-dataset-the-bad-parts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_the_squeeze_on_ai_talent_could_cripple_americas_most_important_companies', () => {
test('blog_the_squeeze_on_ai_talent_could_cripple_americas_most_important_companies: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/the-squeeze-on-ai-talent-could-cripple-americas-most-important-companies/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_the_squeeze_on_ai_talent_could_cripple_americas_most_important_companies: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/the-squeeze-on-ai-talent-could-cripple-americas-most-important-companies/');
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_squeeze_on_ai_talent_could_cripple_americas_most_important_companies: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/the-squeeze-on-ai-talent-could-cripple-americas-most-important-companies/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_tianqi_chen_model_deployment_specialized_hardware_podcast', () => {
test('blog_tianqi_chen_model_deployment_specialized_hardware_podcast: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/tianqi-chen-model-deployment-specialized-hardware-podcast/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_tianqi_chen_model_deployment_specialized_hardware_podcast: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/tianqi-chen-model-deployment-specialized-hardware-podcast/');
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_tianqi_chen_model_deployment_specialized_hardware_podcast: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/tianqi-chen-model-deployment-specialized-hardware-podcast/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_toward_the_jet_age_of_machine_learning', () => {
test('blog_toward_the_jet_age_of_machine_learning: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/toward-the-jet-age-of-machine-learning/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_toward_the_jet_age_of_machine_learning: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/toward-the-jet-age-of-machine-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('blog_toward_the_jet_age_of_machine_learning: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/toward-the-jet-age-of-machine-learning/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_transfer_learning_with_gradyn', () => {
test('blog_transfer_learning_with_gradyn: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/transfer-learning-with-gradyn/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_transfer_learning_with_gradyn: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/transfer-learning-with-gradyn/');
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_transfer_learning_with_gradyn: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/transfer-learning-with-gradyn/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_warm_starting_deep_learning', () => {
test('blog_warm_starting_deep_learning: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/warm-starting-deep-learning/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_warm_starting_deep_learning: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/warm-starting-deep-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('blog_warm_starting_deep_learning: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/warm-starting-deep-learning/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_weekly_update_2', () => {
test('blog_weekly_update_2: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/weekly-update-2/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_weekly_update_2: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/weekly-update-2/');
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_weekly_update_2: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/weekly-update-2/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_weekly_update_3', () => {
test('blog_weekly_update_3: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/weekly-update-3/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_weekly_update_3: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/weekly-update-3/');
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_weekly_update_3: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/weekly-update-3/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_weekly_update_4', () => {
test('blog_weekly_update_4: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/weekly-update-4/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_weekly_update_4: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/weekly-update-4/');
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_weekly_update_4: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/weekly-update-4/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_weekly_update_5', () => {
test('blog_weekly_update_5: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/weekly-update-5/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_weekly_update_5: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/weekly-update-5/');
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_weekly_update_5: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/weekly-update-5/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_what_andreessen_horowitz_got_wrong_about_ai', () => {
test('blog_what_andreessen_horowitz_got_wrong_about_ai: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/what-andreessen-horowitz-got-wrong-about-ai/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_what_andreessen_horowitz_got_wrong_about_ai: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/what-andreessen-horowitz-got-wrong-about-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_what_andreessen_horowitz_got_wrong_about_ai: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/what-andreessen-horowitz-got-wrong-about-ai/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - blog_why_does_no_one_use_advanced_hp_tuning', () => {
test('blog_why_does_no_one_use_advanced_hp_tuning: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/blog/why-does-no-one-use-advanced-hp-tuning/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('blog_why_does_no_one_use_advanced_hp_tuning: heading hierarchy is valid', async ({ page }) => {
await page.goto('/blog/why-does-no-one-use-advanced-hp-tuning/');
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_why_does_no_one_use_advanced_hp_tuning: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/blog/why-does-no-one-use-advanced-hp-tuning/');
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('/about/');
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('/careers/');
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('/cla/');
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);
}
}
}
});
});