You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the review. Is there anything left before it can be merged?
danmar
changed the title
Fix missing severity and classification bars in the HTML report
Fix #14689 (html report: Fix missing severity and classification bars)
Apr 25, 2026
does this suggestion below make sense? I asked claude about how to test this..
filter_bar() is called during full report generation. Since example.xml already contains severity="error" and severity="style", an integration test can assert that the severity bar
checkboxes actually appear in index.html. Before the fix, the entire severity bar was silently cleared to '', so toggleSeverity never appeared in the output.
Add one test method to test_htmlreport.py:
def testSeverityFilterBar(self):
"""Regression test for #14689: severity bar must appear when errors exist."""
with runCheck(xml_filename=os.path.join(TEST_TOOLS_DIR, 'example.xml')) as (report, output_directory):
# example.xml contains error and style severities, so the
# severity filter bar must be present. Before the fix in #7994,
# filter_bar() checked for "checked/>" (XHTML) but filter_button()
# emits "checked>" (HTML5), so the bar was always cleared to ''.
self.assertIn('toggleSeverity', report)
output_directory.cleanup()
Hi @danmar , thanks for the suggestion.
The test written by Claude would not work because toggleSeverity is a name of a javascript function which always appears in the report.
I added a modified version which does work.
Let me know if it looks good to you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug introduced in #7994.