diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-03-07 20:38:17 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-03-07 20:38:17 +0100 |
commit | e3e526cbdab4f3c7408a846d15ff7d7edfe27016 (patch) | |
tree | 1da8673209f96ec7450c2626ef606d24e240d951 /tests | |
parent | c9dfd8ef9d25e1bf0764b68df00c98464307007c (diff) | |
download | fietsboek-e3e526cbdab4f3c7408a846d15ff7d7edfe27016.tar.gz fietsboek-e3e526cbdab4f3c7408a846d15ff7d7edfe27016.tar.bz2 fietsboek-e3e526cbdab4f3c7408a846d15ff7d7edfe27016.zip |
disable cache for transformer tests
Diffstat (limited to 'tests')
-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("/") |