From 06281a0b8e3d7cdb59230ace0abb026de3919d47 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 12 Mar 2024 14:32:48 -0700 Subject: [PATCH] Test for labels on Table/View action buttons, refs #2297 --- tests/test_plugins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 88af3999..fdfd531e 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -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"] ) == [