FE-M0-18 · A Sentry test page for user managers
ID FE-M0-18 · Level L0 · Run order row 34a · Why D24, D15 · Issue #173
/system/sentry causes one test error on purpose, in the browser or on the server, so FE-M0-19 can see both arrive in Sentry. Only a user with user:write at the current pool can open it, which among the system roles is super_admin only (reference/roles); anyone else gets the 404 page, and it is in no menu. The server button's Server Function checks the permission again, because it can be called without its page. The page stays in the app after the pack, for checking Sentry again later. This step changes no file.
Before
Section titled “Before”- FE-M0-17 is Done, on main, with block 3's build in place.
- The local stack is running with the E2E logins. Nothing runs on port 3000.
1 · Start the build as production runs it, and leave it running
Section titled “1 · Start the build as production runs it, and leave it running”In development Next.js covers an error with its own overlay; a production build shows what staff will see.
pnpm --filter web start2 · In the browser, sign in at http://localhost:3000 as the E2E super_admin login and open http://localhost:3000/system/sentry. Open the browser's console. Press “Error di browser”, then “Error di server”.
Section titled “2 · In the browser, sign in at http://localhost:3000 as the E2E super_admin login and open http://localhost:3000/system/sentry. Open the browser's console. Press “Error di browser”, then “Error di server”.”3 · Sign out, sign in as the E2E admin_fleet login and open http://localhost:3000/system/sentry again. Then stop the app with Ctrl+C.
Section titled “3 · Sign out, sign in as the E2E admin_fleet login and open http://localhost:3000/system/sentry again. Then stop the app with Ctrl+C.”Expect
Section titled “Expect”- Block 1: “✓ Ready” on port 3000.
- Block 2: the page says “Sentry tidak aktif: tidak ada DSN di sini.”, because the Mac has no DSN. “Error di browser” changes nothing on the page; the console shows “FE pack F: a test error from the browser”. “Error di server” shows “Error server sudah terjadi. Periksa Sentry.” under the button, the page and its menu stay, and the first terminal shows “Error: FE pack F: a test error from the server”.
- Block 3: as admin_fleet the page is the 404 page, “Halaman tidak ditemukan”, inside the shell.
git status --shortNothing: the step changes no file.
If it fails
Section titled “If it fails”- super_admin gets the 404 page: the login's pool lacks
user:write. Paste the line for super_admin frompnpm db:e2e-users; BE checks the role. - admin_fleet sees the page: stop and paste the address. The page must not open without
user:write. - “Error di server” shows “Halaman ini gagal dimuat” instead of the line under the button: the error reached the error page. Paste the first terminal's last lines into #173.
Nothing to undo: stop the app with Ctrl+C.
Not run yet. Log each run as a comment on #173.