Test for labels on Table/View action buttons, refs #2297

pull/2082/merge
Simon Willison 2024-03-12 14:32:48 -07:00
rodzic 909c85cd2b
commit 06281a0b8e
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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"]
) == [