mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 11:55:59 +00:00
Fix bug where details and carbon data were overwritten in runner.js
This commit is contained in:
@@ -251,25 +251,8 @@ async function _executeTest(url, options) {
|
||||
// Use High-Res frames if available, otherwise fallback to Lighthouse thumbnails
|
||||
const filmstripData = (highResFrames && highResFrames.length > 5) ? highResFrames : (lhr.audits['screenshot-thumbnails']?.details?.items || []);
|
||||
|
||||
summary = {
|
||||
id: testId,
|
||||
url: lhr.finalUrl || url,
|
||||
timestamp: lhr.fetchTime || new Date().toISOString(),
|
||||
scores: {
|
||||
performance: getScore('performance'),
|
||||
accessibility: getScore('accessibility'),
|
||||
bestPractices: getScore('best-practices'),
|
||||
seo: getScore('seo'),
|
||||
},
|
||||
metrics: {
|
||||
lcp: getMetric('largest-contentful-paint'),
|
||||
cls: getMetric('cumulative-layout-shift'),
|
||||
tbt: getMetric('total-blocking-time'),
|
||||
},
|
||||
userAgent: lhr.userAgent,
|
||||
isMobile: isMobile,
|
||||
filmstrip: filmstripData
|
||||
};
|
||||
// Update filmstrip in existing summary (preserves details and carbon)
|
||||
summary.filmstrip = filmstripData;
|
||||
|
||||
// Update summary file with new filmstrip
|
||||
jsonPath = path.join(reportDir, `${testId}.json`);
|
||||
|
||||
Reference in New Issue
Block a user