Fix copy bug for LCP and LS screenshots. (#3376)

This commit is contained in:
Peter Hedenskog 2021-05-10 10:30:52 +02:00 committed by GitHub
parent d1303d4063
commit e982e709bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -341,21 +341,19 @@ module.exports = {
run.screenshots =
result[resultIndex].files.screenshot[runIndex];
} else {
// Hack to make sure we take the right after page complete check
run.screenshots = [
`${this.resultUrls.relativeSummaryPageUrl(
url,
this.allAlias[url]
)}data/screenshots/${runIndex + 1}/afterPageCompleteCheck.${
this.screenshotType
}`
];
// Push all screenshots that do not match the afterPageCompleteCheck
// Push all screenshots
run.screenshots = [];
for (let screenshot of result[resultIndex].files.screenshot[
runIndex
]) {
if (screenshot.indexOf('afterPageCompleteCheck') === -1) {
if (
screenshot.indexOf(
`${this.resultUrls.relativeSummaryPageUrl(
url,
this.allAlias[url]
)}data`
) > -1
) {
run.screenshots.push(screenshot);
}
}

View File

@ -74,7 +74,9 @@ module.exports = {
'.' +
this.screenshotType
);
} else console.log(screenshot);
} else {
// This is a user generated screenshot, we do not copy that
}
}
}
if (options.browsertime && options.browsertime.video) {