From e4ecb1a84700b2f300f1a0c909ff9282ab9e55cb Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 12 Mar 2024 22:37:50 +0100 Subject: [PATCH] chore: fix test This action is managed in the header panel, thus it's not a button. We may make all header actions proper buttons, but maybe in another PR ? --- umap/tests/integration/test_anonymous_owned_map.py | 2 +- umap/tests/integration/test_edit_datalayer.py | 2 +- umap/tests/integration/test_owned_map.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/umap/tests/integration/test_anonymous_owned_map.py b/umap/tests/integration/test_anonymous_owned_map.py index 2bb94f3b..119547eb 100644 --- a/umap/tests/integration/test_anonymous_owned_map.py +++ b/umap/tests/integration/test_anonymous_owned_map.py @@ -132,7 +132,7 @@ def test_can_change_perms_after_create(tilelayer, live_server, page): page.goto(f"{live_server.url}/en/map/new") # Create a layer page.get_by_title("See layers").click() - page.get_by_role("button", name="Add a layer").click() + page.get_by_title("Add a layer").click() page.locator("input[name=name]").fill("Layer 1") save = page.get_by_role("button", name="Save") expect(save).to_be_visible() diff --git a/umap/tests/integration/test_edit_datalayer.py b/umap/tests/integration/test_edit_datalayer.py index f0d4e50a..824a8327 100644 --- a/umap/tests/integration/test_edit_datalayer.py +++ b/umap/tests/integration/test_edit_datalayer.py @@ -17,7 +17,7 @@ def test_should_have_fieldset_for_layer_type_properties(page, live_server, tilel button.click() # Create a layer - page.get_by_role("button", name="Add a layer").click() + page.get_by_title("Add a layer").click() page.locator("input[name=name]").fill("Layer 1") select = page.locator("#umap-panel .umap-field-type select") diff --git a/umap/tests/integration/test_owned_map.py b/umap/tests/integration/test_owned_map.py index 4013fe86..31ea9087 100644 --- a/umap/tests/integration/test_owned_map.py +++ b/umap/tests/integration/test_owned_map.py @@ -187,7 +187,7 @@ def test_can_change_perms_after_create(tilelayer, live_server, login, user): page.goto(f"{live_server.url}/en/map/new") # Create a layer page.get_by_title("See layers").click() - page.get_by_role("button", name="Add a layer").click() + page.get_by_title("Add a layer").click() page.locator("input[name=name]").fill("Layer 1") save = page.get_by_role("button", name="Save") expect(save).to_be_visible()