3.2 KiB
Test Evidence: account shell integration
- Test type: Web
- Requirement IDs:
UI-001,UI-002,UI-004,UI-009,I1-PLAT-06,I1-UI-04 - Scenario IDs:
AC-UI-001,AC-UI-002,AC-UI-005 - Test class/method:
com.lab.labtimesheet.feature.reporting.controller.AccountTemplateIntegrationTest - Implementation commit:
pending
Protected behavior
The authenticated account-creation page consumes the shared role-aware desktop shell and posts to the real account endpoint. The public activation page consumes the local themed authentication shell while preserving its single-use raw-token form contract. The Admin dashboard and navigation link to the implemented /admin/accounts/new route.
Test method
A focused MockMvc slice renders both production account templates through a test-only controller. It asserts the authenticated and public shell markers, local pre-paint theme and CSS assets, real form actions, activation token retention, and the real account-creation URL. The existing PostgreSQL Account web flow then exercises account creation, activation, authentication, authorization, and logout through the production controller and services.
Hand-derived expected result
The account-creation response contains app-shell, posts to /admin/accounts, and exposes /admin/accounts/new as the account navigation target. The activation response contains auth-shell, posts to /activate, retains raw-token, and loads /assets/theme.js before /assets/app.css. Existing account lifecycle and Admin dashboard requests remain successful on PostgreSQL.
RED
Command
export JAVA_HOME=/opt/homebrew/opt/openjdk@25
export PATH="/opt/homebrew/opt/node@24/bin:$JAVA_HOME/bin:$PATH"
./mvnw -Dtest=AccountTemplateIntegrationTest test
Observed result
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0
AccountTemplateIntegrationTest.accountCreationUsesAuthenticatedShellAndRealAccountRoute expected class="app-shell"
AccountTemplateIntegrationTest.activationUsesPublicAuthShellAndLocalAssets expected class="auth-shell"
BUILD FAILURE
Total time: 4.763 s
Both production templates were standalone documents and did not consume either shared layout.
GREEN
Command
export JAVA_HOME=/opt/homebrew/opt/openjdk@25
export PATH="/opt/homebrew/opt/node@24/bin:$JAVA_HOME/bin:$PATH"
./mvnw -Dtest=AccountTemplateIntegrationTest,DashboardTemplateWebTest,UiContractWebTest test
Observed result
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
Total time: 3.710 s
Affected suite
Command and result
export JAVA_HOME=/opt/homebrew/opt/openjdk@25
export PATH="/opt/homebrew/opt/node@24/bin:$JAVA_HOME/bin:$PATH"
export DOCKER_HOST=unix:///Users/sechmachine/.orbstack/run/docker.sock
./mvnw -Dtest=AccountWebIntegrationTest,AdminDashboardWebTest test
PostgreSQL 18.4
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
Total time: 12.219 s
External-test boundaries
The checks prove server rendering, local asset wiring, security-aware account navigation, and the complete account lifecycle through MockMvc/PostgreSQL. They do not replace a real-browser visual check of theme paint timing, password-manager behavior, or desktop overflow.