-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(fr): filter out manual-only categories #12367
Conversation
@@ -48,16 +50,32 @@ function filterCategoriesByAvailableAudits(categories, availableAudits) { | |||
if (!categories) return categories; | |||
|
|||
const availableAuditIds = new Set(availableAudits.map(audit => audit.implementation.meta.id)); | |||
const manualAuditIds = new Set( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Would a single auditIdToAuditMeta
map also work? I don't think you need to change anything unless you see us adding another filter in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure I'll refactor 👍
expect(filtered).not.toMatchObject({ | ||
timespan: {}, | ||
navigation: {}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice way of enforcing this
if (!meta) return false; | ||
return meta.scoreDisplayMode === Audit.SCORING_MODES.MANUAL; | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that line is empty of course it's covered...
go home codecov you're drunk 😆
(I'm assuming this is some source mapping issue because line 66 can't be covered, it's a make TS happy check that's impossible, EDIT: I take it back the line is obviously covered it's just the branch that can't. dunno what's going on)
Summary
Improves the filtering of categories in Fraggle Rock to remove categories that consist only manual audits. This eliminates the UX oddity that you'd run timespan mode and get a
?
score for accessibility category because all its real audits were snapshot audits.Related Issues/PRs
ref #11313