Fix copy bug for LCP and LS screenshots. (#3376)
This commit is contained in:
parent
d1303d4063
commit
e982e709bb
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue