From e37cd0a8734c635e28f41d32bd30d870279a6174 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 7 Oct 2026 23:06:33 -0400 Subject: [PATCH] test(alerts): check the history's Action column on one rule's rows, which the test owns (#5316) The all-rules page reads a Postgres shared with other tests, whose Ansible-run events turn the column on. Co-Authored-By: Claude Opus 5.5 --- tests/integration/test_alert_history_page.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_alert_history_page.py b/tests/integration/test_alert_history_page.py index b0a310f..036d530 100644 --- a/tests/integration/test_alert_history_page.py +++ b/tests/integration/test_alert_history_page.py @@ -73,13 +73,16 @@ def test_a_viewer_reads_the_alert_history(app): assert '98% (fires above 90%)' in page assert "email failed" in page and f"mx-{tag}: timed out" in page and "webhook sent" in page assert f"muted ยท patch-{tag}" in page and "No CPU reading" in page and "2 changes of state" in page - assert "Rule" in page and "Notified" in page and "Action" not in page + assert "Rule" in page and "Notified" in page resp = await client.get(f"/alerts/history?range=24h&rule={hot_id}", headers={"HX-Request": "true"}) rows = await resp.get_data(as_text=True) assert "Rule" not in rows # one rule: no column for it + # Columns only for what this rule's rows hold: it told someone, it ran + # nothing. (The all-rules page shares Postgres with other tests' runs.) + assert "Notified" in rows and "Action" not in rows assert "Fired 1 time in the last 24h" in rows # its verdict # The next page as the reader scrolls: only older rows, without the table