Web Testing Map
Quick orientation for contributors choosing where web changes should be tested.
Canonical implementation path: internal/services/web/.
Start Here
- Run
make testduring implementation. - Run
make web-architecture-checkwhen changing web boundaries, routes, modules, or templates. - Run
make smokewhen a change affects runtime composition, request flow, or browser-visible behavior that needs quick end-to-end confidence. - Run
make checkbefore push, PR open, or PR update.
High-Signal Root Web Coverage
internal/services/web/server_test.goRoot protected/public handler behavior, redirects, nav chrome, and mounted module interactions.internal/services/web/server_locale_test.goRequest locale resolution, shell language, and localized error/page paths.internal/services/web/server_viewer_test.goSigned-in viewer shell behavior such as menus, avatar/profile links, and notification affordances.internal/services/web/server_static_test.goStatic/public asset and shell contract coverage.internal/services/web/server_test_harness_defaults_test.goDefault dependency bundle shapes used by root web tests.internal/services/web/server_test_harness_helpers_test.goExplicit test dependency completion rules and cross-module harness helpers.internal/cmd/web/web_test.goStartup dependency policy, dependency bootstrapping, and command/runtime wiring.
High-Signal Shared-Platform Coverage
internal/services/web/principal/requeststate_test.goShared request-state contracts used by handler bases, page rendering, and error helpers.internal/services/web/platform/modulehandler/modulehandler_test.goProtected handler-base behavior for user-id propagation, localization, and page/error rendering helpers.internal/services/web/platform/publichandler/publichandler_test.goPublic handler-base behavior for signed-in branching, localization, and page shell helpers.internal/services/web/platform/pagerender/pagerender_test.goShared app-shell/public-shell page writing behavior once page state is resolved.internal/services/web/platform/weberror/weberror_test.goShared protected/public error rendering behavior and safe message handling.internal/services/web/platform/dashboardsync/sync_test.goShared dashboard freshness invalidation and degraded-mode behavior.
High-Signal Module Coverage
internal/services/web/modules/<area>/routes_test.goRoute contract and method coverage for the owning area.internal/services/web/modules/<area>/handlers*_test.goArea-owned transport behavior when a route has meaningful branching or page assembly.internal/services/web/modules/<area>/*/For hotspot areas such ascampaigns, prefer the owned surface package tests once transport is split under subpackages likeoverview,participants,characters,sessions, orinvites.internal/services/web/modules/architecture_test.goCross-module AST-based architecture rules and module-template invariants.internal/services/web/modules/boundary_guardrails_test.goCross-module boundary guardrails for known hotspot seams and ownership cuts. Prefer adding AST/package-construction invariants there over raw source-text fragment scans when refactors move code around without changing ownership.
Where To Add Tests
- Startup wiring or backend dependency policy:
internal/cmd/web/web_test.go - Root request/principal/public shell behavior:
internal/services/web/server_test.go - Locale, viewer, or shell-level chrome behavior:
internal/services/web/server_locale_test.gointernal/services/web/server_viewer_test.go - Shared request-state or transport helper behavior:
internal/services/web/principal/requeststate_test.gointernal/services/web/platform/modulehandler/modulehandler_test.gointernal/services/web/platform/publichandler/publichandler_test.gointernal/services/web/platform/pagerender/pagerender_test.gointernal/services/web/platform/weberror/weberror_test.gointernal/services/web/platform/dashboardsync/sync_test.go - Module route or handler behavior: the owning module
routes_test.goand any ownedhandlers*_test.go - Shared web architecture or boundary rules:
internal/services/web/modules/architecture_test.gointernal/services/web/modules/boundary_guardrails_test.go
Contributor Rule
When a refactor changes the canonical place to verify a web behavior, update this map in the same slice. Contributors should not need to rediscover the test entrypoints by reading the whole package tree.