Skip to content

Commit

Permalink
Test for labels on Table/View action buttons, refs #2297
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Mar 12, 2024
1 parent 909c85c commit 06281a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,8 @@ def get_menu_links(html):
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"]
) == [
Expand All @@ -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"]
) == [
Expand Down

0 comments on commit 06281a0

Please sign in to comment.