mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Test for labels on Table/View action buttons, refs #2297
This commit is contained in:
parent
909c85cd2b
commit
06281a0b8e
1 changed files with 2 additions and 2 deletions
|
|
@ -926,8 +926,8 @@ async def test_hook_menu_links(ds_client):
|
|||
async def test_hook_table_actions(ds_client):
|
||||
response = await ds_client.get("/fixtures/facetable")
|
||||
assert get_actions_links(response.text) == []
|
||||
|
||||
response_2 = await ds_client.get("/fixtures/facetable?_bot=1&_hello=BOB")
|
||||
assert ">Table actions<" in response_2.text
|
||||
assert sorted(
|
||||
get_actions_links(response_2.text), key=lambda link: link["label"]
|
||||
) == [
|
||||
|
|
@ -941,11 +941,11 @@ async def test_hook_table_actions(ds_client):
|
|||
async def test_hook_view_actions(ds_client):
|
||||
response = await ds_client.get("/fixtures/simple_view")
|
||||
assert get_actions_links(response.text) == []
|
||||
|
||||
response_2 = await ds_client.get(
|
||||
"/fixtures/simple_view",
|
||||
cookies={"ds_actor": ds_client.actor_cookie({"id": "bob"})},
|
||||
)
|
||||
assert ">View actions<" in response_2.text
|
||||
assert sorted(
|
||||
get_actions_links(response_2.text), key=lambda link: link["label"]
|
||||
) == [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue