umap-project 2.8.1__py3-none-any.whl → 2.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/admin.py +15 -2
- umap/asgi.py +12 -7
- umap/context_processors.py +1 -0
- umap/locale/br/LC_MESSAGES/django.mo +0 -0
- umap/locale/br/LC_MESSAGES/django.po +111 -67
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +110 -66
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +129 -85
- umap/locale/en/LC_MESSAGES/django.po +103 -60
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +114 -69
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +105 -61
- umap/locale/gl/LC_MESSAGES/django.mo +0 -0
- umap/locale/gl/LC_MESSAGES/django.po +216 -171
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +10 -10
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.po +142 -98
- umap/locale/nl/LC_MESSAGES/django.mo +0 -0
- umap/locale/nl/LC_MESSAGES/django.po +196 -151
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +115 -71
- umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh_TW/LC_MESSAGES/django.po +109 -65
- umap/management/commands/empty_trash.py +12 -1
- umap/migrations/0026_datalayer_modified_at_datalayer_share_status.py +26 -0
- umap/models.py +43 -13
- umap/settings/base.py +5 -2
- umap/static/umap/base.css +5 -2
- umap/static/umap/content.css +2 -22
- umap/static/umap/css/bar.css +39 -10
- umap/static/umap/css/contextmenu.css +14 -2
- umap/static/umap/css/form.css +33 -39
- umap/static/umap/css/icon.css +47 -5
- umap/static/umap/css/panel.css +20 -2
- umap/static/umap/css/popup.css +0 -1
- umap/static/umap/css/tooltip.css +33 -31
- umap/static/umap/img/16-white.svg +5 -3
- umap/static/umap/img/16.svg +1 -1
- umap/static/umap/img/24-white.svg +17 -16
- umap/static/umap/img/24.svg +29 -18
- umap/static/umap/img/providers/bitbucket.png +0 -0
- umap/static/umap/img/providers/github.png +0 -0
- umap/static/umap/img/providers/keycloak.png +0 -0
- umap/static/umap/img/providers/openstreetmap-oauth2.png +0 -0
- umap/static/umap/img/providers/twitter-oauth2.png +0 -0
- umap/static/umap/img/source/16-white.svg +6 -4
- umap/static/umap/img/source/16.svg +1 -1
- umap/static/umap/img/source/24-white.svg +20 -18
- umap/static/umap/img/source/24.svg +30 -19
- umap/static/umap/js/components/alerts/alert.js +4 -1
- umap/static/umap/js/modules/browser.js +8 -8
- umap/static/umap/js/modules/caption.js +30 -7
- umap/static/umap/js/modules/data/features.js +101 -56
- umap/static/umap/js/modules/data/layer.js +108 -83
- umap/static/umap/js/modules/form/builder.js +242 -0
- umap/static/umap/js/modules/form/fields.js +1346 -0
- umap/static/umap/js/modules/formatter.js +9 -8
- umap/static/umap/js/modules/help.js +20 -24
- umap/static/umap/js/modules/importer.js +6 -3
- umap/static/umap/js/modules/permissions.js +11 -6
- umap/static/umap/js/modules/rendering/icon.js +5 -1
- umap/static/umap/js/modules/rendering/layers/classified.js +12 -8
- umap/static/umap/js/modules/rendering/layers/cluster.js +11 -1
- umap/static/umap/js/modules/rendering/map.js +1 -23
- umap/static/umap/js/modules/rendering/ui.js +20 -38
- umap/static/umap/js/modules/rules.js +3 -2
- umap/static/umap/js/modules/saving.js +5 -0
- umap/static/umap/js/modules/schema.js +8 -6
- umap/static/umap/js/modules/share.js +3 -3
- umap/static/umap/js/modules/sync/engine.js +56 -26
- umap/static/umap/js/modules/sync/updaters.js +15 -6
- umap/static/umap/js/modules/sync/websocket.js +50 -37
- umap/static/umap/js/modules/tableeditor.js +3 -2
- umap/static/umap/js/modules/ui/bar.js +101 -9
- umap/static/umap/js/modules/ui/base.js +7 -24
- umap/static/umap/js/modules/ui/contextmenu.js +9 -2
- umap/static/umap/js/modules/ui/panel.js +5 -1
- umap/static/umap/js/modules/ui/tooltip.js +19 -11
- umap/static/umap/js/modules/umap.js +124 -71
- umap/static/umap/js/modules/utils.js +196 -12
- umap/static/umap/js/umap.controls.js +12 -354
- umap/static/umap/locale/am_ET.js +17 -5
- umap/static/umap/locale/am_ET.json +17 -5
- umap/static/umap/locale/ar.js +17 -5
- umap/static/umap/locale/ar.json +17 -5
- umap/static/umap/locale/ast.js +17 -5
- umap/static/umap/locale/ast.json +17 -5
- umap/static/umap/locale/bg.js +17 -5
- umap/static/umap/locale/bg.json +17 -5
- umap/static/umap/locale/br.js +33 -20
- umap/static/umap/locale/br.json +33 -20
- umap/static/umap/locale/ca.js +17 -5
- umap/static/umap/locale/ca.json +17 -5
- umap/static/umap/locale/cs_CZ.js +15 -5
- umap/static/umap/locale/cs_CZ.json +15 -5
- umap/static/umap/locale/da.js +17 -5
- umap/static/umap/locale/da.json +17 -5
- umap/static/umap/locale/de.js +17 -5
- umap/static/umap/locale/de.json +17 -5
- umap/static/umap/locale/el.js +63 -51
- umap/static/umap/locale/el.json +63 -51
- umap/static/umap/locale/en.js +15 -5
- umap/static/umap/locale/en.json +15 -5
- umap/static/umap/locale/en_US.json +17 -5
- umap/static/umap/locale/es.js +25 -13
- umap/static/umap/locale/es.json +25 -13
- umap/static/umap/locale/et.js +17 -5
- umap/static/umap/locale/et.json +17 -5
- umap/static/umap/locale/eu.js +17 -5
- umap/static/umap/locale/eu.json +17 -5
- umap/static/umap/locale/fa_IR.js +17 -5
- umap/static/umap/locale/fa_IR.json +17 -5
- umap/static/umap/locale/fi.js +17 -5
- umap/static/umap/locale/fi.json +17 -5
- umap/static/umap/locale/fr.js +16 -6
- umap/static/umap/locale/fr.json +16 -6
- umap/static/umap/locale/gl.js +357 -345
- umap/static/umap/locale/gl.json +357 -345
- umap/static/umap/locale/he.js +17 -5
- umap/static/umap/locale/he.json +17 -5
- umap/static/umap/locale/hr.js +17 -5
- umap/static/umap/locale/hr.json +17 -5
- umap/static/umap/locale/hu.js +39 -27
- umap/static/umap/locale/hu.json +39 -27
- umap/static/umap/locale/id.js +17 -5
- umap/static/umap/locale/id.json +17 -5
- umap/static/umap/locale/is.js +17 -5
- umap/static/umap/locale/is.json +17 -5
- umap/static/umap/locale/it.js +125 -113
- umap/static/umap/locale/it.json +125 -113
- umap/static/umap/locale/ja.js +17 -5
- umap/static/umap/locale/ja.json +17 -5
- umap/static/umap/locale/ko.js +17 -5
- umap/static/umap/locale/ko.json +17 -5
- umap/static/umap/locale/lt.js +17 -5
- umap/static/umap/locale/lt.json +17 -5
- umap/static/umap/locale/ms.js +17 -5
- umap/static/umap/locale/ms.json +17 -5
- umap/static/umap/locale/nl.js +132 -119
- umap/static/umap/locale/nl.json +132 -119
- umap/static/umap/locale/no.js +17 -5
- umap/static/umap/locale/no.json +17 -5
- umap/static/umap/locale/pl.js +17 -5
- umap/static/umap/locale/pl.json +17 -5
- umap/static/umap/locale/pl_PL.json +17 -5
- umap/static/umap/locale/pt.js +38 -25
- umap/static/umap/locale/pt.json +38 -25
- umap/static/umap/locale/pt_BR.js +17 -5
- umap/static/umap/locale/pt_BR.json +17 -5
- umap/static/umap/locale/pt_PT.js +17 -5
- umap/static/umap/locale/pt_PT.json +17 -5
- umap/static/umap/locale/ro.js +17 -5
- umap/static/umap/locale/ro.json +17 -5
- umap/static/umap/locale/ru.js +17 -5
- umap/static/umap/locale/ru.json +17 -5
- umap/static/umap/locale/sk_SK.js +17 -5
- umap/static/umap/locale/sk_SK.json +17 -5
- umap/static/umap/locale/sl.js +17 -5
- umap/static/umap/locale/sl.json +17 -5
- umap/static/umap/locale/sr.js +17 -5
- umap/static/umap/locale/sr.json +17 -5
- umap/static/umap/locale/sv.js +17 -5
- umap/static/umap/locale/sv.json +17 -5
- umap/static/umap/locale/th_TH.js +17 -5
- umap/static/umap/locale/th_TH.json +17 -5
- umap/static/umap/locale/tr.js +17 -5
- umap/static/umap/locale/tr.json +17 -5
- umap/static/umap/locale/uk_UA.js +17 -5
- umap/static/umap/locale/uk_UA.json +17 -5
- umap/static/umap/locale/vi.js +17 -5
- umap/static/umap/locale/vi.json +17 -5
- umap/static/umap/locale/vi_VN.json +17 -5
- umap/static/umap/locale/zh.js +17 -5
- umap/static/umap/locale/zh.json +17 -5
- umap/static/umap/locale/zh_CN.json +17 -5
- umap/static/umap/locale/zh_TW.Big5.json +17 -5
- umap/static/umap/locale/zh_TW.js +15 -5
- umap/static/umap/locale/zh_TW.json +15 -5
- umap/static/umap/map.css +29 -76
- umap/static/umap/nav.css +6 -3
- umap/static/umap/unittests/utils.js +14 -0
- umap/static/umap/vars.css +3 -0
- umap/static/umap/vendors/dompurify/purify.es.js +138 -354
- umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
- umap/static/umap/vendors/editable/Leaflet.Editable.js +1 -0
- umap/sync/__init__.py +0 -0
- umap/sync/app.py +187 -0
- umap/sync/payloads.py +56 -0
- umap/templates/auth/user_detail.html +4 -0
- umap/templates/auth/user_form.html +9 -6
- umap/templates/auth/user_stars.html +4 -0
- umap/templates/base.html +1 -1
- umap/templates/registration/login.html +2 -5
- umap/templates/umap/about.html +5 -0
- umap/templates/umap/about_summary.html +2 -2
- umap/templates/umap/components/provider.html +8 -0
- umap/templates/umap/content_footer.html +1 -1
- umap/templates/umap/css.html +0 -2
- umap/templates/umap/js.html +0 -4
- umap/templates/umap/map_detail.html +1 -1
- umap/templates/umap/password_change.html +4 -0
- umap/templates/umap/password_change_done.html +4 -0
- umap/templates/umap/search.html +4 -0
- umap/templates/umap/search_bar.html +1 -0
- umap/templates/umap/team_confirm_delete.html +4 -0
- umap/templates/umap/team_detail.html +4 -0
- umap/templates/umap/team_form.html +4 -0
- umap/templates/umap/user_dashboard.html +1 -1
- umap/templates/umap/user_teams.html +4 -0
- umap/tests/base.py +3 -1
- umap/tests/integration/conftest.py +16 -23
- umap/tests/integration/test_anonymous_owned_map.py +2 -2
- umap/tests/integration/test_basics.py +4 -7
- umap/tests/integration/test_caption.py +1 -0
- umap/tests/integration/test_categorized_layer.py +4 -8
- umap/tests/integration/test_choropleth.py +1 -1
- umap/tests/integration/test_conditional_rules.py +3 -3
- umap/tests/integration/test_draw_polygon.py +14 -22
- umap/tests/integration/test_draw_polyline.py +6 -14
- umap/tests/integration/test_edit_datalayer.py +11 -11
- umap/tests/integration/test_edit_map.py +30 -4
- umap/tests/integration/test_edit_marker.py +5 -5
- umap/tests/integration/test_edit_polygon.py +6 -6
- umap/tests/integration/test_features_id_generation.py +2 -6
- umap/tests/integration/test_import.py +115 -29
- umap/tests/integration/test_optimistic_merge.py +1 -0
- umap/tests/integration/test_owned_map.py +1 -1
- umap/tests/integration/test_picto.py +8 -8
- umap/tests/integration/test_save.py +3 -2
- umap/tests/integration/test_star.py +13 -9
- umap/tests/integration/test_tableeditor.py +8 -7
- umap/tests/integration/test_view_marker.py +10 -0
- umap/tests/integration/test_websocket_sync.py +239 -64
- umap/tests/settings.py +2 -0
- umap/tests/test_datalayer.py +2 -3
- umap/tests/test_datalayer_views.py +20 -1
- umap/tests/test_empty_trash.py +10 -3
- umap/tests/test_map_views.py +11 -0
- umap/utils.py +27 -11
- umap/views.py +37 -6
- {umap_project-2.8.1.dist-info → umap_project-2.9.0.dist-info}/METADATA +22 -22
- {umap_project-2.8.1.dist-info → umap_project-2.9.0.dist-info}/RECORD +249 -250
- {umap_project-2.8.1.dist-info → umap_project-2.9.0.dist-info}/WHEEL +1 -1
- umap/management/commands/run_websocket_server.py +0 -23
- umap/settings/local_s3.py +0 -45
- umap/static/umap/bitbucket.png +0 -0
- umap/static/umap/github.png +0 -0
- umap/static/umap/js/umap.forms.js +0 -1242
- umap/static/umap/keycloak.png +0 -0
- umap/static/umap/openstreetmap.png +0 -0
- umap/static/umap/twitter.png +0 -0
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +0 -468
- umap/static/umap/vendors/toolbar/leaflet.toolbar.css +0 -1
- umap/static/umap/vendors/toolbar/leaflet.toolbar.js +0 -1
- umap/tests/test_websocket_server.py +0 -22
- umap/websocket_server.py +0 -202
- {umap_project-2.8.1.dist-info → umap_project-2.9.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.8.1.dist-info → umap_project-2.9.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -57,7 +57,7 @@ def test_can_change_picto_at_map_level(openmap, live_server, page, pictos):
|
|
|
57
57
|
define.click()
|
|
58
58
|
# No picto defined yet, so recent should not be visible
|
|
59
59
|
expect(page.get_by_text("Recent")).to_be_hidden()
|
|
60
|
-
symbols = page.locator(".umap-pictogram-choice")
|
|
60
|
+
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
61
61
|
expect(symbols).to_have_count(2)
|
|
62
62
|
search = page.locator(".umap-pictogram-body input")
|
|
63
63
|
search.type("star")
|
|
@@ -90,8 +90,8 @@ def test_can_change_picto_at_datalayer_level(openmap, live_server, page, pictos)
|
|
|
90
90
|
expect(define).to_be_visible()
|
|
91
91
|
expect(undefine).to_be_hidden()
|
|
92
92
|
define.click()
|
|
93
|
-
# Map has an icon defined, so it
|
|
94
|
-
symbols = page.locator(".umap-pictogram-choice")
|
|
93
|
+
# Map has an icon defined, so it should open on Recent tab
|
|
94
|
+
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
95
95
|
expect(page.get_by_text("Recent")).to_be_visible()
|
|
96
96
|
expect(symbols).to_have_count(1)
|
|
97
97
|
symbol_tab = page.get_by_role("button", name="Symbol")
|
|
@@ -128,8 +128,8 @@ def test_can_change_picto_at_marker_level(openmap, live_server, page, pictos):
|
|
|
128
128
|
expect(define).to_be_visible()
|
|
129
129
|
expect(undefine).to_be_hidden()
|
|
130
130
|
define.click()
|
|
131
|
-
# Map has an icon defined, so it
|
|
132
|
-
symbols = page.locator(".umap-pictogram-choice")
|
|
131
|
+
# Map has an icon defined, so it shuold open on Recent tab
|
|
132
|
+
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
133
133
|
expect(page.get_by_text("Recent")).to_be_visible()
|
|
134
134
|
expect(symbols).to_have_count(1)
|
|
135
135
|
symbol_tab = page.get_by_role("button", name="Symbol")
|
|
@@ -180,7 +180,7 @@ def test_can_use_remote_url_as_picto(openmap, live_server, page, pictos):
|
|
|
180
180
|
expect(modify).to_be_visible()
|
|
181
181
|
modify.click()
|
|
182
182
|
# Should be on Recent tab
|
|
183
|
-
symbols = page.locator(".umap-pictogram-choice")
|
|
183
|
+
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
184
184
|
expect(page.get_by_text("Recent")).to_be_visible()
|
|
185
185
|
expect(symbols).to_have_count(1)
|
|
186
186
|
|
|
@@ -215,10 +215,10 @@ def test_can_use_char_as_picto(openmap, live_server, page, pictos):
|
|
|
215
215
|
close.click()
|
|
216
216
|
edit_settings.click()
|
|
217
217
|
shape_settings.click()
|
|
218
|
-
preview = page.locator(".umap-pictogram-choice")
|
|
218
|
+
preview = page.locator(".header .umap-pictogram-choice")
|
|
219
219
|
expect(preview).to_be_visible()
|
|
220
220
|
preview.click()
|
|
221
221
|
# Should be on URL tab
|
|
222
|
-
symbols = page.locator(".umap-pictogram-choice")
|
|
222
|
+
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
223
223
|
expect(page.get_by_text("Recent")).to_be_visible()
|
|
224
224
|
expect(symbols).to_have_count(1)
|
|
@@ -5,7 +5,7 @@ def test_reseting_map_would_remove_from_save_queue(
|
|
|
5
5
|
live_server, openmap, page, datalayer
|
|
6
6
|
):
|
|
7
7
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
8
|
-
page.get_by_role("
|
|
8
|
+
page.get_by_role("button", name="Edit map name and caption").click()
|
|
9
9
|
requests = []
|
|
10
10
|
|
|
11
11
|
def register_request(request):
|
|
@@ -20,10 +20,11 @@ def test_reseting_map_would_remove_from_save_queue(
|
|
|
20
20
|
page.get_by_role("button", name="OK").click()
|
|
21
21
|
page.wait_for_timeout(500)
|
|
22
22
|
page.get_by_role("button", name="Edit").click()
|
|
23
|
-
page.get_by_role("
|
|
23
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
24
24
|
page.get_by_role("button", name="Edit", exact=True).click()
|
|
25
25
|
page.locator('input[name="name"]').click()
|
|
26
26
|
page.locator('input[name="name"]').fill("new datalayer name")
|
|
27
|
+
page.wait_for_timeout(300) # Time of the Input debounce
|
|
27
28
|
with page.expect_response(re.compile(".*/datalayer/update/.*")):
|
|
28
29
|
page.get_by_role("button", name="Save").click()
|
|
29
30
|
assert len(requests) == 1
|
|
@@ -8,20 +8,24 @@ from umap.models import Star
|
|
|
8
8
|
pytestmark = pytest.mark.django_db
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def
|
|
11
|
+
def test_star_button_is_active_if_logged_in(map, live_server, page, login, user):
|
|
12
12
|
login(user)
|
|
13
13
|
assert not Star.objects.count()
|
|
14
14
|
page.goto(f"{live_server.url}{map.get_absolute_url()}")
|
|
15
|
-
page.get_by_title("
|
|
16
|
-
|
|
17
|
-
expect(
|
|
15
|
+
page.get_by_title("About").click()
|
|
16
|
+
button = page.locator(".icon-star")
|
|
17
|
+
expect(button).to_be_visible()
|
|
18
18
|
with page.expect_response(re.compile(".*/star/")):
|
|
19
|
-
|
|
19
|
+
button.click()
|
|
20
|
+
expect(button).to_be_hidden()
|
|
21
|
+
# Button has changed
|
|
22
|
+
expect(page.locator(".icon-starred")).to_be_visible()
|
|
20
23
|
assert Star.objects.count() == 1
|
|
21
24
|
|
|
22
25
|
|
|
23
|
-
def
|
|
26
|
+
def test_star_button_inctive_if_not_logged_in(map, live_server, page):
|
|
24
27
|
page.goto(f"{live_server.url}{map.get_absolute_url()}")
|
|
25
|
-
page.get_by_title("
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
page.get_by_title("About").click()
|
|
29
|
+
button = page.locator(".icon-star")
|
|
30
|
+
button.click()
|
|
31
|
+
expect(page.get_by_text("You must be logged in")).to_be_visible()
|
|
@@ -67,13 +67,14 @@ DATALAYER_DATA = {
|
|
|
67
67
|
|
|
68
68
|
def test_table_editor(live_server, openmap, datalayer, page):
|
|
69
69
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
70
|
-
page.get_by_role("
|
|
70
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
71
71
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
72
72
|
page.get_by_text("Add a new property").click()
|
|
73
73
|
page.locator("dialog").locator("input").fill("newprop")
|
|
74
74
|
page.locator("dialog").get_by_role("button", name="OK").click()
|
|
75
75
|
page.locator("td").nth(2).dblclick()
|
|
76
76
|
page.locator('input[name="newprop"]').fill("newvalue")
|
|
77
|
+
page.wait_for_timeout(300) # Time for the input debounce.
|
|
77
78
|
page.keyboard.press("Enter")
|
|
78
79
|
page.locator("thead button[data-property=name]").click()
|
|
79
80
|
page.get_by_role("button", name="Delete this column").click()
|
|
@@ -88,7 +89,7 @@ def test_table_editor(live_server, openmap, datalayer, page):
|
|
|
88
89
|
|
|
89
90
|
def test_cannot_add_existing_property_name(live_server, openmap, datalayer, page):
|
|
90
91
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
91
|
-
page.get_by_role("
|
|
92
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
92
93
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
93
94
|
page.get_by_text("Add a new property").click()
|
|
94
95
|
page.locator("dialog").locator("input").fill("name")
|
|
@@ -101,7 +102,7 @@ def test_cannot_add_existing_property_name(live_server, openmap, datalayer, page
|
|
|
101
102
|
|
|
102
103
|
def test_cannot_add_property_with_a_dot(live_server, openmap, datalayer, page):
|
|
103
104
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
104
|
-
page.get_by_role("
|
|
105
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
105
106
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
106
107
|
page.get_by_text("Add a new property").click()
|
|
107
108
|
page.locator("dialog").locator("input").fill("foo.bar")
|
|
@@ -114,7 +115,7 @@ def test_cannot_add_property_with_a_dot(live_server, openmap, datalayer, page):
|
|
|
114
115
|
|
|
115
116
|
def test_rename_property(live_server, openmap, datalayer, page):
|
|
116
117
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
117
|
-
page.get_by_role("
|
|
118
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
118
119
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
119
120
|
expect(page.locator("table th button[data-property=name]")).to_have_count(1)
|
|
120
121
|
page.locator("thead button[data-property=name]").click()
|
|
@@ -128,7 +129,7 @@ def test_rename_property(live_server, openmap, datalayer, page):
|
|
|
128
129
|
def test_delete_selected_rows(live_server, openmap, page):
|
|
129
130
|
DataLayerFactory(map=openmap, data=DATALAYER_DATA)
|
|
130
131
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit#6/48.093/1.890")
|
|
131
|
-
page.get_by_role("
|
|
132
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
132
133
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
133
134
|
expect(page.locator("tbody tr")).to_have_count(4)
|
|
134
135
|
expect(page.locator(".leaflet-marker-icon")).to_have_count(4)
|
|
@@ -142,7 +143,7 @@ def test_delete_selected_rows(live_server, openmap, page):
|
|
|
142
143
|
def test_delete_all_rows(live_server, openmap, page):
|
|
143
144
|
DataLayerFactory(map=openmap, data=DATALAYER_DATA)
|
|
144
145
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit#6/48.093/1.890")
|
|
145
|
-
page.get_by_role("
|
|
146
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
146
147
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
147
148
|
expect(page.locator("tbody tr")).to_have_count(4)
|
|
148
149
|
expect(page.locator(".leaflet-marker-icon")).to_have_count(4)
|
|
@@ -158,7 +159,7 @@ def test_filter_and_delete_rows(live_server, openmap, page):
|
|
|
158
159
|
panel = page.locator(".panel.left.on")
|
|
159
160
|
table = page.locator(".panel.full table")
|
|
160
161
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit#6/48.093/1.890")
|
|
161
|
-
page.get_by_role("
|
|
162
|
+
page.get_by_role("button", name="Manage layers").click()
|
|
162
163
|
page.locator(".panel").get_by_title("Edit properties in a table").click()
|
|
163
164
|
expect(table.locator("tbody tr")).to_have_count(4)
|
|
164
165
|
expect(page.locator(".leaflet-marker-icon")).to_have_count(4)
|
|
@@ -181,3 +181,13 @@ def test_only_visible_markers_are_added_to_dom(live_server, map, page):
|
|
|
181
181
|
)
|
|
182
182
|
expect(markers).to_have_count(1)
|
|
183
183
|
expect(tooltips).to_have_count(1)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def test_should_display_tooltip_on_hover(live_server, map, page, bootstrap):
|
|
187
|
+
map.settings["properties"]["showLabel"] = None
|
|
188
|
+
map.settings["properties"]["labelKey"] = "Foo {name}"
|
|
189
|
+
map.save()
|
|
190
|
+
page.goto(f"{live_server.url}{map.get_absolute_url()}")
|
|
191
|
+
expect(page.get_by_text("Foo test marker")).to_be_hidden()
|
|
192
|
+
page.locator(".leaflet-marker-icon").hover()
|
|
193
|
+
expect(page.get_by_text("Foo test marker")).to_be_visible()
|