Files
hanzo.ai/e2e/gates/templates.spec.ts
zeekay d5ff01c814 / is the landing /home2 was, and /home2 forwards to it
Owner approved: app/page.tsx keeps Apex, MOVED and BOOT (a signed-in
reader still gets the app) and draws components/home2/Home2 with its
title and description, canonical https://hanzo.ai. /home2 leaves
UNAPPROVED for MOVED, so the edge answers it with a 301 to /.

HomeLanding and Advantage go, and with them the stack variant of the
hero's demo and its two captures: the account pages keep the CLI
terminal. The first screen is the hero Try Hanzo reaches. The gates
that read the old landing read this one; the templates check moves to
its own gate.
2026-10-16 11:42:23 -07:00

30 lines
1.1 KiB
TypeScript

import { expect, test } from '@playwright/test'
import { serveExport } from './export'
import { serve } from './api'
/**
* /TEMPLATES: the product templates, read from the catalog when the page opens
* (e2e/gates/api serves it), twelve finished products in one list.
*/
test.describe('/templates', () => {
let base: string
let stop: () => Promise<void>
test.beforeAll(async () => {
const served = await serveExport()
base = served.url
stop = served.close
})
test.afterAll(async () => stop())
test('lists the twelve product templates', async ({ page }) => {
await serve(page)
await page.goto(`${base}/templates`, { waitUntil: 'load' })
await expect(page.locator('#enso')).toHaveCount(1)
// The catalog is read from an effect; the wait below starts once the page's script has run.
await page.locator('html[data-hydrated]').waitFor({ state: 'attached' })
const list = page.locator('#enso').getByRole('list', { name: 'Product templates' })
await expect(list).toBeVisible()
expect(await list.getByRole('listitem').count()).toBe(12)
})
})