mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Adds the Hanzo Platform documentation app with 47 MDX pages covering: - Getting Started (overview, quickstart, concepts, CLI) - Deployments (Kubernetes, Docker Swarm, Compose, Git, Registry, Domains) - Clusters (fleet, registration, provisioning, node pools) - Virtual Machines (AWS, DigitalOcean, Hetzner, volumes, terminal) - Access Control (organizations, roles, permissions, invitations) - Pricing (plans, compute, storage) - API Reference (authentication, organizations, clusters, containers, VMs) Also adds team app and K8s deployment manifest for platform-site.
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import { test, expect, devices } from '@playwright/test'
|
|
|
|
const viewports = [
|
|
{ name: 'mobile', width: 375, height: 812 },
|
|
{ name: 'tablet', width: 768, height: 1024 },
|
|
{ name: 'desktop', width: 1440, height: 900 },
|
|
]
|
|
|
|
for (const vp of viewports) {
|
|
test.describe(`Responsive — ${vp.name} (${vp.width}x${vp.height})`, () => {
|
|
test.use({ viewport: { width: vp.width, height: vp.height } })
|
|
|
|
test('landing page renders without overflow', async ({ page }) => {
|
|
await page.goto('/')
|
|
// No horizontal scrollbar
|
|
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth)
|
|
const clientWidth = await page.evaluate(() => document.documentElement.clientWidth)
|
|
expect(scrollWidth).toBeLessThanOrEqual(clientWidth + 1)
|
|
})
|
|
|
|
test('hero section is visible', async ({ page }) => {
|
|
await page.goto('/')
|
|
await expect(page.getByText('Deploy Anywhere.')).toBeVisible()
|
|
})
|
|
|
|
test('feature cards render', async ({ page }) => {
|
|
await page.goto('/')
|
|
await expect(page.getByText('Kubernetes Orchestration')).toBeVisible()
|
|
})
|
|
|
|
test('docs page renders', async ({ page }) => {
|
|
await page.goto('/docs')
|
|
await expect(page.getByRole('heading', { level: 1 })).toBeVisible()
|
|
})
|
|
|
|
test('screenshot baseline', async ({ page }) => {
|
|
await page.goto('/')
|
|
await page.waitForLoadState('networkidle')
|
|
await expect(page).toHaveScreenshot(`landing-${vp.name}.png`, {
|
|
fullPage: true,
|
|
maxDiffPixelRatio: 0.05,
|
|
})
|
|
})
|
|
})
|
|
}
|