diff --git a/umap/static/umap/js/modules/form/fields.js b/umap/static/umap/js/modules/form/fields.js index abbe8494..4a709e2e 100644 --- a/umap/static/umap/js/modules/form/fields.js +++ b/umap/static/umap/js/modules/form/fields.js @@ -1195,7 +1195,7 @@ Fields.NullableChoices = class extends Fields.TernaryChoices { this.properties.choices || [ [true, translate('always')], [false, translate('never')], - ['null', translate('hidden')], + [null, translate('hidden')], ] ) } diff --git a/umap/static/umap/js/modules/schema.js b/umap/static/umap/js/modules/schema.js index 3dacf79d..a6f279d5 100644 --- a/umap/static/umap/js/modules/schema.js +++ b/umap/static/umap/js/modules/schema.js @@ -450,7 +450,7 @@ export const SCHEMA = { choices: [ [true, translate('always')], [false, translate('never')], - ['null', translate('on hover')], + [null, translate('on hover')], ], }, slideshow: { diff --git a/umap/tests/integration/test_view_marker.py b/umap/tests/integration/test_view_marker.py index b9363d49..f5bff284 100644 --- a/umap/tests/integration/test_view_marker.py +++ b/umap/tests/integration/test_view_marker.py @@ -181,3 +181,13 @@ def test_only_visible_markers_are_added_to_dom(live_server, map, page): ) expect(markers).to_have_count(1) expect(tooltips).to_have_count(1) + + +def test_should_display_tooltip_on_hover(live_server, map, page, bootstrap): + map.settings["properties"]["showLabel"] = None + map.settings["properties"]["labelKey"] = "Foo {name}" + map.save() + page.goto(f"{live_server.url}{map.get_absolute_url()}") + expect(page.get_by_text("Foo test marker")).to_be_hidden() + page.locator(".leaflet-marker-icon").hover() + expect(page.get_by_text("Foo test marker")).to_be_visible()