umap-project 3.4.0b2__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.
Files changed (144) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/da/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/da/LC_MESSAGES/django.po +2 -2
  4. umap/locale/en/LC_MESSAGES/django.po +14 -14
  5. umap/migrations/0018_datalayer_uuid.py +1 -1
  6. umap/models.py +1 -1
  7. umap/settings/local.py.sample +1 -1
  8. umap/static/umap/css/form.css +2 -2
  9. umap/static/umap/js/components/base.js +1 -1
  10. umap/static/umap/js/modules/browser.js +4 -4
  11. umap/static/umap/js/modules/data/features.js +1 -1
  12. umap/static/umap/js/modules/data/fields.js +280 -0
  13. umap/static/umap/js/modules/data/layer.js +6 -8
  14. umap/static/umap/js/modules/domutils.js +3 -3
  15. umap/static/umap/js/modules/filters.js +7 -7
  16. umap/static/umap/js/modules/help.js +1 -1
  17. umap/static/umap/js/modules/i18n.js +1 -1
  18. umap/static/umap/js/modules/importer.js +1 -1
  19. umap/static/umap/js/modules/managers.js +0 -264
  20. umap/static/umap/js/modules/rendering/controls.js +4 -2
  21. umap/static/umap/js/modules/rendering/layers/classified.js +1 -1
  22. umap/static/umap/js/modules/rendering/layers/heat.js +26 -21
  23. umap/static/umap/js/modules/rendering/template.js +4 -4
  24. umap/static/umap/js/modules/ui/dialog.js +10 -1
  25. umap/static/umap/js/modules/ui/panel.js +2 -2
  26. umap/static/umap/js/modules/umap.js +9 -4
  27. umap/static/umap/js/modules/utils.js +1 -1
  28. umap/static/umap/locale/am_ET.js +14 -5
  29. umap/static/umap/locale/am_ET.json +14 -5
  30. umap/static/umap/locale/ar.js +14 -5
  31. umap/static/umap/locale/ar.json +14 -5
  32. umap/static/umap/locale/ast.js +14 -5
  33. umap/static/umap/locale/ast.json +14 -5
  34. umap/static/umap/locale/bg.js +14 -5
  35. umap/static/umap/locale/bg.json +14 -5
  36. umap/static/umap/locale/br.js +1 -1
  37. umap/static/umap/locale/br.json +1 -1
  38. umap/static/umap/locale/ca.js +14 -5
  39. umap/static/umap/locale/ca.json +14 -5
  40. umap/static/umap/locale/cs_CZ.js +14 -5
  41. umap/static/umap/locale/cs_CZ.json +14 -5
  42. umap/static/umap/locale/da.js +48 -39
  43. umap/static/umap/locale/da.json +48 -39
  44. umap/static/umap/locale/de.js +14 -5
  45. umap/static/umap/locale/de.json +14 -5
  46. umap/static/umap/locale/el.js +14 -5
  47. umap/static/umap/locale/el.json +14 -5
  48. umap/static/umap/locale/en.js +14 -5
  49. umap/static/umap/locale/en.json +14 -5
  50. umap/static/umap/locale/en_US.json +14 -5
  51. umap/static/umap/locale/es.js +49 -40
  52. umap/static/umap/locale/es.json +49 -40
  53. umap/static/umap/locale/et.js +14 -5
  54. umap/static/umap/locale/et.json +14 -5
  55. umap/static/umap/locale/eu.js +14 -5
  56. umap/static/umap/locale/eu.json +14 -5
  57. umap/static/umap/locale/fa_IR.js +14 -5
  58. umap/static/umap/locale/fa_IR.json +14 -5
  59. umap/static/umap/locale/fi.js +14 -5
  60. umap/static/umap/locale/fi.json +14 -5
  61. umap/static/umap/locale/fr.js +14 -5
  62. umap/static/umap/locale/fr.json +14 -5
  63. umap/static/umap/locale/gl.js +14 -5
  64. umap/static/umap/locale/gl.json +14 -5
  65. umap/static/umap/locale/he.js +14 -5
  66. umap/static/umap/locale/he.json +14 -5
  67. umap/static/umap/locale/hr.js +14 -5
  68. umap/static/umap/locale/hr.json +14 -5
  69. umap/static/umap/locale/hu.js +56 -47
  70. umap/static/umap/locale/hu.json +56 -47
  71. umap/static/umap/locale/id.js +14 -5
  72. umap/static/umap/locale/id.json +14 -5
  73. umap/static/umap/locale/is.js +14 -5
  74. umap/static/umap/locale/is.json +14 -5
  75. umap/static/umap/locale/it.js +14 -5
  76. umap/static/umap/locale/it.json +14 -5
  77. umap/static/umap/locale/ja.js +14 -5
  78. umap/static/umap/locale/ja.json +14 -5
  79. umap/static/umap/locale/ko.js +14 -5
  80. umap/static/umap/locale/ko.json +14 -5
  81. umap/static/umap/locale/lt.js +14 -5
  82. umap/static/umap/locale/lt.json +14 -5
  83. umap/static/umap/locale/ms.js +14 -5
  84. umap/static/umap/locale/ms.json +14 -5
  85. umap/static/umap/locale/nl.js +14 -5
  86. umap/static/umap/locale/nl.json +14 -5
  87. umap/static/umap/locale/no.js +14 -5
  88. umap/static/umap/locale/no.json +14 -5
  89. umap/static/umap/locale/pl.js +14 -5
  90. umap/static/umap/locale/pl.json +14 -5
  91. umap/static/umap/locale/pl_PL.json +14 -5
  92. umap/static/umap/locale/pt.js +14 -5
  93. umap/static/umap/locale/pt.json +14 -5
  94. umap/static/umap/locale/pt_BR.js +14 -5
  95. umap/static/umap/locale/pt_BR.json +14 -5
  96. umap/static/umap/locale/pt_PT.js +14 -5
  97. umap/static/umap/locale/pt_PT.json +14 -5
  98. umap/static/umap/locale/ro.js +14 -5
  99. umap/static/umap/locale/ro.json +14 -5
  100. umap/static/umap/locale/ru.js +14 -5
  101. umap/static/umap/locale/ru.json +14 -5
  102. umap/static/umap/locale/si.js +1 -1
  103. umap/static/umap/locale/si.json +1 -1
  104. umap/static/umap/locale/sk_SK.js +14 -5
  105. umap/static/umap/locale/sk_SK.json +14 -5
  106. umap/static/umap/locale/sl.js +14 -5
  107. umap/static/umap/locale/sl.json +14 -5
  108. umap/static/umap/locale/sr.js +14 -5
  109. umap/static/umap/locale/sr.json +14 -5
  110. umap/static/umap/locale/sv.js +14 -5
  111. umap/static/umap/locale/sv.json +14 -5
  112. umap/static/umap/locale/th_TH.js +14 -5
  113. umap/static/umap/locale/th_TH.json +14 -5
  114. umap/static/umap/locale/tr.js +14 -5
  115. umap/static/umap/locale/tr.json +14 -5
  116. umap/static/umap/locale/uk_UA.js +14 -5
  117. umap/static/umap/locale/uk_UA.json +14 -5
  118. umap/static/umap/locale/vi.js +14 -5
  119. umap/static/umap/locale/vi.json +14 -5
  120. umap/static/umap/locale/vi_VN.json +14 -5
  121. umap/static/umap/locale/zh.js +14 -5
  122. umap/static/umap/locale/zh.json +14 -5
  123. umap/static/umap/locale/zh_CN.json +14 -5
  124. umap/static/umap/locale/zh_TW.Big5.json +14 -5
  125. umap/static/umap/locale/zh_TW.js +47 -38
  126. umap/static/umap/locale/zh_TW.json +47 -38
  127. umap/templates/umap/login_popup_end.html +2 -2
  128. umap/tests/integration/conftest.py +8 -0
  129. umap/tests/integration/test_anonymous_owned_map.py +1 -1
  130. umap/tests/integration/test_conditional_rules.py +1 -1
  131. umap/tests/integration/test_filters.py +6 -7
  132. umap/tests/integration/test_map_preview.py +1 -1
  133. umap/tests/integration/test_picto.py +1 -1
  134. umap/tests/integration/test_save.py +1 -1
  135. umap/tests/integration/test_websocket_sync.py +63 -19
  136. umap/tests/test_dashboard.py +1 -1
  137. umap/tests/test_statics.py +2 -2
  138. umap/tests/test_views.py +1 -1
  139. umap/utils.py +1 -1
  140. {umap_project-3.4.0b2.dist-info → umap_project-3.4.0b3.dist-info}/METADATA +4 -4
  141. {umap_project-3.4.0b2.dist-info → umap_project-3.4.0b3.dist-info}/RECORD +144 -143
  142. {umap_project-3.4.0b2.dist-info → umap_project-3.4.0b3.dist-info}/WHEEL +0 -0
  143. {umap_project-3.4.0b2.dist-info → umap_project-3.4.0b3.dist-info}/entry_points.txt +0 -0
  144. {umap_project-3.4.0b2.dist-info → umap_project-3.4.0b3.dist-info}/licenses/LICENSE +0 -0
