feat(vom): vom fix

This commit is contained in:
Ljy-0827
2026-07-27 14:53:10 +08:00
parent 4fb2e331a6
commit c002c394e6
6 changed files with 154 additions and 24 deletions
+18
View File
@@ -87,6 +87,24 @@ describe("renderVom single-layer page", () => {
expect(out.refs).toEqual([{ ref: "e1", backendNodeId: 2 }]);
});
it("annotates external links regardless of role casing", () => {
const out = renderVom(
scene([
node({ id: 1, role: "RootWebArea", name: "Doc" }),
node({
id: 2,
parentId: 1,
role: "Link",
name: "Docs",
href: "docs.example.org",
tag: "a",
}),
]),
);
expect(out.text).toContain('@e1 Link "Docs" [→ docs.example.org]');
});
it("renders additional structural roles without assigning refs", () => {
const out = renderVom(
scene([