Add full source parity validation workflow
This commit is contained in:
@@ -21,23 +21,24 @@ const registry = JSON.parse(fs.readFileSync(path.join(root, "web/app/src/capabil
|
||||
|
||||
test("M12-05C keeps only matrix-declared executable routes in UI", () => {
|
||||
const parsed = gate.parseIOFormatUIRegistry(registry);
|
||||
assert.deepEqual(parsed.importRoutes, []);
|
||||
assert.deepEqual(parsed.exportRoutes.map((route) => route.format), ["GLB"]);
|
||||
assert.deepEqual(parsed.importRoutes.map((route) => route.format), ["GLTF", "GLB", "OBJ", "STL", "PLY"]);
|
||||
assert.deepEqual(parsed.exportRoutes.map((route) => route.format), ["GLTF", "GLB", "OBJ", "STL", "PLY"]);
|
||||
const commands = [
|
||||
{ id: "file.export-glb", ioFormat: { format: "GLB", operation: "EXPORT", execution: "LOCAL" } },
|
||||
{ id: "file.import-obj", ioFormat: { format: "OBJ", operation: "IMPORT", execution: "LOCAL" } },
|
||||
{ id: "file.export-usd", ioFormat: { format: "USD", operation: "EXPORT", execution: "SERVER" } },
|
||||
{ id: "edit.undo" },
|
||||
];
|
||||
assert.deepEqual(gate.filterIOFormatOperatorCommands(commands, parsed).map((command) => command.id), ["file.export-glb", "edit.undo"]);
|
||||
assert.deepEqual(gate.filterIOFormatOperatorCommands(commands, parsed).map((command) => command.id), ["file.export-glb", "file.import-obj", "edit.undo"]);
|
||||
});
|
||||
|
||||
test("M12-05C file selection is project-only while import routes are blocked", () => {
|
||||
test("M12-05C file selection includes only declared local import routes", () => {
|
||||
const parsed = gate.parseIOFormatUIRegistry(registry);
|
||||
assert.equal(gate.ioFormatUIAccept(parsed), ".blend,application/octet-stream");
|
||||
assert.equal(gate.ioFormatUIAccept(parsed), ".blend,application/octet-stream,.gltf,.glb,.obj,.stl,.ply");
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("scene.blend", parsed), { status: "READY", kind: "BLEND" });
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("mesh.obj", parsed), { status: "BLOCKED", code: "IO_FORMAT_UNSUPPORTED", extension: ".obj" });
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("scene.glb", parsed), { status: "BLOCKED", code: "IO_FORMAT_UNSUPPORTED", extension: ".glb" });
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("mesh.obj", parsed), { status: "READY", kind: "SCENE", route: parsed.importRoutes[2] });
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("scene.glb", parsed), { status: "READY", kind: "SCENE", route: parsed.importRoutes[1] });
|
||||
assert.deepEqual(gate.gateIOFormatFileSelection("scene.usd", parsed), { status: "BLOCKED", code: "IO_FORMAT_UNSUPPORTED", extension: ".usd" });
|
||||
});
|
||||
|
||||
test("M12-05C rejects malformed route metadata", () => {
|
||||
|
||||
Reference in New Issue
Block a user