test: add authenticated admin browser workflow
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-08 22:35:30 -04:00
parent d02718e6be
commit 4f71d3d8de
6 changed files with 85 additions and 2 deletions
+10
View File
@@ -101,6 +101,16 @@ npm run seed:demo
The seed is non-destructive and exits without changes when the demo catalog already exists.
## Browser Workflow Tests
With `npm run dev` running, configured local admin credentials, and demo lookup data available, run the authenticated browser workflow with:
```sh
npm run test:e2e
```
The workflow covers login, admin overview loading, product creation, physical inventory creation, and navigation to image management. It skips when `INITIAL_ADMIN_EMAIL` or `INITIAL_ADMIN_PASSWORD` is not configured.
## Initial Administrator
After the development database is migrated, set `INITIAL_ADMIN_EMAIL`, `INITIAL_ADMIN_PASSWORD`, and `INITIAL_SELLER_NAME` in your local `.env`, then run `npm run provision:admin` once. The command creates the only initial administrator and linked Seller; it refuses to run after any User exists.