Files
VibemakerSandbox/app/e2e/runtime-smoke.spec.js
chenlin fc5ee4f2c6 feat: release v0.2 multi-robot simulator
Add declarative robot packages, shared simulation lifecycle and Microban ONNX/PD walking with independent head control.

Unify comic UI and chase camera; default robot packages to a 4.5m arena with real collision walls. Include regression tests, asset provenance/licenses and verification evidence.
2026-10-28 14:00:26 +08:00

24 lines
728 B
JavaScript

import { test, expect } from "@playwright/test";
import { bootDuck } from "./support/simulation.js";
test("real WASM boots and manual steps exclusively own physics time", async ({
page,
}) => {
const errors = await bootDuck(page);
const result = await page.evaluate(async () => {
const r = window.rl;
const t0 = r.data.time;
await r.step(10);
const t1 = r.data.time;
await new Promise((resolve) => setTimeout(resolve, 150));
return {
dt: t1 - t0,
idleDt: r.data.time - t1,
finite: [...r.data.qpos].every(Number.isFinite),
};
});
expect(result.dt).toBeCloseTo(0.2, 10);
expect(result.idleDt).toBe(0);
expect(result.finite).toBe(true);
expect(errors).toEqual([]);
});