Skip to content

The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.

test(web): cover landing + docs, update splash/responsive/seo specs

YeonGyu-Kim51c0efd0888d
diff --git a/packages/web/e2e/coming-soon.spec.ts b/packages/web/e2e/coming-soon.spec.ts
index f50d9f66..028539df 100644
--- a/packages/web/e2e/coming-soon.spec.ts
+++ b/packages/web/e2e/coming-soon.spec.ts
@@ -1,19 +1,28 @@
import { test, expect } from "@playwright/test"
+import { SITE_CONFIG } from "../lib/site-config"
test.describe("coming-soon page — content", () => {
- test("renders the splash wordmark, tagline, status, and footer", async ({ page }) => {
+ test("renders the wordmark, hero copy, status, and footer", async ({ page }) => {
await page.goto("/")
- await expect(page.getByRole("heading", { level: 1, name: "LazyCodex" })).toBeVisible()
+ await expect(
+ page.getByRole("heading", { level: 1, name: SITE_CONFIG.wordmark }),
+ ).toBeVisible()
- await expect(page.getByText("OmO in Codex", { exact: true })).toBeVisible()
- await expect(page.getByText("CODEX FOR NO-BRAINERS", { exact: true })).toBeVisible()
- await expect(page.getByText("Coming June 2026", { exact: false })).toBeVisible()
- await expect(page.getByText("OpenCode", { exact: false })).toBeVisible()
+ await expect(page.getByText(SITE_CONFIG.eyebrow, { exact: true })).toBeVisible()
+ await expect(page.getByText(/June 2026/i).first()).toBeVisible()
+ await expect(page.getByText("OpenCode", { exact: false }).first()).toBeVisible()
- await expect(page.getByText("You don't need to think.", { exact: true })).toBeVisible()
- await expect(page.getByText("Just prompt with ultrawork.", { exact: true })).toBeVisible()
- await expect(page.getByText("lazycodex.ai", { exact: true })).toBeVisible()
+ // New hero copy (replaces the old "You don't need to think." splash).
+ await expect(page.getByText(SITE_CONFIG.heroLineA, { exact: false }).first()).toBeVisible()
+ await expect(
+ page.getByText(SITE_CONFIG.heroLineB.slot, { exact: false }).first(),
+ ).toBeVisible()
+ await expect(
+ page.getByText(SITE_CONFIG.heroLineB.keyword, { exact: false }).first(),
+ ).toBeVisible()
+
+ await expect(page.getByText("lazycodex.ai", { exact: false }).first()).toBeVisible()
})
test("has a single h1 and no broken landmarks", async ({ page }) => {
diff --git a/packages/web/e2e/docs.spec.ts b/packages/web/e2e/docs.spec.ts
new file mode 100644
index 00000000..7a143266
--- /dev/null
+++ b/packages/web/e2e/docs.spec.ts
@@ -0,0 +1,83 @@
+import { test, expect } from "@playwright/test"
+import { DOC_SECTIONS } from "../lib/docs-sections"
+
+/**
+ * Docs `/docs` contract (TDD target state).
+ *
+ * The page must be fully server-rendered: every section id present, every
+ * heading prose in the DOM with JavaScript disabled, and an in-page nav
+ * whose entries jump to the matching anchors.
+ */
+
+const ULW_LOOP = DOC_SECTIONS.find((section) => section.id === "ulw-loop")
+
+test.describe("docs page — structure", () => {
+ test("responds 200", async ({ request }) => {
+ const res = await request.get("/docs")
+ expect(res.status()).toBe(200)
+ })
+
+ test("has exactly one h1", async ({ page }) => {
+ await page.goto("/docs")
+ await expect(page.locator("h1")).toHaveCount(1)
+ })
+
+ test("renders every section as a visible element carrying its id + title", async ({ page }) => {
+ await page.goto("/docs")
+ for (const section of DOC_SECTIONS) {
+ const node = page.locator(`#${section.id}`)
+ await expect(node).toHaveCount(1)
+ await expect(node).toBeVisible()
+ await expect(node).toContainText(section.title)
+ }
+ })
+
+ test("nav lists all six section titles as links or buttons", async ({ page }) => {
+ await page.goto("/docs")
+ const nav = page.getByRole("navigation")
+ for (const section of DOC_SECTIONS) {
+ const entry = nav
+ .getByRole("link", { name: section.title })
+ .or(nav.getByRole("button", { name: section.title }))
+ await expect(entry.first()).toBeVisible()
+ }
+ })
+})
+
+test.describe("docs page — navigation", () => {
+ test("clicking the $ulw-loop nav entry jumps to that section", async ({ page }) => {
+ if (!ULW_LOOP) throw new Error("DOC_SECTIONS must include the ulw-loop section")
+ await page.goto("/docs")
+ const nav = page.getByRole("navigation")
+ const trigger = nav
+ .getByRole("link", { name: ULW_LOOP.title })
+ .or(nav.getByRole("button", { name: ULW_LOOP.title }))
+ .first()
+ await trigger.click()
+ await expect(page).toHaveURL(new RegExp(`#${ULW_LOOP.id}$`))
+ await expect(page.locator(`#${ULW_LOOP.id}`)).toBeInViewport()
+ })
+})
+
+test.describe("docs page — no-JS SSR", () => {
+ test("server-renders every section heading without JavaScript", async ({ browser }) => {
+ const context = await browser.newContext({ javaScriptEnabled: false })
+ const page = await context.newPage()
+ try {
+ await page.goto("/docs")
+ for (const section of DOC_SECTIONS) {
+ const node = page.locator(`#${section.id}`)
+ await expect(node).toHaveCount(1)
+ await expect(node).toBeVisible()
+ await expect(node).toContainText(section.title)
+ const prose = (await node.textContent()) ?? ""
+ expect(
+ prose.length,
+ `#${section.id} must server-render prose beyond its title`,
+ ).toBeGreaterThan(section.title.length)
+ }
+ } finally {
+ await context.close()
+ }
+ })
+})
diff --git a/packages/web/e2e/landing.spec.ts b/packages/web/e2e/landing.spec.ts
new file mode 100644
index 00000000..ce914680
--- /dev/null
+++ b/packages/web/e2e/landing.spec.ts
@@ -0,0 +1,84 @@
+import { test, expect } from "@playwright/test"
+import { SITE_CONFIG } from "../lib/site-config"
+import { COMMANDS } from "../lib/commands"
+
+/**
+ * Landing `/` contract (TDD target state).
+ *
+ * Selectors are deliberately tolerant of inline <span> splits: headings,
+ * links, and buttons go through getByRole; the hero tagline is checked by
+ * its distinctive sub-parts ("{your prompt}" + "ultrawork") instead of one
+ * exact full-string match; `.first()` guards against strict-mode violations.
+ */
+
+test.describe("landing page — hero", () => {
+ test("has exactly one h1 reading the wordmark", async ({ page }) => {
+ await page.goto("/")
+ await expect(page.locator("h1")).toHaveCount(1)
+ await expect(
+ page.getByRole("heading", { level: 1, name: SITE_CONFIG.wordmark }),
+ ).toBeVisible()
+ })
+
+ test("shows the eyebrow and both hero lines", async ({ page }) => {
+ await page.goto("/")
+ await expect(page.getByText(SITE_CONFIG.eyebrow, { exact: true })).toBeVisible()
+ await expect(page.getByText(SITE_CONFIG.heroLineA, { exact: false }).first()).toBeVisible()
+ // Tagline may be split across inline spans — assert the distinctive parts.
+ await expect(page.getByText("Just prompt", { exact: false }).first()).toBeVisible()
+ await expect(
+ page.getByText(SITE_CONFIG.heroLineB.slot, { exact: false }).first(),
+ ).toBeVisible()
+ await expect(
+ page.getByText(SITE_CONFIG.heroLineB.keyword, { exact: false }).first(),
+ ).toBeVisible()
+ })
+
+ test("shows the launch-window status", async ({ page }) => {
+ await page.goto("/")
+ await expect(page.getByText(/June 2026/i).first()).toBeVisible()
+ })
+})
+
+test.describe("landing page — install + commands", () => {
+ test("shows the install command and a copy button", async ({ page }) => {
+ await page.goto("/")
+ await expect(
+ page.getByText(SITE_CONFIG.installCommand, { exact: false }).first(),
+ ).toBeVisible()
+ await expect(page.getByRole("button", { name: /copy/i }).first()).toBeVisible()
+ })
+
+ test("renders every command with its name and syntax", async ({ page }) => {
+ await page.goto("/")
+ for (const command of COMMANDS) {
+ await expect(page.getByText(command.name, { exact: false }).first()).toBeVisible()
+ await expect(page.getByText(command.syntax, { exact: false }).first()).toBeVisible()
+ }
+ })
+})
+
+test.describe("landing page — links + footer", () => {
+ test("github stars pill links to the stargazers url with a count", async ({ page }) => {
+ await page.goto("/")
+ const stars = page.locator(`a[href="${SITE_CONFIG.githubStarsUrl}"]`).first()
+ await expect(stars).toBeVisible()
+ await expect(stars).toContainText(/stars/i)
+ await expect(stars).toContainText(/\d/)
+ })
+
+ test("has a Docs link pointing at /docs", async ({ page }) => {
+ await page.goto("/")
+ const docs = page.getByRole("link", { name: /docs/i }).first()
+ await expect(docs).toBeVisible()
+ await expect(docs).toHaveAttribute("href", SITE_CONFIG.docsPath)
+ })
+
+ test("co-brands sisyphuslabs and shows lazycodex.ai", async ({ page }) => {
+ await page.goto("/")
+ await expect(
+ page.locator(`a[href="${SITE_CONFIG.sisyphusUrl}"]`).first(),
+ ).toBeVisible()
+ await expect(page.getByText("lazycodex.ai", { exact: false }).first()).toBeVisible()
+ })
+})
diff --git a/packages/web/e2e/responsive.spec.ts b/packages/web/e2e/responsive.spec.ts
index eb1e5c0f..397bb6a1 100644
--- a/packages/web/e2e/responsive.spec.ts
+++ b/packages/web/e2e/responsive.spec.ts
@@ -1,4 +1,6 @@
import { test, expect, devices } from "@playwright/test"
+import { SITE_CONFIG } from "../lib/site-config"
+import { COMMANDS } from "../lib/commands"
/**
* Responsive contract: the page MUST render perfectly across the device
@@ -7,8 +9,10 @@ import { test, expect, devices } from "@playwright/test"
* For each viewport, we assert:
* 1. No horizontal overflow (the page fits).
* 2. The wordmark is visible AND fits inside the viewport width.
- * 3. The two-line tagline is visible AND fits inside the viewport width.
- * 4. The splash footer is visible.
+ * 3. The hero keyword "ultrawork" is visible.
+ * 4. The launch-window status (/June 2026/i) is visible.
+ * 5. All three command names are visible.
+ * 6. The footer ("lazycodex.ai") is visible.
*
* If a future change breaks any breakpoint, this spec catches it before
* Lighthouse a11y/SEO scores even get a chance to fail.
@@ -49,7 +53,7 @@ for (const viewport of VIEWPORTS) {
expect(overflowed, "page must not overflow horizontally").toBe(false)
// Wordmark visible and bounded.
- const wordmark = page.getByRole("heading", { level: 1, name: "LazyCodex" })
+ const wordmark = page.getByRole("heading", { level: 1, name: SITE_CONFIG.wordmark })
await expect(wordmark).toBeVisible()
const wordmarkBox = await wordmark.boundingBox()
expect(wordmarkBox, "wordmark must have a bounding box").not.toBeNull()
@@ -57,20 +61,21 @@ for (const viewport of VIEWPORTS) {
expect(wordmarkBox.width).toBeLessThanOrEqual(viewport.width)
}
- // Tagline visible and bounded.
- const tagline = page.getByText("Just prompt with ultrawork.", { exact: true })
- await expect(tagline).toBeVisible()
- const taglineBox = await tagline.boundingBox()
- expect(taglineBox, "tagline must have a bounding box").not.toBeNull()
- if (taglineBox) {
- expect(taglineBox.width).toBeLessThanOrEqual(viewport.width)
- }
+ // Hero keyword visible (replaces the old single-line tagline check).
+ await expect(
+ page.getByText(SITE_CONFIG.heroLineB.keyword, { exact: false }).first(),
+ ).toBeVisible()
// Status pill visible.
- await expect(page.getByText("Coming June 2026", { exact: false })).toBeVisible()
+ await expect(page.getByText(/June 2026/i).first()).toBeVisible()
+
+ // Command card names visible.
+ for (const command of COMMANDS) {
+ await expect(page.getByText(command.name, { exact: false }).first()).toBeVisible()
+ }
// Footer visible.
- await expect(page.getByText("lazycodex.ai", { exact: true })).toBeVisible()
+ await expect(page.getByText("lazycodex.ai", { exact: false }).first()).toBeVisible()
} finally {
await context.close()
}
@@ -82,7 +87,9 @@ test("@responsive iPhone-13 device profile (Playwright preset)", async ({ browse
const page = await context.newPage()
try {
await page.goto("/", { waitUntil: "networkidle" })
- await expect(page.getByRole("heading", { level: 1, name: "LazyCodex" })).toBeVisible()
+ await expect(
+ page.getByRole("heading", { level: 1, name: SITE_CONFIG.wordmark }),
+ ).toBeVisible()
const overflowed = await page.evaluate(
() => document.documentElement.scrollWidth > document.documentElement.clientWidth,
)
@@ -97,7 +104,9 @@ test("@responsive iPad-Pro device profile (Playwright preset)", async ({ browser
const page = await context.newPage()
try {
await page.goto("/", { waitUntil: "networkidle" })
- await expect(page.getByRole("heading", { level: 1, name: "LazyCodex" })).toBeVisible()
+ await expect(
+ page.getByRole("heading", { level: 1, name: SITE_CONFIG.wordmark }),
+ ).toBeVisible()
const overflowed = await page.evaluate(
() => document.documentElement.scrollWidth > document.documentElement.clientWidth,
)
diff --git a/packages/web/e2e/seo.spec.ts b/packages/web/e2e/seo.spec.ts
index 86490189..4325b9a2 100644
--- a/packages/web/e2e/seo.spec.ts
+++ b/packages/web/e2e/seo.spec.ts
@@ -72,6 +72,12 @@ test.describe("coming-soon page — SEO + metadata", () => {
expect(sitemap.status()).toBe(200)
const sitemapText = await sitemap.text()
expect(sitemapText).toMatch(/<loc>https:\/\/lazycodex\.ai\/<\/loc>/i)
+ expect(sitemapText).toMatch(/<loc>https:\/\/lazycodex\.ai\/docs<\/loc>/i)
+ })
+
+ test("/docs route is reachable", async ({ request }) => {
+ const docs = await request.get("/docs")
+ expect(docs.status()).toBe(200)
})
test("/manifest.webmanifest is reachable and valid", async ({ request }) => {