Next.js & Web
Prove a UI change actually rendered by driving the app with Playwright: navigate, wait for real signals, screenshot, and assert on visible state.
1 file
Description
Prove a UI change actually rendered by driving the app with Playwright: navigate, wait for real signals, screenshot, and assert on visible state.
After a UI change, before claiming it works: verifying a new route renders, a component appears in the right state, or a set of pages all return 200.
Compiling and unit tests passing is not proof the page renders. Drive the real app.
Start the app (or point Playwright at a running dev server).
Navigate and wait on a real signal, not a fixed sleep:
await page.goto("/library/skills");
await page.waitForLoadState("networkidle");
await expect(page.getByRole("heading", { name: /skill library/i })).toBeVisible();
Screenshot for the record and for visual review:
await page.screenshot({ path: "verify/library-skills.png", fullPage: true });
Assert on visible, user-facing state: a heading, a row count, a button being enabled. Not on internal class names that churn.
To confirm many routes at once, loop and assert the status:
for (const path of ["/library", "/library/skills", "/library/skills/clerk-auth-setup"]) {
const res = await page.request.get(path);
expect(res.status(), path).toBe(200);
}
waitForTimeout (a fixed sleep) is flaky: too short and the page is not ready, too long and the suite crawls. Wait on a load state or an element instead.Added 2026-07-01. Back to the Skill Library.

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.