umap-project 3.4.0b1__py3-none-any.whl → 3.4.0b3__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.
- umap/__init__.py +1 -1
- umap/context_processors.py +1 -1
- umap/locale/da/LC_MESSAGES/django.mo +0 -0
- umap/locale/da/LC_MESSAGES/django.po +2 -2
- umap/locale/en/LC_MESSAGES/django.po +14 -14
- umap/migrations/0018_datalayer_uuid.py +1 -1
- umap/models.py +7 -3
- umap/settings/local.py.sample +1 -1
- umap/static/umap/css/form.css +2 -2
- umap/static/umap/js/components/base.js +1 -1
- umap/static/umap/js/modules/browser.js +4 -4
- umap/static/umap/js/modules/data/features.js +1 -1
- umap/static/umap/js/modules/data/fields.js +280 -0
- umap/static/umap/js/modules/data/layer.js +7 -9
- umap/static/umap/js/modules/domutils.js +3 -3
- umap/static/umap/js/modules/filters.js +7 -7
- umap/static/umap/js/modules/help.js +1 -1
- umap/static/umap/js/modules/i18n.js +1 -1
- umap/static/umap/js/modules/importer.js +1 -1
- umap/static/umap/js/modules/managers.js +0 -264
- umap/static/umap/js/modules/rendering/controls.js +4 -2
- umap/static/umap/js/modules/rendering/layers/classified.js +1 -1
- umap/static/umap/js/modules/rendering/layers/heat.js +26 -21
- umap/static/umap/js/modules/rendering/template.js +4 -4
- umap/static/umap/js/modules/ui/dialog.js +10 -1
- umap/static/umap/js/modules/ui/panel.js +2 -2
- umap/static/umap/js/modules/umap.js +9 -4
- umap/static/umap/js/modules/utils.js +1 -1
- umap/static/umap/locale/am_ET.js +14 -5
- umap/static/umap/locale/am_ET.json +14 -5
- umap/static/umap/locale/ar.js +14 -5
- umap/static/umap/locale/ar.json +14 -5
- umap/static/umap/locale/ast.js +14 -5
- umap/static/umap/locale/ast.json +14 -5
- umap/static/umap/locale/bg.js +14 -5
- umap/static/umap/locale/bg.json +14 -5
- umap/static/umap/locale/br.js +1 -1
- umap/static/umap/locale/br.json +1 -1
- umap/static/umap/locale/ca.js +14 -5
- umap/static/umap/locale/ca.json +14 -5
- umap/static/umap/locale/cs_CZ.js +14 -5
- umap/static/umap/locale/cs_CZ.json +14 -5
- umap/static/umap/locale/da.js +48 -39
- umap/static/umap/locale/da.json +48 -39
- umap/static/umap/locale/de.js +14 -5
- umap/static/umap/locale/de.json +14 -5
- umap/static/umap/locale/el.js +14 -5
- umap/static/umap/locale/el.json +14 -5
- umap/static/umap/locale/en.js +14 -5
- umap/static/umap/locale/en.json +14 -5
- umap/static/umap/locale/en_US.json +14 -5
- umap/static/umap/locale/es.js +49 -40
- umap/static/umap/locale/es.json +49 -40
- umap/static/umap/locale/et.js +14 -5
- umap/static/umap/locale/et.json +14 -5
- umap/static/umap/locale/eu.js +14 -5
- umap/static/umap/locale/eu.json +14 -5
- umap/static/umap/locale/fa_IR.js +14 -5
- umap/static/umap/locale/fa_IR.json +14 -5
- umap/static/umap/locale/fi.js +14 -5
- umap/static/umap/locale/fi.json +14 -5
- umap/static/umap/locale/fr.js +14 -5
- umap/static/umap/locale/fr.json +14 -5
- umap/static/umap/locale/gl.js +14 -5
- umap/static/umap/locale/gl.json +14 -5
- umap/static/umap/locale/he.js +14 -5
- umap/static/umap/locale/he.json +14 -5
- umap/static/umap/locale/hr.js +14 -5
- umap/static/umap/locale/hr.json +14 -5
- umap/static/umap/locale/hu.js +56 -47
- umap/static/umap/locale/hu.json +56 -47
- umap/static/umap/locale/id.js +14 -5
- umap/static/umap/locale/id.json +14 -5
- umap/static/umap/locale/is.js +14 -5
- umap/static/umap/locale/is.json +14 -5
- umap/static/umap/locale/it.js +14 -5
- umap/static/umap/locale/it.json +14 -5
- umap/static/umap/locale/ja.js +14 -5
- umap/static/umap/locale/ja.json +14 -5
- umap/static/umap/locale/ko.js +14 -5
- umap/static/umap/locale/ko.json +14 -5
- umap/static/umap/locale/lt.js +14 -5
- umap/static/umap/locale/lt.json +14 -5
- umap/static/umap/locale/ms.js +14 -5
- umap/static/umap/locale/ms.json +14 -5
- umap/static/umap/locale/nl.js +14 -5
- umap/static/umap/locale/nl.json +14 -5
- umap/static/umap/locale/no.js +14 -5
- umap/static/umap/locale/no.json +14 -5
- umap/static/umap/locale/pl.js +14 -5
- umap/static/umap/locale/pl.json +14 -5
- umap/static/umap/locale/pl_PL.json +14 -5
- umap/static/umap/locale/pt.js +14 -5
- umap/static/umap/locale/pt.json +14 -5
- umap/static/umap/locale/pt_BR.js +14 -5
- umap/static/umap/locale/pt_BR.json +14 -5
- umap/static/umap/locale/pt_PT.js +14 -5
- umap/static/umap/locale/pt_PT.json +14 -5
- umap/static/umap/locale/ro.js +14 -5
- umap/static/umap/locale/ro.json +14 -5
- umap/static/umap/locale/ru.js +14 -5
- umap/static/umap/locale/ru.json +14 -5
- umap/static/umap/locale/si.js +1 -1
- umap/static/umap/locale/si.json +1 -1
- umap/static/umap/locale/sk_SK.js +14 -5
- umap/static/umap/locale/sk_SK.json +14 -5
- umap/static/umap/locale/sl.js +14 -5
- umap/static/umap/locale/sl.json +14 -5
- umap/static/umap/locale/sr.js +14 -5
- umap/static/umap/locale/sr.json +14 -5
- umap/static/umap/locale/sv.js +14 -5
- umap/static/umap/locale/sv.json +14 -5
- umap/static/umap/locale/th_TH.js +14 -5
- umap/static/umap/locale/th_TH.json +14 -5
- umap/static/umap/locale/tr.js +14 -5
- umap/static/umap/locale/tr.json +14 -5
- umap/static/umap/locale/uk_UA.js +14 -5
- umap/static/umap/locale/uk_UA.json +14 -5
- umap/static/umap/locale/vi.js +14 -5
- umap/static/umap/locale/vi.json +14 -5
- umap/static/umap/locale/vi_VN.json +14 -5
- umap/static/umap/locale/zh.js +14 -5
- umap/static/umap/locale/zh.json +14 -5
- umap/static/umap/locale/zh_CN.json +14 -5
- umap/static/umap/locale/zh_TW.Big5.json +14 -5
- umap/static/umap/locale/zh_TW.js +47 -38
- umap/static/umap/locale/zh_TW.json +47 -38
- umap/static/umap/map.css +3 -3
- umap/templates/umap/login_popup_end.html +2 -2
- umap/tests/integration/conftest.py +8 -0
- umap/tests/integration/test_anonymous_owned_map.py +1 -1
- umap/tests/integration/test_conditional_rules.py +1 -1
- umap/tests/integration/test_filters.py +6 -7
- umap/tests/integration/test_map_preview.py +1 -1
- umap/tests/integration/test_picto.py +1 -1
- umap/tests/integration/test_save.py +1 -1
- umap/tests/integration/test_websocket_sync.py +63 -19
- umap/tests/test_dashboard.py +1 -1
- umap/tests/test_statics.py +2 -2
- umap/tests/test_views.py +1 -1
- umap/utils.py +2 -2
- {umap_project-3.4.0b1.dist-info → umap_project-3.4.0b3.dist-info}/METADATA +4 -4
- {umap_project-3.4.0b1.dist-info → umap_project-3.4.0b3.dist-info}/RECORD +146 -145
- {umap_project-3.4.0b1.dist-info → umap_project-3.4.0b3.dist-info}/WHEEL +0 -0
- {umap_project-3.4.0b1.dist-info → umap_project-3.4.0b3.dist-info}/entry_points.txt +0 -0
- {umap_project-3.4.0b1.dist-info → umap_project-3.4.0b3.dist-info}/licenses/LICENSE +0 -0
|
@@ -434,8 +434,10 @@ def test_can_create_filter_from_new_field(live_server, page, openmap):
|
|
|
434
434
|
page.get_by_role("heading", name="Manage Fields").click()
|
|
435
435
|
page.get_by_role("button", name="Add a new field").click()
|
|
436
436
|
page.get_by_role("textbox", name="Field Name ✔").fill("foobar")
|
|
437
|
+
page.get_by_label("Field Type").select_option("Boolean")
|
|
437
438
|
page.get_by_role("button", name="Add filter for this field").click()
|
|
438
439
|
page.get_by_role("textbox", name="Human readable name of the").fill("Foo Bar")
|
|
440
|
+
expect(page.get_by_text("Yes/No")).to_be_checked()
|
|
439
441
|
page.wait_for_timeout(300) # Input throttling.
|
|
440
442
|
page.get_by_text("Edit this field").click()
|
|
441
443
|
expect(page.locator(".umap-filter span").filter(has_text="Foo Bar")).to_be_visible()
|
|
@@ -461,7 +463,7 @@ def test_can_create_filter_from_new_field(live_server, page, openmap):
|
|
|
461
463
|
},
|
|
462
464
|
{
|
|
463
465
|
"key": "foobar",
|
|
464
|
-
"type": "
|
|
466
|
+
"type": "Boolean",
|
|
465
467
|
},
|
|
466
468
|
]
|
|
467
469
|
|
|
@@ -469,7 +471,7 @@ def test_can_create_filter_from_new_field(live_server, page, openmap):
|
|
|
469
471
|
{
|
|
470
472
|
"fieldKey": "foobar",
|
|
471
473
|
"label": "Foo Bar",
|
|
472
|
-
"widget": "
|
|
474
|
+
"widget": "Switch",
|
|
473
475
|
},
|
|
474
476
|
]
|
|
475
477
|
|
|
@@ -485,8 +487,7 @@ def test_can_create_new_filter_on_map_from_panel(live_server, page, openmap):
|
|
|
485
487
|
DataLayerFactory(map=openmap, data=DATALAYER_DATA1)
|
|
486
488
|
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
|
|
487
489
|
page.get_by_role("button", name="Manage filters").click()
|
|
488
|
-
page.
|
|
489
|
-
page.get_by_role("button", name="Add filter").click()
|
|
490
|
+
page.get_by_role("button", name="Add filter").first.click()
|
|
490
491
|
page.get_by_label("Filter on").select_option("foobar")
|
|
491
492
|
page.get_by_role("textbox", name="Human readable name").fill("Foo Bar")
|
|
492
493
|
page.wait_for_timeout(300)
|
|
@@ -515,8 +516,7 @@ def test_can_create_new_filter_on_datalayer_from_panel(live_server, page, openma
|
|
|
515
516
|
f"{live_server.url}{openmap.get_absolute_url()}?edit&onLoadPanel=datafilters"
|
|
516
517
|
)
|
|
517
518
|
page.get_by_role("button", name="Manage filters").click()
|
|
518
|
-
page.
|
|
519
|
-
page.get_by_role("button", name="Add filter").click()
|
|
519
|
+
page.get_by_role("button", name="Add filter").nth(1).click()
|
|
520
520
|
expect(page.get_by_label("Apply filter to")).to_have_value(f"layer:{datalayer.pk}")
|
|
521
521
|
page.get_by_label("Filter on").select_option("mynumber")
|
|
522
522
|
page.get_by_role("textbox", name="Human readable name of the").fill("Foo Bar")
|
|
@@ -598,7 +598,6 @@ def test_filter_with_enum(live_server, openmap, page):
|
|
|
598
598
|
f"{live_server.url}{openmap.get_absolute_url()}?edit&onLoadPanel=datafilters#6/48.948/1.670"
|
|
599
599
|
)
|
|
600
600
|
page.get_by_role("button", name="Manage filters").click()
|
|
601
|
-
page.get_by_text("Calque 1 (single layer)").click()
|
|
602
601
|
page.get_by_role("button", name="Add filter").click()
|
|
603
602
|
page.get_by_label("Filter on").select_option("products")
|
|
604
603
|
page.get_by_role("button", name="OK").click()
|
|
@@ -58,7 +58,7 @@ def test_map_preview_can_load_remote_geojson(page, live_server, tilelayer):
|
|
|
58
58
|
expect(markers).to_have_count(1)
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
def
|
|
61
|
+
def test_map_preview_can_load_multiple_remote_geojson(page, live_server, tilelayer):
|
|
62
62
|
def handle(route):
|
|
63
63
|
if "2" in route.request.url:
|
|
64
64
|
route.fulfill(json=GEOJSON2)
|
|
@@ -136,7 +136,7 @@ def test_can_change_picto_at_marker_level(openmap, live_server, page, pictos):
|
|
|
136
136
|
expect(define).to_be_visible()
|
|
137
137
|
expect(undefine).to_be_hidden()
|
|
138
138
|
define.click()
|
|
139
|
-
# Map has an icon defined, so it
|
|
139
|
+
# Map has an icon defined, so it should open on Recent tab
|
|
140
140
|
symbols = page.locator(".umap-pictogram-body .umap-pictogram-choice")
|
|
141
141
|
expect(page.get_by_text("Recent")).to_be_visible()
|
|
142
142
|
expect(symbols).to_have_count(1)
|
|
@@ -25,7 +25,9 @@ def setup_function():
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@pytest.mark.xdist_group(name="websockets")
|
|
28
|
-
def test_websocket_connection_can_sync_markers(
|
|
28
|
+
def test_websocket_connection_can_sync_markers(
|
|
29
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
30
|
+
):
|
|
29
31
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
30
32
|
map.settings["properties"]["syncEnabled"] = True
|
|
31
33
|
map.save()
|
|
@@ -34,8 +36,10 @@ def test_websocket_connection_can_sync_markers(new_page, asgi_live_server, tilel
|
|
|
34
36
|
# Create two tabs
|
|
35
37
|
peerA = new_page("Page A")
|
|
36
38
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
39
|
+
wait_for_loaded(peerA)
|
|
37
40
|
peerB = new_page("Page B")
|
|
38
41
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
42
|
+
wait_for_loaded(peerB)
|
|
39
43
|
|
|
40
44
|
a_marker_pane = peerA.locator(".leaflet-marker-pane > div")
|
|
41
45
|
b_marker_pane = peerB.locator(".leaflet-marker-pane > div")
|
|
@@ -91,17 +95,21 @@ def test_websocket_connection_can_sync_markers(new_page, asgi_live_server, tilel
|
|
|
91
95
|
|
|
92
96
|
|
|
93
97
|
@pytest.mark.xdist_group(name="websockets")
|
|
94
|
-
def test_websocket_connection_can_sync_polygons(
|
|
98
|
+
def test_websocket_connection_can_sync_polygons(
|
|
99
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
100
|
+
):
|
|
95
101
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
96
102
|
map.settings["properties"]["syncEnabled"] = True
|
|
97
103
|
map.save()
|
|
98
104
|
DataLayerFactory(map=map, data={})
|
|
99
105
|
|
|
100
106
|
# Create two tabs
|
|
101
|
-
peerA =
|
|
107
|
+
peerA = new_page("Page A")
|
|
102
108
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
103
|
-
|
|
109
|
+
wait_for_loaded(peerA)
|
|
110
|
+
peerB = new_page("Page B")
|
|
104
111
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
112
|
+
wait_for_loaded(peerB)
|
|
105
113
|
|
|
106
114
|
b_map_el = peerB.locator("#map")
|
|
107
115
|
|
|
@@ -171,7 +179,7 @@ def test_websocket_connection_can_sync_polygons(context, asgi_live_server, tilel
|
|
|
171
179
|
|
|
172
180
|
@pytest.mark.xdist_group(name="websockets")
|
|
173
181
|
def test_websocket_connection_can_sync_map_properties(
|
|
174
|
-
new_page, asgi_live_server, tilelayer
|
|
182
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
175
183
|
):
|
|
176
184
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
177
185
|
map.settings["properties"]["syncEnabled"] = True
|
|
@@ -181,8 +189,10 @@ def test_websocket_connection_can_sync_map_properties(
|
|
|
181
189
|
# Create two tabs
|
|
182
190
|
peerA = new_page()
|
|
183
191
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
192
|
+
wait_for_loaded(peerA)
|
|
184
193
|
peerB = new_page()
|
|
185
194
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
195
|
+
wait_for_loaded(peerB)
|
|
186
196
|
|
|
187
197
|
# Name change is synced
|
|
188
198
|
peerA.get_by_role("button", name="Edit map name and caption").click()
|
|
@@ -205,7 +215,7 @@ def test_websocket_connection_can_sync_map_properties(
|
|
|
205
215
|
|
|
206
216
|
@pytest.mark.xdist_group(name="websockets")
|
|
207
217
|
def test_websocket_connection_can_sync_datalayer_properties(
|
|
208
|
-
new_page, asgi_live_server, tilelayer
|
|
218
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
209
219
|
):
|
|
210
220
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
211
221
|
map.settings["properties"]["syncEnabled"] = True
|
|
@@ -215,8 +225,10 @@ def test_websocket_connection_can_sync_datalayer_properties(
|
|
|
215
225
|
# Create two tabs
|
|
216
226
|
peerA = new_page()
|
|
217
227
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
228
|
+
wait_for_loaded(peerA)
|
|
218
229
|
peerB = new_page()
|
|
219
230
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
231
|
+
wait_for_loaded(peerB)
|
|
220
232
|
|
|
221
233
|
# Layer addition, name and type are synced
|
|
222
234
|
peerA.get_by_role("button", name="Manage layers").click()
|
|
@@ -236,7 +248,7 @@ def test_websocket_connection_can_sync_datalayer_properties(
|
|
|
236
248
|
|
|
237
249
|
@pytest.mark.xdist_group(name="websockets")
|
|
238
250
|
def test_websocket_connection_can_sync_cloned_polygons(
|
|
239
|
-
|
|
251
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
240
252
|
):
|
|
241
253
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
242
254
|
map.settings["properties"]["syncEnabled"] = True
|
|
@@ -244,10 +256,12 @@ def test_websocket_connection_can_sync_cloned_polygons(
|
|
|
244
256
|
DataLayerFactory(map=map, data={})
|
|
245
257
|
|
|
246
258
|
# Create two tabs
|
|
247
|
-
peerA =
|
|
259
|
+
peerA = new_page("Page A")
|
|
248
260
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
249
|
-
|
|
261
|
+
wait_for_loaded(peerA)
|
|
262
|
+
peerB = new_page("Page B")
|
|
250
263
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
264
|
+
wait_for_loaded(peerB)
|
|
251
265
|
|
|
252
266
|
b_map_el = peerB.locator("#map")
|
|
253
267
|
|
|
@@ -297,7 +311,7 @@ def test_websocket_connection_can_sync_cloned_polygons(
|
|
|
297
311
|
|
|
298
312
|
@pytest.mark.xdist_group(name="websockets")
|
|
299
313
|
def test_websocket_connection_can_sync_late_joining_peer(
|
|
300
|
-
new_page, asgi_live_server, tilelayer
|
|
314
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
301
315
|
):
|
|
302
316
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
303
317
|
map.settings["properties"]["syncEnabled"] = True
|
|
@@ -307,6 +321,7 @@ def test_websocket_connection_can_sync_late_joining_peer(
|
|
|
307
321
|
# Create first peer (A) and have it join immediately
|
|
308
322
|
peerA = new_page("Page A")
|
|
309
323
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
324
|
+
wait_for_loaded(peerA)
|
|
310
325
|
|
|
311
326
|
# Add a marker from peer A
|
|
312
327
|
a_create_marker = peerA.get_by_title("Draw a marker")
|
|
@@ -333,6 +348,7 @@ def test_websocket_connection_can_sync_late_joining_peer(
|
|
|
333
348
|
# Now create peer B and have it join
|
|
334
349
|
peerB = new_page("Page B")
|
|
335
350
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
351
|
+
wait_for_loaded(peerB)
|
|
336
352
|
|
|
337
353
|
# Check if peer B has received all the updates
|
|
338
354
|
b_marker_pane = peerB.locator(".leaflet-marker-pane > div")
|
|
@@ -357,7 +373,7 @@ def test_websocket_connection_can_sync_late_joining_peer(
|
|
|
357
373
|
|
|
358
374
|
|
|
359
375
|
@pytest.mark.xdist_group(name="websockets")
|
|
360
|
-
def test_should_sync_datalayers(new_page, asgi_live_server, tilelayer):
|
|
376
|
+
def test_should_sync_datalayers(new_page, asgi_live_server, tilelayer, wait_for_loaded):
|
|
361
377
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
362
378
|
map.settings["properties"]["syncEnabled"] = True
|
|
363
379
|
map.save()
|
|
@@ -367,8 +383,10 @@ def test_should_sync_datalayers(new_page, asgi_live_server, tilelayer):
|
|
|
367
383
|
# Create two tabs
|
|
368
384
|
peerA = new_page("Page A")
|
|
369
385
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
386
|
+
wait_for_loaded(peerA)
|
|
370
387
|
peerB = new_page("Page B")
|
|
371
388
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
389
|
+
wait_for_loaded(peerB)
|
|
372
390
|
|
|
373
391
|
# Create a new layer from peerA
|
|
374
392
|
peerA.get_by_role("button", name="Manage layers").click()
|
|
@@ -398,7 +416,7 @@ def test_should_sync_datalayers(new_page, asgi_live_server, tilelayer):
|
|
|
398
416
|
peerA.locator("#map").click()
|
|
399
417
|
|
|
400
418
|
# Make sure this new marker is in Layer 2 for peerB
|
|
401
|
-
# Show features for this layer in the
|
|
419
|
+
# Show features for this layer in the browser.
|
|
402
420
|
peerB.locator("summary").filter(has_text="Layer 2").click()
|
|
403
421
|
expect(peerB.locator("li").filter(has_text="Layer 2")).to_be_visible()
|
|
404
422
|
peerB.locator(".panel.left").get_by_role("button", name="Show/hide layer").nth(
|
|
@@ -433,7 +451,9 @@ def test_should_sync_datalayers(new_page, asgi_live_server, tilelayer):
|
|
|
433
451
|
|
|
434
452
|
|
|
435
453
|
@pytest.mark.xdist_group(name="websockets")
|
|
436
|
-
def test_should_sync_datalayers_delete(
|
|
454
|
+
def test_should_sync_datalayers_delete(
|
|
455
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
456
|
+
):
|
|
437
457
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
438
458
|
map.settings["properties"]["syncEnabled"] = True
|
|
439
459
|
map.save()
|
|
@@ -473,8 +493,10 @@ def test_should_sync_datalayers_delete(new_page, asgi_live_server, tilelayer):
|
|
|
473
493
|
# Create two tabs
|
|
474
494
|
peerA = new_page("Page A")
|
|
475
495
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
496
|
+
wait_for_loaded(peerA)
|
|
476
497
|
peerB = new_page("Page B")
|
|
477
498
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
499
|
+
wait_for_loaded(peerB)
|
|
478
500
|
|
|
479
501
|
peerA.get_by_role("button", name="Open browser").click()
|
|
480
502
|
expect(peerA.locator(".panel").get_by_text("datalayer 1")).to_be_visible()
|
|
@@ -496,10 +518,13 @@ def test_should_sync_datalayers_delete(new_page, asgi_live_server, tilelayer):
|
|
|
496
518
|
|
|
497
519
|
|
|
498
520
|
@pytest.mark.xdist_group(name="websockets")
|
|
499
|
-
def test_create_and_sync_map(
|
|
521
|
+
def test_create_and_sync_map(
|
|
522
|
+
new_page, asgi_live_server, tilelayer, login, user, wait_for_loaded
|
|
523
|
+
):
|
|
500
524
|
# Create a syncable map with peerA
|
|
501
525
|
peerA = login(user, prefix="Page A")
|
|
502
526
|
peerA.goto(f"{asgi_live_server.url}/en/map/new/")
|
|
527
|
+
wait_for_loaded(peerA)
|
|
503
528
|
peerA.get_by_role("button", name="Map advanced properties").click()
|
|
504
529
|
expect(peerA.get_by_text("Real-time collaboration", exact=True)).to_be_hidden()
|
|
505
530
|
with peerA.expect_response(re.compile("./map/create/.*")):
|
|
@@ -519,6 +544,7 @@ def test_create_and_sync_map(new_page, asgi_live_server, tilelayer, login, user)
|
|
|
519
544
|
# Open map and go to edit mode with peer B
|
|
520
545
|
peerB = new_page("Page B")
|
|
521
546
|
peerB.goto(peerA.url)
|
|
547
|
+
wait_for_loaded(peerB)
|
|
522
548
|
peerB.get_by_role("button", name="Edit").click()
|
|
523
549
|
|
|
524
550
|
# Create a marker from peerA
|
|
@@ -568,7 +594,9 @@ def test_create_and_sync_map(new_page, asgi_live_server, tilelayer, login, user)
|
|
|
568
594
|
|
|
569
595
|
|
|
570
596
|
@pytest.mark.xdist_group(name="websockets")
|
|
571
|
-
def test_saved_datalayer_are_not_duplicated(
|
|
597
|
+
def test_saved_datalayer_are_not_duplicated(
|
|
598
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
599
|
+
):
|
|
572
600
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
573
601
|
map.settings["properties"]["syncEnabled"] = True
|
|
574
602
|
map.save()
|
|
@@ -576,6 +604,7 @@ def test_saved_datalayer_are_not_duplicated(new_page, asgi_live_server, tilelaye
|
|
|
576
604
|
# Create one tab
|
|
577
605
|
peerA = new_page("Page A")
|
|
578
606
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
607
|
+
wait_for_loaded(peerA)
|
|
579
608
|
# Create a new datalayer
|
|
580
609
|
peerA.get_by_title("Manage layers").click()
|
|
581
610
|
peerA.get_by_title("Add a layer").click()
|
|
@@ -588,6 +617,7 @@ def test_saved_datalayer_are_not_duplicated(new_page, asgi_live_server, tilelaye
|
|
|
588
617
|
# Now load the map from another tab
|
|
589
618
|
peerB = new_page("Page B")
|
|
590
619
|
peerB.goto(peerA.url)
|
|
620
|
+
wait_for_loaded(peerB)
|
|
591
621
|
peerB.get_by_role("button", name="Open browser").click()
|
|
592
622
|
expect(peerB.get_by_text("Layer 1")).to_be_visible()
|
|
593
623
|
peerB.get_by_role("button", name="Edit").click()
|
|
@@ -596,7 +626,9 @@ def test_saved_datalayer_are_not_duplicated(new_page, asgi_live_server, tilelaye
|
|
|
596
626
|
|
|
597
627
|
|
|
598
628
|
@pytest.mark.xdist_group(name="websockets")
|
|
599
|
-
def test_should_sync_saved_status(
|
|
629
|
+
def test_should_sync_saved_status(
|
|
630
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
631
|
+
):
|
|
600
632
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
601
633
|
map.settings["properties"]["syncEnabled"] = True
|
|
602
634
|
map.save()
|
|
@@ -604,8 +636,10 @@ def test_should_sync_saved_status(new_page, asgi_live_server, tilelayer):
|
|
|
604
636
|
# Create two tabs
|
|
605
637
|
peerA = new_page("Page A")
|
|
606
638
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
639
|
+
wait_for_loaded(peerA)
|
|
607
640
|
peerB = new_page("Page B")
|
|
608
641
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
642
|
+
wait_for_loaded(peerB)
|
|
609
643
|
|
|
610
644
|
# Create a new marker from peerA
|
|
611
645
|
peerA.get_by_title("Draw a marker").click()
|
|
@@ -639,7 +673,9 @@ def test_should_sync_saved_status(new_page, asgi_live_server, tilelayer):
|
|
|
639
673
|
|
|
640
674
|
|
|
641
675
|
@pytest.mark.xdist_group(name="websockets")
|
|
642
|
-
def test_should_sync_line_on_escape(
|
|
676
|
+
def test_should_sync_line_on_escape(
|
|
677
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
678
|
+
):
|
|
643
679
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
644
680
|
map.settings["properties"]["syncEnabled"] = True
|
|
645
681
|
map.save()
|
|
@@ -647,8 +683,10 @@ def test_should_sync_line_on_escape(new_page, asgi_live_server, tilelayer):
|
|
|
647
683
|
# Create two tabs
|
|
648
684
|
peerA = new_page("Page A")
|
|
649
685
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
686
|
+
wait_for_loaded(peerA)
|
|
650
687
|
peerB = new_page("Page B")
|
|
651
688
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
689
|
+
wait_for_loaded(peerB)
|
|
652
690
|
|
|
653
691
|
# Create a new marker from peerA
|
|
654
692
|
peerA.get_by_title("Draw a polyline").click()
|
|
@@ -662,7 +700,7 @@ def test_should_sync_line_on_escape(new_page, asgi_live_server, tilelayer):
|
|
|
662
700
|
|
|
663
701
|
@pytest.mark.xdist_group(name="websockets")
|
|
664
702
|
def test_should_sync_datalayer_clear(
|
|
665
|
-
new_page, asgi_live_server, tilelayer, map, datalayer
|
|
703
|
+
new_page, asgi_live_server, tilelayer, map, datalayer, wait_for_loaded
|
|
666
704
|
):
|
|
667
705
|
map.settings["properties"]["syncEnabled"] = True
|
|
668
706
|
map.edit_status = Map.ANONYMOUS
|
|
@@ -671,8 +709,10 @@ def test_should_sync_datalayer_clear(
|
|
|
671
709
|
# Create two tabs
|
|
672
710
|
peerA = new_page("Page A")
|
|
673
711
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
712
|
+
wait_for_loaded(peerA)
|
|
674
713
|
peerB = new_page("Page B")
|
|
675
714
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
715
|
+
wait_for_loaded(peerB)
|
|
676
716
|
expect(peerA.locator(".leaflet-marker-icon")).to_have_count(1)
|
|
677
717
|
expect(peerB.locator(".leaflet-marker-icon")).to_have_count(1)
|
|
678
718
|
|
|
@@ -691,7 +731,9 @@ def test_should_sync_datalayer_clear(
|
|
|
691
731
|
|
|
692
732
|
|
|
693
733
|
@pytest.mark.xdist_group(name="websockets")
|
|
694
|
-
def test_should_save_remote_dirty_datalayers(
|
|
734
|
+
def test_should_save_remote_dirty_datalayers(
|
|
735
|
+
new_page, asgi_live_server, tilelayer, wait_for_loaded
|
|
736
|
+
):
|
|
695
737
|
map = MapFactory(name="sync", edit_status=Map.ANONYMOUS)
|
|
696
738
|
map.settings["properties"]["syncEnabled"] = True
|
|
697
739
|
map.save()
|
|
@@ -701,8 +743,10 @@ def test_should_save_remote_dirty_datalayers(new_page, asgi_live_server, tilelay
|
|
|
701
743
|
# Create two tabs
|
|
702
744
|
peerA = new_page("Page A")
|
|
703
745
|
peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
746
|
+
wait_for_loaded(peerA)
|
|
704
747
|
peerB = new_page("Page B")
|
|
705
748
|
peerB.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
|
|
749
|
+
wait_for_loaded(peerB)
|
|
706
750
|
|
|
707
751
|
# Create a new layer from peerA
|
|
708
752
|
peerA.get_by_role("button", name="Manage layers").click()
|
umap/tests/test_dashboard.py
CHANGED
|
@@ -68,7 +68,7 @@ def test_user_dashboard_display_user_team_maps(client, map, team, user, share_st
|
|
|
68
68
|
|
|
69
69
|
def test_user_dashboard_display_user_maps_distinct(client, map):
|
|
70
70
|
# cf https://github.com/umap-project/umap/issues/1325
|
|
71
|
-
anonymap = MapFactory(name="Map
|
|
71
|
+
anonymap = MapFactory(name="Map without owner should not appear")
|
|
72
72
|
user1 = UserFactory(username="user1")
|
|
73
73
|
user2 = UserFactory(username="user2")
|
|
74
74
|
map.editors.add(user1)
|
umap/tests/test_statics.py
CHANGED
|
@@ -32,9 +32,9 @@ def test_collectstatic_ran_successfully_with_hashes(settings, staticfiles):
|
|
|
32
32
|
assert "hash" in json_manifest.keys()
|
|
33
33
|
assert "umap/base.css" in json_manifest["paths"]
|
|
34
34
|
# Hash + the dot ("umap/base.<hash>.css").
|
|
35
|
-
|
|
35
|
+
md5_hash_length = 12 + 1
|
|
36
36
|
# The value of the manifest must contain the hash (length).
|
|
37
37
|
assert (
|
|
38
38
|
len(json_manifest["paths"]["umap/base.css"])
|
|
39
|
-
== len("umap/base.css") +
|
|
39
|
+
== len("umap/base.css") + md5_hash_length
|
|
40
40
|
)
|
umap/tests/test_views.py
CHANGED
umap/utils.py
CHANGED
|
@@ -80,7 +80,7 @@ def get_uri_template(urlname, args=None, prefix="", module=None):
|
|
|
80
80
|
result, params = possibility[0]
|
|
81
81
|
return _convert(result, params)
|
|
82
82
|
else:
|
|
83
|
-
# If there are
|
|
83
|
+
# If there are optional arguments passed, use them to try to find
|
|
84
84
|
# the correct pattern.
|
|
85
85
|
# First, we need to build a list with all the arguments
|
|
86
86
|
seen_params = []
|
|
@@ -226,5 +226,5 @@ def collect_pictograms():
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
def normalize_string(s):
|
|
229
|
-
n = unicodedata.normalize("NFKD", s)
|
|
229
|
+
n = unicodedata.normalize("NFKD", str(s))
|
|
230
230
|
return "".join([c for c in n if not unicodedata.combining(c)]).lower()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: umap-project
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.0b3
|
|
4
4
|
Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
|
|
5
5
|
Author-email: Yohan Boniface <yb@enix.org>
|
|
6
6
|
Maintainer-email: David Larlet <david@larlet.fr>
|
|
@@ -21,7 +21,7 @@ Requires-Dist: django-environ==0.12.0
|
|
|
21
21
|
Requires-Dist: django-probes==1.7.0
|
|
22
22
|
Requires-Dist: django==5.2.7
|
|
23
23
|
Requires-Dist: pillow==11.3.0
|
|
24
|
-
Requires-Dist: psycopg==3.2.
|
|
24
|
+
Requires-Dist: psycopg==3.2.11
|
|
25
25
|
Requires-Dist: rcssmin==1.2.1
|
|
26
26
|
Requires-Dist: requests==2.32.5
|
|
27
27
|
Requires-Dist: rjsmin==1.2.4
|
|
@@ -42,7 +42,7 @@ Requires-Dist: uvicorn==0.37.0; extra == 'docker'
|
|
|
42
42
|
Provides-Extra: s3
|
|
43
43
|
Requires-Dist: django-storages[s3]==1.14.6; extra == 's3'
|
|
44
44
|
Provides-Extra: sync
|
|
45
|
-
Requires-Dist: pydantic==2.
|
|
45
|
+
Requires-Dist: pydantic==2.12.3; extra == 'sync'
|
|
46
46
|
Requires-Dist: redis==6.4.0; extra == 'sync'
|
|
47
47
|
Requires-Dist: websockets==15.0.1; extra == 'sync'
|
|
48
48
|
Provides-Extra: test
|
|
@@ -52,7 +52,7 @@ Requires-Dist: moto[s3]==5.1.14; extra == 'test'
|
|
|
52
52
|
Requires-Dist: playwright>=1.39; extra == 'test'
|
|
53
53
|
Requires-Dist: pytest-django==4.11.1; extra == 'test'
|
|
54
54
|
Requires-Dist: pytest-playwright==0.7.1; extra == 'test'
|
|
55
|
-
Requires-Dist: pytest-rerunfailures==16.
|
|
55
|
+
Requires-Dist: pytest-rerunfailures==16.1; extra == 'test'
|
|
56
56
|
Requires-Dist: pytest-xdist<4,>=3.5.0; extra == 'test'
|
|
57
57
|
Requires-Dist: pytest==8.4.2; extra == 'test'
|
|
58
58
|
Description-Content-Type: text/markdown
|