/iblai-test
AI Assistant: You MUST run these checks before presenting any work to
the user. Do NOT show untested code.
Use
as the default package manager. Fall back to
if pnpm
is not installed.
Step 1: Build
Run the production build to catch TypeScript errors, missing imports, and
config issues:
Fix all errors. A failed build means broken code -- do not proceed until
the build passes cleanly.
Step 2: Run Unit Tests
This runs vitest to verify:
- All paths in CSS files resolve to existing directories
- The symlink is valid and targets the SDK dist
lib/iblai/sdk/web-containers/source
contains compiled JS for
Tailwind class generation
If tests fail, the SDK symlink may be broken. Run
to check. If it's missing, run
again to recreate it.
Step 3: Touch Test Pages
If this is an agent app (from )
The app already has a full Playwright E2E suite in
. Use it:
This runs auth setup + journey tests across Chromium, Firefox, and WebKit.
Configure credentials in
first.
For a single browser:
bash
npx playwright test --config e2e/playwright.config.ts --project=chromium
If this is a vanilla Next.js app
Install Playwright and a browser:
bash
pnpm add -D @playwright/test
npx playwright install --with-deps chromium
installs the browser binary AND system libraries (libatk,
libcups, etc.). Without it the browser may fail to launch on Linux/CI.
For system deps only:
npx playwright install-deps
For browser binaries only:
Start the dev server:
Wait for
http://localhost:3000 to be ready, then screenshot every page
you built:
bash
npx playwright screenshot http://localhost:3000 /tmp/home.png
npx playwright screenshot http://localhost:3000/sso-login-complete /tmp/sso.png
Add every page you created:
bash
npx playwright screenshot http://localhost:3000/profile /tmp/profile.png
npx playwright screenshot http://localhost:3000/account /tmp/account.png
npx playwright screenshot http://localhost:3000/analytics /tmp/analytics.png
npx playwright screenshot http://localhost:3000/notifications /tmp/notifications.png
If any command fails, the page has a render error. Fix it and re-run.
Kill the dev server when done.
How to Tell Which App Type
- Agent app: has directory with and
, and has script
- Vanilla Next.js app: no directory, no script
Summary
- -- must pass with zero errors
- -- vitest must pass
- Touch test every page -- for agent apps, or
npx playwright screenshot
for vanilla apps
- Fix any failures before showing work to the user
Full E2E Reference
For writing custom authenticated journey tests, auth setup, and
multi-browser patterns, see:
https://github.com/iblai/iblai-app-cli/blob/main/skills/testing/iblai-add-test.md
Brand guidelines:
BRAND.md