diff options
Diffstat (limited to 'tests/playwright/test_transformers.py')
-rw-r--r-- | tests/playwright/test_transformers.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/playwright/test_transformers.py b/tests/playwright/test_transformers.py index 0b2e4de..a7638a0 100644 --- a/tests/playwright/test_transformers.py +++ b/tests/playwright/test_transformers.py @@ -5,6 +5,13 @@ from testutils import extract_and_upload from fietsboek import models +def disable_cache(page: Page): + """Disable HTTP caching for the given page.""" + # A little workaround, as there is no direct HTTP cache setting: + # Enabling routing disables http cache. + page.route("**", lambda route: route.continue_()) + + def test_transformer_zero_elevation_disabled(page: Page, playwright_helper, tmp_path, dbaccess): playwright_helper.login() @@ -46,6 +53,7 @@ def test_transformer_zero_elevation_enabled(page: Page, playwright_helper, tmp_p def test_transformer_zero_elevation_edited(page: Page, playwright_helper, tmp_path, dbaccess): + disable_cache(page) playwright_helper.login() page.goto("/") @@ -107,6 +115,7 @@ def test_transformer_steep_slope_enabled(page: Page, playwright_helper, tmp_path def test_transformer_steep_slope_edited(page: Page, playwright_helper, tmp_path, dbaccess): + disable_cache(page) playwright_helper.login() page.goto("/") |