在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用e2e
星标2
分支1
更新时间2026年6月23日 01:44
Setup and run Playwright E2E tests against local Supabase
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Setup and run Playwright E2E tests against local Supabase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | e2e |
| description | Setup and run Playwright E2E tests against local Supabase |
| user_invocable | true |
make e2e-setup
This runs scripts/e2e-setup.sh which:
backend/tests/fixtures/seed.sql)send-auth-email with SMTP to Mailpit)e2e/ npm depsFrontend must be running separately:
cd frontend && npm run dev -- -p 3001
Frontend .env.local must point to local Supabase:
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH
| Command | What | Time |
|---|---|---|
make e2e | All 18 tests | ~16s |
make e2e-public | 12 tests (no email) | ~4s |
cd e2e && npx playwright test --headed --workers=1 | Watch in browser | ~20s |
| File | # | Covers |
|---|---|---|
public-pages.spec.ts | 3 | Landing, Guide load, CTA button |
middleware-redirect.spec.ts | 4 | /chat→/login, /settings→/login, query preserved, public passthrough |
login-modal.spec.ts | 5 | Landing modal, ?login=true, Guide CTA modal, hint text, backdrop close |
auth-flow-local.spec.ts | 6 | Email arrival, magic link login, en/ja/zh locale email content |
The Edge Function (send-auth-email) sends locale-specific emails:
locale: "en" → "Seichijunrei — Login link" + "Log in"locale: "ja" → "聖地巡礼 — ログインリンク" + "ログインする"locale: "zh" → "聖地巡礼 — 登录链接" + "点击登录"Tests set browser locale via browser.newContext({ locale }) and verify Mailpit email content.
| Problem | Fix |
|---|---|
| Anime not found on Guide page | docker exec -i supabase_db_seichijunrei-agent psql -U postgres < backend/tests/fixtures/seed.sql |
| Email not arriving in Mailpit | Check Edge Function: curl http://localhost:54321/functions/v1/send-auth-email |
| SMTP connection refused | config.toml needs [inbucket] smtp_port = 54325 |
| Login link expired | Edge Function SITE_URL wrong. Pass SITE_URL=http://localhost:3001 |
| Tests flaky | Use --workers=1 (auth tests need serial SMTP) |
| Docker snippets permission | mkdir -p supabase/snippets && chmod 755 supabase/snippets |
| Supabase CLI too old | Need v2.98.1+ for auth hook support. brew upgrade supabase |