From f2655f7fd7055592bffe0ab9c2c7ef12bd382086 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Fri, 16 Oct 2026 17:21:54 +0000 Subject: [PATCH] Pin that robots.txt is served but is not part of the PWA shell (32.7 point 6) --- tests/test_pwa.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_pwa.py b/tests/test_pwa.py index fa2b9ee..9f3e3f3 100644 --- a/tests/test_pwa.py +++ b/tests/test_pwa.py @@ -91,6 +91,13 @@ class ServiceWorkerTests(unittest.TestCase): self.assertIn("response.type", body) self.assertIn("!response.redirected", body) + def test_the_robots_file_is_served_but_never_cached_as_shell(self): + # The crawler rule is a file the server answers, and it is deliberately + # not part of the PWA shell: the worker caches only what the app needs + # offline (sections 31 point 6 and 32.7 point 6). + self.assertIn("/robots.txt", STATIC_FILES) + self.assertNotIn('"/robots.txt"', self.read_static("sw.js")) + def test_the_dashboard_registers_the_service_worker(self): body = self.read_static("app.js")