teaser: no text overflows anywhere: teaser.textCheck(t) checks every visible text node (scroll size within its element, its box inside its card, every card in frame as drawn), render.ts --animatic runs it at every frame of the whole teaser into animatic-checks.json and tests/teaser.test.ts requires zero problems; reject titles shortened ('No demo account', 'Manifest refused'); fixes it found: terminal and pile rows wrap instead of being cut with an ellipsis, the scan findings wrap, the pile shows only the rows that fit whole (no streaming past the edge), caption, edge word, labels and end card line heights fit their glyphs, builds and products push straight in so the terminal stays in frame
This commit is contained in:
parent
20a764b3ee
commit
49557b4c74
6 changed files with 60 additions and 19 deletions
|
|
@ -293,6 +293,12 @@ describe('teaser: timing and format', () => {
|
|||
expect(b.y + b.h, at).toBeLessThanOrEqual(T.FORMAT.h - my);
|
||||
}
|
||||
expect(j.rejectLayout!.at(-1)!.cards.length).toBe(T.REJECTS.length);
|
||||
});
|
||||
test.skipIf(!existsSync(CHECKS))('no text overflows anywhere: every text node fits its element and its card, every card in frame, at every frame (animatic layout data)', () => {
|
||||
const j = JSON.parse(readFileSync(CHECKS, 'utf8')) as { duration: number; textFrames?: number; textProblems?: unknown[] };
|
||||
expect(j.duration).toBe(T.DURATION);
|
||||
expect(j.textFrames).toBe(Math.round(T.DURATION * T.FPS));
|
||||
expect(j.textProblems?.slice(0, 10)).toEqual([]);
|
||||
expect(j.rejectLayout!.some(f => f.stamp)).toBe(true);
|
||||
});
|
||||
test('the picture darkens with the rejection and lifts on the drop', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue