Skip to content

Commit

Permalink
fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jschleic committed Dec 8, 2023
1 parent 69939ec commit 20bbbba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions umap/tests/integration/test_anonymous_owned_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_map_load_with_owner(anonymap, live_server, owner_session):
expect(save).to_be_visible()
add_marker = owner_session.get_by_title("Draw a marker")
expect(add_marker).to_be_visible()
edit_settings = owner_session.get_by_title("Edit map settings")
edit_settings = owner_session.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_permissions = owner_session.get_by_title("Update permissions and editors")
expect(edit_permissions).to_be_visible()
Expand Down Expand Up @@ -64,7 +64,7 @@ def test_map_load_with_anonymous_but_editable_layer(
expect(save).to_be_visible()
add_marker = page.get_by_title("Draw a marker")
expect(add_marker).to_be_visible()
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_hidden()
edit_permissions = page.get_by_title("Update permissions and editors")
expect(edit_permissions).to_be_hidden()
Expand Down
10 changes: 5 additions & 5 deletions umap/tests/integration/test_owned_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_map_update_with_owner(map, live_server, login):
expect(save).to_be_visible()
add_marker = page.get_by_title("Draw a marker")
expect(add_marker).to_be_visible()
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_permissions = page.get_by_title("Update permissions and editors")
expect(edit_permissions).to_be_visible()
Expand All @@ -67,7 +67,7 @@ def test_map_update_with_anonymous_but_editable_datalayer(
enable.click()
add_marker = page.get_by_title("Draw a marker")
expect(add_marker).to_be_visible()
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_hidden()
edit_permissions = page.get_by_title("Update permissions and editors")
expect(edit_permissions).to_be_hidden()
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_map_update_with_editor(map, live_server, login, user):
expect(save).to_be_visible()
add_marker = page.get_by_title("Draw a marker")
expect(add_marker).to_be_visible()
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_permissions = page.get_by_title("Update permissions and editors")
expect(edit_permissions).to_be_visible()
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_permissions_form_with_editor(map, datalayer, live_server, login, user):
def test_owner_has_delete_map_button(map, live_server, login):
page = login(map.owner)
page.goto(f"{live_server.url}{map.get_absolute_url()}?edit")
settings = page.get_by_title("Edit map settings")
settings = page.get_by_title("Edit map properties")
expect(settings).to_be_visible()
settings.click()
advanced = page.get_by_text("Advanced actions")
Expand All @@ -160,7 +160,7 @@ def test_editor_do_not_have_delete_map_button(map, live_server, login, user):
map.save()
page = login(user)
page.goto(f"{live_server.url}{map.get_absolute_url()}?edit")
settings = page.get_by_title("Edit map settings")
settings = page.get_by_title("Edit map properties")
expect(settings).to_be_visible()
settings.click()
advanced = page.get_by_text("Advanced actions")
Expand Down
6 changes: 3 additions & 3 deletions umap/tests/integration/test_picto.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_can_change_picto_at_map_level(map, live_server, page, pictos):
expect(marker).to_have_count(1)
# Should have default img
expect(marker).to_have_attribute("src", "/static/umap/img/marker.png")
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_settings.click()
shape_settings = page.get_by_text("Default shape properties")
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_can_use_remote_url_as_picto(map, live_server, page, pictos):
expect(marker).to_have_count(1)
# Should have default img
expect(marker).to_have_attribute("src", "/static/umap/img/marker.png")
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_settings.click()
shape_settings = page.get_by_text("Default shape properties")
Expand Down Expand Up @@ -186,7 +186,7 @@ def test_can_use_char_as_picto(map, live_server, page, pictos):
marker = page.locator(".umap-div-icon span")
# Should have default img, so not a span
expect(marker).to_have_count(0)
edit_settings = page.get_by_title("Edit map settings")
edit_settings = page.get_by_title("Edit map properties")
expect(edit_settings).to_be_visible()
edit_settings.click()
shape_settings = page.get_by_text("Default shape properties")
Expand Down

0 comments on commit 20bbbba

Please sign in to comment.