@@ -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 test_map_preview_can_load_mutiple_remote_geojson(page, live_server, tilelayer):
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 shuold open on Recent tab
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)
@@ -1,7 +1,7 @@
1
1
  import re
2
2
 
3
3
 
4
- def test_reseting_map_would_remove_from_save_queue(
4
+ def test_resetting_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")
@@ -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(new_page, asgi_live_server, tilelayer):
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(context, asgi_live_server, tilelayer):
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 = context.new_page()
107
+ peerA = new_page("Page A")
102
108
  peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
103
- peerB = context.new_page()
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
- context, asgi_live_server, tilelayer
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 = context.new_page()
259
+ peerA = new_page("Page A")
248
260
  peerA.goto(f"{asgi_live_server.url}{map.get_absolute_url()}?edit")
249
- peerB = context.new_page()
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 brower.
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(new_page, asgi_live_server, tilelayer):
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(new_page, asgi_live_server, tilelayer, login, user):
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(new_page, asgi_live_server, tilelayer):
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(new_page, asgi_live_server, tilelayer):
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(new_page, asgi_live_server, tilelayer):
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(new_page, asgi_live_server, tilelayer):
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()
@@ -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 witout owner should not appear")
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)
@@ -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
- md5_hash_lenght = 12 + 1
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") + md5_hash_lenght
39
+ == len("umap/base.css") + md5_hash_length
40
40
  )
umap/tests/test_views.py CHANGED
@@ -73,7 +73,7 @@ def test_POST_raises():
73
73
  validate_url(request)
74
74
 
75
75
 
76
- def test_unkown_domain_raises():
76
+ def test_unknown_domain_raises():
77
77
  request = get("http://xlkjdkjsdlkjfd.com")
78
78
  with pytest.raises(AssertionError):
79
79
  validate_url(request)
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 optionnal arguments passed, use them to try to find
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 = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umap-project
3
- Version: 3.4.0b2
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.10
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.11.9; extra == 'sync'
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.0.1; extra == 'test'
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