test(card): cover _skip_rows (intentional green / unintentional amber)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -66,6 +66,22 @@ def test_badge_svg_differentiates_intentional_vs_unintentional_skip():
|
||||
assert "expected" not in gap
|
||||
|
||||
|
||||
def test_skip_rows_intentional_and_unintentional():
|
||||
html_out = C._skip_rows(
|
||||
{"intentional": {"backup_restore": "no persistent data"}, "unintentional": ["functional"]}
|
||||
)
|
||||
# intentional skip: labelled row (muted green) + the reason on its own line
|
||||
assert "intentional skip" in html_out and C.SKIP_GREEN in html_out
|
||||
assert "backup/restore" in html_out and "no persistent data" in html_out
|
||||
# unintentional skip: amber row + prompt to declare/add coverage
|
||||
assert "unintentional skip" in html_out and C.GAP_COLOR in html_out
|
||||
assert "functional" in html_out and "EXPECTED_NA" in html_out
|
||||
|
||||
|
||||
def test_skip_rows_empty_when_no_skips():
|
||||
assert C._skip_rows({"intentional": {}, "unintentional": []}) == ""
|
||||
|
||||
|
||||
def test_card_html_reports_level_verbatim():
|
||||
html = C.render_card_html(_data(level=2, cap="L3 backup/restore (data integrity) N/A"))
|
||||
assert "uptime-kuma" in html
|
||||
|
||||
Reference in New Issue
Block a user