mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not save "null" instead of null for showLabel
This commit is contained in:
parent
6793a6bdc7
commit
64068af393
3 changed files with 12 additions and 2 deletions
|
@ -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')],
|
||||
]
|
||||
)
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ export const SCHEMA = {
|
|||
choices: [
|
||||
[true, translate('always')],
|
||||
[false, translate('never')],
|
||||
['null', translate('on hover')],
|
||||
[null, translate('on hover')],
|
||||
],
|
||||
},
|
||||
slideshow: {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue