mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Only suggest array facet for arrays of strings - closes #562
This commit is contained in:
parent
cd0984af2d
commit
0dde00e7bb
5 changed files with 92 additions and 46 deletions
|
|
@ -23,6 +23,10 @@ async def test_column_facet_suggest(app_client):
|
|||
{"name": "city_id", "toggle_url": "http://localhost/?_facet=city_id"},
|
||||
{"name": "neighborhood", "toggle_url": "http://localhost/?_facet=neighborhood"},
|
||||
{"name": "tags", "toggle_url": "http://localhost/?_facet=tags"},
|
||||
{
|
||||
"name": "complex_array",
|
||||
"toggle_url": "http://localhost/?_facet=complex_array",
|
||||
},
|
||||
] == suggestions
|
||||
|
||||
|
||||
|
|
@ -57,6 +61,10 @@ async def test_column_facet_suggest_skip_if_already_selected(app_client):
|
|||
"name": "tags",
|
||||
"toggle_url": "http://localhost/?_facet=planet_int&_facet=on_earth&_facet=tags",
|
||||
},
|
||||
{
|
||||
"name": "complex_array",
|
||||
"toggle_url": "http://localhost/?_facet=planet_int&_facet=on_earth&_facet=complex_array",
|
||||
},
|
||||
] == suggestions
|
||||
|
||||
|
||||
|
|
@ -78,6 +86,7 @@ async def test_column_facet_suggest_skip_if_enabled_by_metadata(app_client):
|
|||
"state",
|
||||
"neighborhood",
|
||||
"tags",
|
||||
"complex_array",
|
||||
] == suggestions
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue