Skip to content
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(config): special case full-page-screenshot audit in filtering #11829

Merged
merged 9 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lighthouse-core/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,19 @@ class Config {
}
});

// The `full-page-screenshot` audit belongs to no category, but we still want to include
// it for the categories that utilize it.
if (settings.onlyCategories) {
adamraine marked this conversation as resolved.
Show resolved Hide resolved
const includesCategoryUsingFullPageScreenshot = settings.onlyCategories.some(cat => {
return ['performance', 'accessibility'].includes(cat);
});
const explicitlyExcludesFullPageScreenshot =
settings.skipAudits && settings.skipAudits.includes('full-page-screenshot');
if (includesCategoryUsingFullPageScreenshot && !explicitlyExcludesFullPageScreenshot) {
includedAudits.add('full-page-screenshot');
}
}

return {categories, requestedAuditNames: includedAudits};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Tests that exporting works.

++++++++ testExportJson

# of audits (json): 152
# of audits (json): 153

Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Gathering setup: Accessibility
Gathering setup: TraceElements
Gathering setup: InspectorIssues
Gathering setup: SourceMaps
Gathering setup: FullPageScreenshot
Beginning devtoolsLog and trace
Getting browser version
Loading page & waiting for onload
Expand Down Expand Up @@ -86,6 +87,7 @@ Gathering in-page: Accessibility
Gathering in-page: TraceElements
Gathering in-page: InspectorIssues
Gathering in-page: SourceMaps
Gathering in-page: FullPageScreenshot
Gathering trace
Gathering devtoolsLog & network records
Running afterPass methods
Expand Down Expand Up @@ -116,6 +118,7 @@ Gathering: Accessibility
Gathering: TraceElements
Gathering: InspectorIssues
Gathering: SourceMaps
Gathering: FullPageScreenshot
Populate base artifacts
Get webapp manifest
Collect stacks
Expand Down Expand Up @@ -247,6 +250,7 @@ Auditing: Page has valid source maps
Auditing: Preload Largest Contentful Paint image
Computing artifact: LanternLargestContentfulPaint
Computing artifact: LanternFirstContentfulPaint
Auditing: Full-page screenshot
Auditing: Site works cross-browser
Auditing: Page transitions don't feel like they block on the network
Auditing: Each page has a URL
Expand Down Expand Up @@ -455,6 +459,7 @@ font-display: pass
font-size: fail
form-field-multiple-labels: notApplicable
frame-title: notApplicable
full-page-screenshot: informative
geolocation-on-start: pass
gpt-bids-parallel: notApplicable
heading-order: notApplicable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ first-contentful-paint
first-cpu-idle
first-meaningful-paint
font-display
full-page-screenshot
interactive
largest-contentful-paint
largest-contentful-paint-element
Expand Down