From dee6073428b84596472f6fac969ff8661c2db831 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 1 Mar 2024 15:49:27 +0100 Subject: [PATCH] chore: add test to cover opening feature on load --- umap/tests/integration/test_map_preview.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/umap/tests/integration/test_map_preview.py b/umap/tests/integration/test_map_preview.py index 9176eba8..ca338956 100644 --- a/umap/tests/integration/test_map_preview.py +++ b/umap/tests/integration/test_map_preview.py @@ -73,3 +73,11 @@ def test_map_preview_can_change_styling_from_querystring(page, live_server, tile markers = page.locator(".leaflet-marker-icon .icon_container") expect(markers).to_have_count(1) expect(markers).to_have_css("background-color", "rgb(139, 0, 0)") + + +def test_can_open_feature_on_load(page, live_server, tilelayer): + page.goto( + f"{live_server.url}/map/?data={quote(json.dumps(GEOJSON))}&feature=Niagara Falls" + ) + # Popup is open. + expect(page.get_by_text("Niagara Falls")).to_be_visible()