test(alerts): the widget test reads the time as |ago writes it (#5510)
Under an hour |ago says "12m 3s ago", so the test looks for the minutes alone; the reading cell drops an empty class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,9 +65,9 @@ async def test_firing_and_silent_come_first_then_who_acknowledged(app):
|
||||
assert re.search(r'w-verdict tone-crit">\s*1 firing, 1 silent, 1 acknowledged\.', page)
|
||||
assert page.index("web-1 CPU high") < page.index("nas agent") < page.index("db disk")
|
||||
assert 'href="/alerts/history?rule=r1"' in page
|
||||
assert "web-1 · fires on CPU > 90%" in page and "94%" in page and "12m ago" in page
|
||||
assert "web-1 · fires on CPU > 90%" in page and ">94%<" in page and ">12m " in page
|
||||
assert "nas · no reading" in page
|
||||
assert "db-1:/var · acknowledged by bryan" in page and "40m ago" in page
|
||||
assert "db-1:/var · acknowledged by bryan <time" in page and ">40m " in page
|
||||
assert "+1 rule quiet" in page and 'href="/alerts/"' in page
|
||||
assert len(re.findall(r"<th[ >]", page)) == 3
|
||||
assert not hex_colours(page), hex_colours(page)
|
||||
|
||||
Reference in New Issue
Block a user