import { test, expect } from '@playwright/test'; test.describe('Landing page', () => { test.beforeEach(async ({ page }) => { await page.goto('/'); }); test('Has correct title', async ({ page }) => { await expect(page).toHaveTitle(/Neuron/); }); test('Has exactly one h1', async ({ page }) => { const h1s = page.locator('h1'); await expect(h1s).toHaveCount(1); }); test('Has meta description with sufficient length', async ({ page }) => { const meta = page.locator('meta[name="description"]'); await expect(meta).toHaveCount(1); const content = await meta.getAttribute('content'); expect(content?.length).toBeGreaterThan(50); }); test('Has og:title and og:description', async ({ page }) => { await expect(page.locator('meta[property="og:title"]')).toHaveCount(1); await expect(page.locator('meta[property="og:description"]')).toHaveCount(1); }); test('Has canonical URL pointing to production domain', async ({ page }) => { const canonical = page.locator('link[rel="canonical"]'); await expect(canonical).toHaveCount(1); const href = await canonical.getAttribute('href'); expect(href).toContain('neurontechnologies.ai'); expect(href).not.toContain('stage'); expect(href).not.toContain('run.app'); }); test('Nav is rendered and visible', async ({ page }) => { // Use the specific nav ID — the footer also contains a