mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
fix(cli): consolidate snapshot and frame diagnostics (#2402)
* fix(snapshot): preserve exact requested times * fix(cli): fail video snapshots without FFmpeg * fix(cli): honor navigation timeout in diagnostics * fix(cli): preserve snapshot alpha and create shot dirs
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { mkdtempSync, mkdirSync, writeFileSync } from "node:fs";
|
||||
import { existsSync, mkdtempSync, mkdirSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import { ensureDOMParser } from "../utils/dom.js";
|
||||
import { collectShotSelectors, resolveScope, surfaceComposition } from "./keyframes.js";
|
||||
import { ensureShotOutputDir } from "./motionShot.js";
|
||||
|
||||
beforeAll(() => ensureDOMParser());
|
||||
|
||||
@@ -26,6 +27,15 @@ describe("keyframes direct composition scope", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("keyframes shot output", () => {
|
||||
it("creates a missing parent directory before writing --shot", () => {
|
||||
const projectDir = mkdtempSync(join(tmpdir(), "hf-keyframes-shot-dir-"));
|
||||
const outputDir = join(projectDir, "nested", "proofs");
|
||||
ensureShotOutputDir(join(outputDir, "shot.png"));
|
||||
expect(existsSync(outputDir)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("keyframes multi-stroke traces", () => {
|
||||
it("composites ≥2 position strokes on one element into a single trace", () => {
|
||||
const html = wrap(`
|
||||
|
||||
Reference in New Issue
Block a user