shots: render refuses missing frames and fails on load errors; shots check errors on renders with failed loads (pitfall 93)
This commit is contained in:
parent
00756e6908
commit
88d1b58f1f
7 changed files with 78 additions and 2 deletions
|
|
@ -88,6 +88,7 @@ export function scanRenders(dir: string, o: { langs: string[]; variants?: string
|
|||
const fromStore = !variant && !!pulledEntry(pulled, dir, file, bytes);
|
||||
const issues = fromStore ? [] : checkImage(info, size);
|
||||
const entry = report[rel.replace(/\.jpe?g$/i, '.png')];
|
||||
if (entry?.missing?.length) issues.push({ level: 'error', code: 'frame-missing', msg: `rendered while ${entry.missing.length} file${entry.missing.length > 1 ? 's' : ''} failed to load (${entry.missing.join(', ')}): the image lacks its frame / logo / background; restore the frames (shots capture) and render again` });
|
||||
for (const msg of entry?.overflow ?? []) issues.push({ level: 'warn', code: 'overflow', msg });
|
||||
issues.push(...fontIssues(entry?.fonts));
|
||||
issues.push(...deviceIssues(entry, size, info.w, info.h));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue