feat(alerts): the whole rule row opens the rule (#5214)
CI / lint (push) Successful in 3s
CI / integration (push) Successful in 1m2s
CI / unit (push) Successful in 1m24s
CI / publish (push) Successful in 1m30s

The name's link stretches over its row (.row-link / .row-target); the
History and Disable buttons sit above it and keep their own clicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 23:23:02 -04:00
co-authored by Claude Opus 5.5
parent e37cd0a873
commit 16b636b2f0
3 changed files with 16 additions and 5 deletions
+5 -1
View File
@@ -86,6 +86,10 @@ async def test_an_operator_sees_the_sentence_linked_and_can_acknowledge(app):
assert '<span class="badge badge-crit">Firing</span>' in page
assert 'action="/alerts/r1/acknowledge"' in page
assert 'href="/alerts/rules/new"' in page and 'href="/alerts/rules/r1/edit"' in page
# The whole row opens the rule: one stretched link, the row marked for it.
row = page[page.index('<tr class="row-link'):]
row = row[:row.index("</tr>")]
assert row.count('class="row-target"') == 1 and 'class="row-target" href="/alerts/rules/r1/edit"' in row
assert 'action="/alerts/rules/r1/delete"' not in page # deleting a rule is the admin's
main = page[page.index("<main"):] # the sidebar brand mark carries its own colours
assert "onclick" not in main and not hex_colours(main), hex_colours(main)
@@ -222,7 +226,7 @@ async def test_rules_say_what_each_is_doing_now(app):
rules = page[page.index(">Rules</h2>"):]
assert '<span class="badge badge-crit">Firing</span>' in rules
assert 'title="Within its threshold">quiet</span>' in rules
assert '<span class="tone-dim">off</span>' in rules and 'class="row-off"' in rules
assert '<span class="tone-dim">off</span>' in rules and 'class="row-link row-off"' in rules
assert 'hx-get="/alerts/active"' in page