2.5 KiB
2.5 KiB
Seed Verification Guide (Staging)
Service Startup (Local)
- Backend:
go run ./backend/main.go serve(defaulthttp://localhost:8080). - Portal frontend:
npm -C frontend/portal installthennpm -C frontend/portal run dev(defaulthttp://localhost:5174). - Superadmin frontend:
npm -C frontend/superadmin installthennpm -C frontend/superadmin run dev(defaulthttp://localhost:5173). - Portal dev server proxies
/v1tohttp://localhost:8080(frontend/portal/vite.config.js). - Superadmin dev server proxies
/super/v1and/v1tohttp://localhost:8080(frontend/superadmin/vite.config.mjs).
Run Seed
- Execute
go run ./backend/main.go seed. - Ensure no panics; capture console output for troubleshooting.
Data Validation (DB/Logs)
- Users: verify
creator,test,superadmin,negativeexist inusers.username. - Tenant: read
tenants.codeto obtaintenantCode(DB query or admin UI). - Memberships:
tenant_usersincludescreatorastenant_admin,testasmember. - Orders:
ordershascontent_purchase+withdrawal, plus flagged/reconciled records. - Ledger:
tenant_ledgershas at least one row. - Templates:
notification_templatescontains order/audit/interaction types.
Portal Smoke (Use tenantCode)
- Tenant code: query DB, then open
http://localhost:5174/t/:tenantCode. - Login: OTP is fixed to
1234(seebackend/app/services/user.go). - Home:
/t/:tenantCodelists content. - Detail: open any content detail; cover and main asset render.
- Login: sign in as
test(phone13800138000, OTP1234) and open/t/:tenantCode/me. - Orders & Library:
/t/:tenantCode/me/ordersand/t/:tenantCode/me/libraryshow data. - Likes/Favorites: content detail shows prefilled like/favorite; toggle to confirm.
- Notifications:
/t/:tenantCode/me/notificationsshows unread items.
Superadmin Smoke
- Open
http://localhost:5173/super/auth/login. - Login:
superadmin/superadmin123. - Users: list includes
negative; balance anomaly list returns result. - Orders: list includes flagged/reconciled and refund orders.
- Withdrawals: list contains
created/paid/failedstatuses. - Finance: ledger list has data; order anomaly list returns missing paid/refund items.
- Content/Reports: content list is populated; report list has pending item.
- Templates: order/audit/interaction templates present.
- System Configs:
site_nameandsupport_emailpresent.
Manual-Only Coverage
- Upload flow (init/part/complete) requires real storage integration; seed only preloads assets.