tests: Use the first visible name when testing.

There are now multiple elements accessed with the same CSS selector.
This commit is contained in:
Alexis Métaireau 2024-04-02 09:58:39 +02:00
parent d52a0c63f0
commit 3764bcfe3e

View file

@ -10,6 +10,6 @@ def test_can_edit_name(page, live_server, tilelayer):
name_input.click() name_input.click()
name_input.press("Control+a") name_input.press("Control+a")
name_input.fill("New map name") name_input.fill("New map name")
expect(page.locator(".umap-main-edit-toolbox .map-name")).to_have_text( expect(page.locator(".umap-main-edit-toolbox .map-name").nth(0)).to_have_text(
"New map name" "New map name"
) )