ci: mock OSM tiles requests in Playwright for speed

Also, cast the PLAYWRIGHT_TIMEOUT parameter.
This commit is contained in:
David Larlet 2024-04-18 14:08:57 -04:00
parent 9a46901795
commit 836c3361d7
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -5,7 +5,13 @@ import pytest
@pytest.fixture(autouse=True)
def set_timeout(context):
context.set_default_timeout(os.environ.get("PLAYWRIGHT_TIMEOUT", 7500))
context.set_default_timeout(int(os.environ.get("PLAYWRIGHT_TIMEOUT", 7500)))
@pytest.fixture(autouse=True)
def mock_osm_tiles(page):
if not bool(os.environ.get("PLAYWRIGHT_USE_TILES", False)):
page.route("*/**/osmfr/**", lambda route: route.fulfill())
@pytest.fixture