Skip to content

Testing

An edited this page Oct 6, 2026 · 6 revisions

Testing and verification

Commands use the host-development tools. See Local development for prerequisites.

Frontend

From the repo root:

npm --prefix frontend test -- --watch=false
npm --prefix frontend run build

Tests use Vitest through Angular. The production output is frontend/dist/b26, not dist/b26/browser.

The current board-layout CSS warning does not fail the build. See Troubleshooting.

Backend: fast suite

cd backend
./mvnw test

Use Java 21. These tests normally use H2 and generated schemas; they do not by themselves prove PostgreSQL migrations work.

Backend: include PostgreSQL tests

Start a disposable PostgreSQL database, then run from backend/:

POSTGRES_TEST_URL='jdbc:postgresql://localhost:5432/b26_test' POSTGRES_TEST_USER=postgres POSTGRES_TEST_PASSWORD=postgres ./mvnw test

The database in that example must already exist, and the credentials must match it. The PostgreSQL tests create and drop randomly named schemas; use a test database whose user can create schemas. They do not clean the connection's default schema.

Without POSTGRES_TEST_URL, those tests are skipped. They cover fresh migrations, upgrades from historical versioned migrations, real-database onboarding, schema validation, and simultaneous editor saves.

CI

.github/workflows/ci.yml runs backend tests with PostgreSQL 16, frontend tests, and a production frontend build on pushes and pull requests. The Docker image build skips backend tests, so image creation alone is not a replacement for CI.

Manual smoke check

  1. Start the app and check /actuator/health on port 8080.
  2. Sign up; confirm an owned starter board opens.
  3. Add a widget and save; refresh and confirm it persists.
  4. Open the same board in two tabs, enter Edit in both, then save one. Saving the older draft in the other should report a conflict and retain its draft.
  5. Make an unsaved edit and try navigating to another board; the discard prompt should appear.
  6. Set another owned board as main; check /<username>.
  7. Sign in as one user and visit another user's public URL; it should remain on the visited page.

Last implementation verification before this wiki refresh: 45 backend tests and 37 frontend tests passed, along with the production build. Treat future CI results as the current authority.

Clone this wiki locally