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 a3fa3199dc
commit 98196057a3
No known key found for this signature in database
GPG key ID: 1C21B876828E5FF2

View file

@ -10,6 +10,6 @@ def test_can_edit_name(page, live_server, tilelayer):
name_input.click()
name_input.press("Control+a")
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"
)