GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.02k stars 9.32k forks source link

report: fix hidden audit handling for non-perf categories #15968

Closed adamraine closed 2 months ago

adamraine commented 2 months ago

The artifact refresh in https://github.com/GoogleChrome/lighthouse/pull/15962 revealed that we were not always handling the hidden group correctly. Before, if an audit had group hidden it would only be omitted from the report if it would be in the failed clump. So an audit marked N/A that had group hidden would appear in the report (under the N/A section)

This wasn't picked up by unit tests because the unit tests were indifferent to the hidden group and the sample artifacts didn't have any audits with group hidden that failed. With the artifact refresh, there was an audit that failed but was in group hidden which started tripping up the tests with incorrect expectations.

This PR splits out the report fix and the associated test expectation corrections from https://github.com/GoogleChrome/lighthouse/pull/15962