Datasets:
Download web/relvyn.example/tests/static/structure.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 105 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/relvyn.example/tests/static/structure.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/relvyn.example/tests/static/structure.scripted.spec.ts
-
curl -L -o structure.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/relvyn.example/tests/static/structure.scripted.spec.ts
105 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: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('homepage: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - 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 - blog', () => { | |
| test('blog: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/'); | |
| 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: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/'); | |
| 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 - cloud', () => { | |
| test('cloud: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/cloud/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('cloud: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/cloud/'); | |
| 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('cloud: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/cloud/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - cloud_terms_and_conditions', () => { | |
| test('cloud_terms_and_conditions: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/cloud-terms-and-conditions/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('cloud_terms_and_conditions: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/cloud-terms-and-conditions/'); | |
| 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('cloud_terms_and_conditions: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/cloud-terms-and-conditions/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - pricing', () => { | |
| test('pricing: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('pricing: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/pricing/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('pricing: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/pricing/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - privacy_policy', () => { | |
| test('privacy_policy: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/privacy-policy/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('privacy_policy: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/privacy-policy/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| }); | |
| test.describe('Structural - terms_of_use', () => { | |
| test('terms_of_use: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/terms-of-use/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('terms_of_use: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/terms-of-use/'); | |
| 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('terms_of_use: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/terms-of-use/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - updates', () => { | |
| test('updates: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/updates/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('updates: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/updates/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('updates: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/updates/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_a_path_to_a_10x_database', () => { | |
| test('blog_a_path_to_a_10x_database: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/a-path-to-a-10x-database/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_a_path_to_a_10x_database: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/a-path-to-a-10x-database/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('blog_a_path_to_a_10x_database: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/a-path-to-a-10x-database/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_a_solution_to_the_sql_vs_orm_dilemma', () => { | |
| test('blog_a_solution_to_the_sql_vs_orm_dilemma: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/a-solution-to-the-sql-vs-orm-dilemma/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_a_solution_to_the_sql_vs_orm_dilemma: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/a-solution-to-the-sql-vs-orm-dilemma/'); | |
| 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_a_solution_to_the_sql_vs_orm_dilemma: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/a-solution-to-the-sql-vs-orm-dilemma/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_an_approach_to_optimizing_typescript_type_checking_performance', () => { | |
| test('blog_an_approach_to_optimizing_typescript_type_checking_performance: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/an-approach-to-optimizing-typescript-type-checking-performance/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_an_approach_to_optimizing_typescript_type_checking_performance: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/an-approach-to-optimizing-typescript-type-checking-performance/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('blog_an_approach_to_optimizing_typescript_type_checking_performance: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/an-approach-to-optimizing-typescript-type-checking-performance/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_announcing_relvyn_beta_2_luyten', () => { | |
| test('blog_announcing_relvyn_beta_2_luyten: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/announcing-relvyn-beta-2-luyten/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_announcing_relvyn_beta_2_luyten: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/announcing-relvyn-beta-2-luyten/'); | |
| 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_relvyn_beta_2_luyten: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/announcing-relvyn-beta-2-luyten/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_announcing_the_winners_of_our_hackathon', () => { | |
| test('blog_announcing_the_winners_of_our_hackathon: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/announcing-the-winners-of-our-hackathon/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_announcing_the_winners_of_our_hackathon: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/announcing-the-winners-of-our-hackathon/'); | |
| 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_winners_of_our_hackathon: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/announcing-the-winners-of-our-hackathon/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_bringing_net_to_relvyn', () => { | |
| test('blog_bringing_net_to_relvyn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/bringing-net-to-relvyn/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_bringing_net_to_relvyn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/bringing-net-to-relvyn/'); | |
| 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_bringing_net_to_relvyn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/bringing-net-to-relvyn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_building_a_production_database_in_ten_years_or_less', () => { | |
| test('blog_building_a_production_database_in_ten_years_or_less: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/building-a-production-database-in-ten-years-or-less/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_building_a_production_database_in_ten_years_or_less: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/building-a-production-database-in-ten-years-or-less/'); | |
| 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_a_production_database_in_ten_years_or_less: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/building-a-production-database-in-ten-years-or-less/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_building_with_effect_and_relvyn_part_1', () => { | |
| test('blog_building_with_effect_and_relvyn_part_1: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/building-with-effect-and-relvyn-part-1/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_building_with_effect_and_relvyn_part_1: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/building-with-effect-and-relvyn-part-1/'); | |
| 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_with_effect_and_relvyn_part_1: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/building-with-effect-and-relvyn-part-1/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_c_stdlib_isn_t_threadsafe_and_even_safe_rust_didn_t_save_us', () => { | |
| test('blog_c_stdlib_isn_t_threadsafe_and_even_safe_rust_didn_t_save_us: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/c-stdlib-isn-t-threadsafe-and-even-safe-rust-didn-t-save-us/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_c_stdlib_isn_t_threadsafe_and_even_safe_rust_didn_t_save_us: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/c-stdlib-isn-t-threadsafe-and-even-safe-rust-didn-t-save-us/'); | |
| 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_c_stdlib_isn_t_threadsafe_and_even_safe_rust_didn_t_save_us: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/c-stdlib-isn-t-threadsafe-and-even-safe-rust-didn-t-save-us/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_chit_chatting_with_relvyn_docs_via_chatgpt_and_pgvector', () => { | |
| test('blog_chit_chatting_with_relvyn_docs_via_chatgpt_and_pgvector: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/chit-chatting-with-relvyn-docs-via-chatgpt-and-pgvector/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_chit_chatting_with_relvyn_docs_via_chatgpt_and_pgvector: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/chit-chatting-with-relvyn-docs-via-chatgpt-and-pgvector/'); | |
| 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_chit_chatting_with_relvyn_docs_via_chatgpt_and_pgvector: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/chit-chatting-with-relvyn-docs-via-chatgpt-and-pgvector/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_designing_the_ultimate_typescript_query_builder', () => { | |
| test('blog_designing_the_ultimate_typescript_query_builder: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/designing-the-ultimate-typescript-query-builder/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_designing_the_ultimate_typescript_query_builder: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/designing-the-ultimate-typescript-query-builder/'); | |
| 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_designing_the_ultimate_typescript_query_builder: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/designing-the-ultimate-typescript-query-builder/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0', () => { | |
| test('blog_relvyn_1_0: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0/'); | |
| 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_relvyn_1_0: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_1', () => { | |
| test('blog_relvyn_1_0_alpha_1: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-1/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_1: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-1/'); | |
| 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_relvyn_1_0_alpha_1: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-1/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_2', () => { | |
| test('blog_relvyn_1_0_alpha_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-2/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_3_proxima_centauri', () => { | |
| test('blog_relvyn_1_0_alpha_3_proxima_centauri: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-3-proxima-centauri/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_3_proxima_centauri: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-3-proxima-centauri/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_4_barnard_s_star', () => { | |
| test('blog_relvyn_1_0_alpha_4_barnard_s_star: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-4-barnard-s-star/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_4_barnard_s_star: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-4-barnard-s-star/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_5_luhman', () => { | |
| test('blog_relvyn_1_0_alpha_5_luhman: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-5-luhman/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_5_luhman: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-5-luhman/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_alpha_6_wolf_359', () => { | |
| test('blog_relvyn_1_0_alpha_6_wolf_359: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-alpha-6-wolf-359/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_alpha_6_wolf_359: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-alpha-6-wolf-359/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_1_0_beta_1_sirius', () => { | |
| test('blog_relvyn_1_0_beta_1_sirius: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-1-0-beta-1-sirius/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_1_0_beta_1_sirius: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-1-0-beta-1-sirius/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_2_0', () => { | |
| test('blog_relvyn_2_0: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-2-0/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_2_0: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-2-0/'); | |
| 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_relvyn_2_0: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-2-0/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_3_0', () => { | |
| test('blog_relvyn_3_0: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-3-0/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_3_0: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-3-0/'); | |
| 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_relvyn_3_0: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-3-0/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_5_introducing_branches', () => { | |
| test('blog_relvyn_5_introducing_branches: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-branches/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_5_introducing_branches: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-branches/'); | |
| 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_relvyn_5_introducing_branches: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-5-introducing-branches/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_5_introducing_ext_ai', () => { | |
| test('blog_relvyn_5_introducing_ext_ai: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-ext-ai/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_5_introducing_ext_ai: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-ext-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_relvyn_5_introducing_ext_ai: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-5-introducing-ext-ai/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_5_introducing_passwordless_auth', () => { | |
| test('blog_relvyn_5_introducing_passwordless_auth: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-passwordless-auth/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_5_introducing_passwordless_auth: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-5-introducing-passwordless-auth/'); | |
| 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_relvyn_5_introducing_passwordless_auth: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-5-introducing-passwordless-auth/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_a_new_beginning', () => { | |
| test('blog_relvyn_a_new_beginning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-a-new-beginning/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_a_new_beginning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-a-new-beginning/'); | |
| 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_relvyn_a_new_beginning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-a-new-beginning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_and_nuxt_a_fullstack_app_at_your_fingertips', () => { | |
| test('blog_relvyn_and_nuxt_a_fullstack_app_at_your_fingertips: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-and-nuxt-a-fullstack-app-at-your-fingertips/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_and_nuxt_a_fullstack_app_at_your_fingertips: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-and-nuxt-a-fullstack-app-at-your-fingertips/'); | |
| 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_relvyn_and_nuxt_a_fullstack_app_at_your_fingertips: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-and-nuxt-a-fullstack-app-at-your-fingertips/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_and_rust_type_safe_kindred_spirits', () => { | |
| test('blog_relvyn_and_rust_type_safe_kindred_spirits: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-and-rust-type-safe-kindred-spirits/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_and_rust_type_safe_kindred_spirits: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-and-rust-type-safe-kindred-spirits/'); | |
| 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_relvyn_and_rust_type_safe_kindred_spirits: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-and-rust-type-safe-kindred-spirits/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_beta_3_ross', () => { | |
| test('blog_relvyn_beta_3_ross: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-beta-3-ross/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_beta_3_ross: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-beta-3-ross/'); | |
| 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_relvyn_beta_3_ross: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-beta-3-ross/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_cloud_and_relvyn_4_0', () => { | |
| test('blog_relvyn_cloud_and_relvyn_4_0: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-and-relvyn-4-0/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_cloud_and_relvyn_4_0: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-and-relvyn-4-0/'); | |
| 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_relvyn_cloud_and_relvyn_4_0: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-cloud-and-relvyn-4-0/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_cloud_eu_region_launches', () => { | |
| test('blog_relvyn_cloud_eu_region_launches: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-eu-region-launches/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_cloud_eu_region_launches: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-eu-region-launches/'); | |
| 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_relvyn_cloud_eu_region_launches: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-cloud-eu-region-launches/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_cloud_free_tier_how_we_stack_up_vs_planetscale_supabase_neon', () => { | |
| test('blog_relvyn_cloud_free_tier_how_we_stack_up_vs_planetscale_supabase_neon: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-free-tier-how-we-stack-up-vs-planetscale-supabase-neon/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_cloud_free_tier_how_we_stack_up_vs_planetscale_supabase_neon: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-cloud-free-tier-how-we-stack-up-vs-planetscale-supabase-neon/'); | |
| 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_relvyn_cloud_free_tier_how_we_stack_up_vs_planetscale_supabase_neon: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-cloud-free-tier-how-we-stack-up-vs-planetscale-supabase-neon/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_dart', () => { | |
| test('blog_relvyn_dart: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-dart/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_dart: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-dart/'); | |
| 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_relvyn_dart: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-dart/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_is_now_gel_and_postgres_is_the_future', () => { | |
| test('blog_relvyn_is_now_gel_and_postgres_is_the_future: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-is-now-gel-and-postgres-is-the-future/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_is_now_gel_and_postgres_is_the_future: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-is-now-gel-and-postgres-is-the-future/'); | |
| 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_relvyn_is_now_gel_and_postgres_is_the_future: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-is-now-gel-and-postgres-is-the-future/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_rc4_procyon', () => { | |
| test('blog_relvyn_rc4_procyon: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-rc4-procyon/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_rc4_procyon: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-rc4-procyon/'); | |
| 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_relvyn_rc4_procyon: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-rc4-procyon/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_release_candidate_1', () => { | |
| test('blog_relvyn_release_candidate_1: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-1/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_release_candidate_1: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-1/'); | |
| 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_relvyn_release_candidate_1: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-release-candidate-1/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_release_candidate_2', () => { | |
| test('blog_relvyn_release_candidate_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-2/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_release_candidate_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-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_relvyn_release_candidate_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-release-candidate-2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_release_candidate_3', () => { | |
| test('blog_relvyn_release_candidate_3: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-3/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_release_candidate_3: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-release-candidate-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_relvyn_release_candidate_3: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-release-candidate-3/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_relvyn_series_a', () => { | |
| test('blog_relvyn_series_a: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/relvyn-series-a/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_relvyn_series_a: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/relvyn-series-a/'); | |
| 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_relvyn_series_a: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/relvyn-series-a/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_gel_6_query_stats_and_in_place_upgrade', () => { | |
| test('blog_gel_6_query_stats_and_in_place_upgrade: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/gel-6-query-stats-and-in-place-upgrade/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_gel_6_query_stats_and_in_place_upgrade: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/gel-6-query-stats-and-in-place-upgrade/'); | |
| 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_gel_6_query_stats_and_in_place_upgrade: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/gel-6-query-stats-and-in-place-upgrade/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_gel_joins_vercel', () => { | |
| test('blog_gel_joins_vercel: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/gel-joins-vercel/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_gel_joins_vercel: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/gel-joins-vercel/'); | |
| 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_gel_joins_vercel: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/gel-joins-vercel/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_gel_s_new_edgeql_features_and_cli_workflows', () => { | |
| test('blog_gel_s_new_edgeql_features_and_cli_workflows: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/gel-s-new-edgeql-features-and-cli-workflows/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_gel_s_new_edgeql_features_and_cli_workflows: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/gel-s-new-edgeql-features-and-cli-workflows/'); | |
| 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_gel_s_new_edgeql_features_and_cli_workflows: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/gel-s-new-edgeql-features-and-cli-workflows/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_generative_ui_with_vercel_ai_sdk_and_relvyn', () => { | |
| test('blog_generative_ui_with_vercel_ai_sdk_and_relvyn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/generative-ui-with-vercel-ai-sdk-and-relvyn/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_generative_ui_with_vercel_ai_sdk_and_relvyn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/generative-ui-with-vercel-ai-sdk-and-relvyn/'); | |
| 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_generative_ui_with_vercel_ai_sdk_and_relvyn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/generative-ui-with-vercel-ai-sdk-and-relvyn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_hey_drizzle_please_help_we_want_to_speak_sql', () => { | |
| test('blog_hey_drizzle_please_help_we_want_to_speak_sql: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/hey-drizzle-please-help-we-want-to-speak-sql/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_hey_drizzle_please_help_we_want_to_speak_sql: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/hey-drizzle-please-help-we-want-to-speak-sql/'); | |
| 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_hey_drizzle_please_help_we_want_to_speak_sql: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/hey-drizzle-please-help-we-want-to-speak-sql/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_how_we_converted_our_node_js_library_to_deno_using_deno', () => { | |
| test('blog_how_we_converted_our_node_js_library_to_deno_using_deno: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/how-we-converted-our-node-js-library-to-deno-using-deno/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_how_we_converted_our_node_js_library_to_deno_using_deno: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/how-we-converted-our-node-js-library-to-deno-using-deno/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('blog_how_we_converted_our_node_js_library_to_deno_using_deno: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/how-we-converted-our-node-js-library-to-deno-using-deno/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_how_we_sharded_our_test_suite_for_10x_faster_runs_on_github_actions', () => { | |
| test('blog_how_we_sharded_our_test_suite_for_10x_faster_runs_on_github_actions: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/how-we-sharded-our-test-suite-for-10x-faster-runs-on-github-actions/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_how_we_sharded_our_test_suite_for_10x_faster_runs_on_github_actions: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/how-we-sharded-our-test-suite-for-10x-faster-runs-on-github-actions/'); | |
| const headingLevels = await page.evaluate(() => { | |
| const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); | |
| return Array.from(headings).map(h => parseInt(h.tagName.substring(1))); | |
| }); | |
| if (headingLevels.length > 1) { | |
| for (let i = 1; i < headingLevels.length; i++) { | |
| const jump = headingLevels[i] - headingLevels[i-1]; | |
| expect(jump).toBeLessThanOrEqual(2); | |
| } | |
| } | |
| }); | |
| test('blog_how_we_sharded_our_test_suite_for_10x_faster_runs_on_github_actions: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/how-we-sharded-our-test-suite-for-10x-faster-runs-on-github-actions/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_integrating_gel_with_drizzle_in_a_next_js_app', () => { | |
| test('blog_integrating_gel_with_drizzle_in_a_next_js_app: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/integrating-gel-with-drizzle-in-a-next-js-app/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_integrating_gel_with_drizzle_in_a_next_js_app: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/integrating-gel-with-drizzle-in-a-next-js-app/'); | |
| 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_integrating_gel_with_drizzle_in_a_next_js_app: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/integrating-gel-with-drizzle-in-a-next-js-app/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_introducing_relvyn_projects', () => { | |
| test('blog_introducing_relvyn_projects: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/introducing-relvyn-projects/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_introducing_relvyn_projects: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/introducing-relvyn-projects/'); | |
| 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_introducing_relvyn_projects: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/introducing-relvyn-projects/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_knowledge_graphs_part_1', () => { | |
| test('blog_knowledge_graphs_part_1: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/knowledge-graphs-part-1/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_knowledge_graphs_part_1: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/knowledge-graphs-part-1/'); | |
| 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_knowledge_graphs_part_1: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/knowledge-graphs-part-1/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_m_rows_s_from_postgres_to_python', () => { | |
| test('blog_m_rows_s_from_postgres_to_python: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/m-rows-s-from-postgres-to-python/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_m_rows_s_from_postgres_to_python: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/m-rows-s-from-postgres-to-python/'); | |
| 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_m_rows_s_from_postgres_to_python: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/m-rows-s-from-postgres-to-python/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_make_your_users_happy_by_keeping_it_ryl_in_documentation', () => { | |
| test('blog_make_your_users_happy_by_keeping_it_ryl_in_documentation: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/make-your-users-happy-by-keeping-it-ryl-in-documentation/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_make_your_users_happy_by_keeping_it_ryl_in_documentation: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/make-your-users-happy-by-keeping-it-ryl-in-documentation/'); | |
| 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_make_your_users_happy_by_keeping_it_ryl_in_documentation: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/make-your-users-happy-by-keeping-it-ryl-in-documentation/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_porting_the_world_s_best_natural_language_learning_technique_to_relvyn', () => { | |
| test('blog_porting_the_world_s_best_natural_language_learning_technique_to_relvyn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/porting-the-world-s-best-natural-language-learning-technique-to-relvyn/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_porting_the_world_s_best_natural_language_learning_technique_to_relvyn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/porting-the-world-s-best-natural-language-learning-technique-to-relvyn/'); | |
| 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_porting_the_world_s_best_natural_language_learning_technique_to_relvyn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/porting-the-world-s-best-natural-language-learning-technique-to-relvyn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_postgis_webhooks_networking_and_new_ai_models', () => { | |
| test('blog_postgis_webhooks_networking_and_new_ai_models: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/postgis-webhooks-networking-and-new-ai-models/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_postgis_webhooks_networking_and_new_ai_models: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/postgis-webhooks-networking-and-new-ai-models/'); | |
| 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_postgis_webhooks_networking_and_new_ai_models: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/postgis-webhooks-networking-and-new-ai-models/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_powering_webble_s_growth_how_relvyn_became_the_cornerstone_of_their_tech_stack', () => { | |
| test('blog_powering_webble_s_growth_how_relvyn_became_the_cornerstone_of_their_tech_stack: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/powering-webble-s-growth-how-relvyn-became-the-cornerstone-of-their-tech-stack/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_powering_webble_s_growth_how_relvyn_became_the_cornerstone_of_their_tech_stack: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/powering-webble-s-growth-how-relvyn-became-the-cornerstone-of-their-tech-stack/'); | |
| 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_powering_webble_s_growth_how_relvyn_became_the_cornerstone_of_their_tech_stack: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/powering-webble-s-growth-how-relvyn-became-the-cornerstone-of-their-tech-stack/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_python_rust_chumsky_tree_sitter_and_relvyn_walk_into_a_bar', () => { | |
| test('blog_python_rust_chumsky_tree_sitter_and_relvyn_walk_into_a_bar: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/python-rust-chumsky-tree-sitter-and-relvyn-walk-into-a-bar/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_python_rust_chumsky_tree_sitter_and_relvyn_walk_into_a_bar: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/python-rust-chumsky-tree-sitter-and-relvyn-walk-into-a-bar/'); | |
| 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_python_rust_chumsky_tree_sitter_and_relvyn_walk_into_a_bar: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/python-rust-chumsky-tree-sitter-and-relvyn-walk-into-a-bar/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_rescript_and_relvyn', () => { | |
| test('blog_rescript_and_relvyn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/rescript-and-relvyn/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_rescript_and_relvyn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/rescript-and-relvyn/'); | |
| 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_rescript_and_relvyn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/rescript-and-relvyn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_seamless_dx_with_vercel', () => { | |
| test('blog_seamless_dx_with_vercel: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/seamless-dx-with-vercel/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_seamless_dx_with_vercel: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/seamless-dx-with-vercel/'); | |
| 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_seamless_dx_with_vercel: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/seamless-dx-with-vercel/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_speedrunning_our_ai_startup_with_relvyn', () => { | |
| test('blog_speedrunning_our_ai_startup_with_relvyn: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/speedrunning-our-ai-startup-with-relvyn/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_speedrunning_our_ai_startup_with_relvyn: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/speedrunning-our-ai-startup-with-relvyn/'); | |
| 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_speedrunning_our_ai_startup_with_relvyn: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/speedrunning-our-ai-startup-with-relvyn/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_stop_building_auth_start_building_apps_with_relvyn_and_next_js', () => { | |
| test('blog_stop_building_auth_start_building_apps_with_relvyn_and_next_js: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/stop-building-auth-start-building-apps-with-relvyn-and-next-js/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_stop_building_auth_start_building_apps_with_relvyn_and_next_js: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/stop-building-auth-start-building-apps-with-relvyn-and-next-js/'); | |
| 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_building_auth_start_building_apps_with_relvyn_and_next_js: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/stop-building-auth-start-building-apps-with-relvyn-and-next-js/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_the_graph_relational_database_defined', () => { | |
| test('blog_the_graph_relational_database_defined: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/the-graph-relational-database-defined/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_the_graph_relational_database_defined: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/the-graph-relational-database-defined/'); | |
| 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_graph_relational_database_defined: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/the-graph-relational-database-defined/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_the_missing_piece_in_the_fastapi_pydantic_ai_agentic_stack', () => { | |
| test('blog_the_missing_piece_in_the_fastapi_pydantic_ai_agentic_stack: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/the-missing-piece-in-the-fastapi-pydantic-ai-agentic-stack/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_the_missing_piece_in_the_fastapi_pydantic_ai_agentic_stack: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/the-missing-piece-in-the-fastapi-pydantic-ai-agentic-stack/'); | |
| 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_missing_piece_in_the_fastapi_pydantic_ai_agentic_stack: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/the-missing-piece-in-the-fastapi-pydantic-ai-agentic-stack/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_the_zen_side_of_the_moon', () => { | |
| test('blog_the_zen_side_of_the_moon: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/the-zen-side-of-the-moon/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_the_zen_side_of_the_moon: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/the-zen-side-of-the-moon/'); | |
| 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_zen_side_of_the_moon: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/the-zen-side-of-the-moon/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_typesafe_database_querying_via_code_generation', () => { | |
| test('blog_typesafe_database_querying_via_code_generation: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/typesafe-database-querying-via-code-generation/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_typesafe_database_querying_via_code_generation: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/typesafe-database-querying-via-code-generation/'); | |
| 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_typesafe_database_querying_via_code_generation: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/typesafe-database-querying-via-code-generation/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_vercel_relvyn_branches_workflow_and_hackathon_alert', () => { | |
| test('blog_vercel_relvyn_branches_workflow_and_hackathon_alert: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/vercel-relvyn-branches-workflow-and-hackathon-alert/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_vercel_relvyn_branches_workflow_and_hackathon_alert: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/vercel-relvyn-branches-workflow-and-hackathon-alert/'); | |
| 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_vercel_relvyn_branches_workflow_and_hackathon_alert: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/vercel-relvyn-branches-workflow-and-hackathon-alert/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_we_can_do_better_than_sql', () => { | |
| test('blog_we_can_do_better_than_sql: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/we-can-do-better-than-sql/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_we_can_do_better_than_sql: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/we-can-do-better-than-sql/'); | |
| 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_we_can_do_better_than_sql: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/we-can-do-better-than-sql/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_why_orms_are_slow_and_getting_slower', () => { | |
| test('blog_why_orms_are_slow_and_getting_slower: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/why-orms-are-slow-and-getting-slower/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_why_orms_are_slow_and_getting_slower: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/why-orms-are-slow-and-getting-slower/'); | |
| 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_orms_are_slow_and_getting_slower: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/why-orms-are-slow-and-getting-slower/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - blog_why_putting_logic_in_your_database_is_pretty_great_with_fiori_ai', () => { | |
| test('blog_why_putting_logic_in_your_database_is_pretty_great_with_fiori_ai: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/blog/why-putting-logic-in-your-database-is-pretty-great-with-fiori-ai/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('blog_why_putting_logic_in_your_database_is_pretty_great_with_fiori_ai: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/blog/why-putting-logic-in-your-database-is-pretty-great-with-fiori-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_why_putting_logic_in_your_database_is_pretty_great_with_fiori_ai: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/blog/why-putting-logic-in-your-database-is-pretty-great-with-fiori-ai/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - showcase_data_modeling', () => { | |
| test('showcase_data_modeling: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/showcase/data-modeling/'); | |
| expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('showcase_data_modeling: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/showcase/data-modeling/'); | |
| 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('showcase_data_modeling: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/showcase/data-modeling/'); | |
| 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('/blog/'); | |
| 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)); | |
| } | |
| 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); | |
| } | |
| } | |
| } | |
| }); | |
| }); | |