Add static routes for frontend modern and legacy service workers (#120488) (#122174)

* Bump frontend to 20240719.0

* restore #120488
This commit is contained in:
Bram Kragten
2024-07-19 14:40:50 +02:00
committed by GitHub
parent f006716173
commit 6788c43775
6 changed files with 13 additions and 7 deletions
+5 -2
View File
@@ -174,9 +174,12 @@ async def test_frontend_and_static(mock_http_client: TestClient) -> None:
assert "public" in resp.headers.get("cache-control")
async def test_dont_cache_service_worker(mock_http_client: TestClient) -> None:
@pytest.mark.parametrize("sw_url", ["/sw-modern.js", "/sw-legacy.js"])
async def test_dont_cache_service_worker(
mock_http_client: TestClient, sw_url: str
) -> None:
"""Test that we don't cache the service worker."""
resp = await mock_http_client.get("/service_worker.js")
resp = await mock_http_client.get(sw_url)
assert resp.status == 200
assert "cache-control" not in resp.headers