Files
maziggy 0b92172322 fix(tests): make SPA cache-header tests work without a built frontend
backend/tests/integration/test_static_html_cache_headers.py asserted
  that "/", "/spoolbuddy/", and "/printers" return text/html with
  Cache-Control: no-cache, must-revalidate. The Dockerfile.test
  backend-test target intentionally doesn't bake in the built frontend
  (saves ~30s of build time per test run), so static/index.html doesn't
  exist inside the container. The route handlers correctly fall through
  to their "frontend not built" JSON branches, and the test fails with
  "non-HTML content-type: application/json" — latent since the test was
  added in e9200449 (Apr 26).

  Add a fake_static_index fixture that creates a tmp dir with a one-line
  <!doctype html> stub and monkeypatches app_settings.static_dir to it.
  Both call sites are patched (config.settings and main.app_settings) in
  case a future refactor splits the singleton. The test continues to hit
  the real serve_frontend / serve_spa route handlers and validates the
  real cache-header contract — just doesn't depend on a built bundle
  being present.

  Verified passing both with and without static/index.html present.
2026-05-05 14:35:08 +02:00
..
2026-04-23 14:10:14 +02:00
2026-04-18 12:39:07 +02:00
2026-02-20 18:28:34 +01:00