mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
feat(extension): add bsk hover and adjust vom to support
This commit is contained in:
@@ -404,7 +404,7 @@ describe("renderVom single-layer page", () => {
|
||||
],
|
||||
});
|
||||
|
||||
expect(out.text).toContain('@e1 button "Products" [hover: Shoes | Bags | Accessories]');
|
||||
expect(out.text).toContain('@e1 button "Products" [hover first: Shoes | Bags | Accessories]');
|
||||
expect(out.refs).toEqual([{ ref: "e1", backendNodeId: 2 }]);
|
||||
});
|
||||
|
||||
|
||||
@@ -637,7 +637,9 @@ function renderNodeLine(
|
||||
if (surface && surface.subItems.length > 0) {
|
||||
const items = surface.subItems.slice(0, MAX_SURFACE_ITEMS).join(" | ");
|
||||
const suffix = surface.subItems.length > MAX_SURFACE_ITEMS ? " | …" : "";
|
||||
line += ` [${surface.triggerAction}: ${items}${suffix}]`;
|
||||
const action =
|
||||
surface.triggerAction === "hover" ? "hover first" : `${surface.triggerAction} first`;
|
||||
line += ` [${action}: ${items}${suffix}]`;
|
||||
}
|
||||
|
||||
return line;
|
||||
|
||||
Reference in New Issue
Block a user