mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
style(record): format trace recording changes
Apply the repository formatter so the merged Trace v3 changes pass frontend lint checks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -264,7 +264,10 @@ function collectHoverTriggerLabelText(root: Element): string {
|
|||||||
return normalizeLabelText(text);
|
return normalizeLabelText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function compactHoverTargetName(el: Element, desc: CaptureTargetDescriptor): CaptureTargetDescriptor {
|
function compactHoverTargetName(
|
||||||
|
el: Element,
|
||||||
|
desc: CaptureTargetDescriptor,
|
||||||
|
): CaptureTargetDescriptor {
|
||||||
if (!desc.name) return desc;
|
if (!desc.name) return desc;
|
||||||
const fullText = normalizeLabelText(el.textContent ?? "");
|
const fullText = normalizeLabelText(el.textContent ?? "");
|
||||||
const compactName = collectHoverTriggerLabelText(el);
|
const compactName = collectHoverTriggerLabelText(el);
|
||||||
|
|||||||
@@ -185,8 +185,19 @@ describe("reduceTraceSteps v3", () => {
|
|||||||
|
|
||||||
const { steps } = reduceTraceSteps(
|
const { steps } = reduceTraceSteps(
|
||||||
[
|
[
|
||||||
{ op: "fill", target: { ref: "e1", role: "textbox", name: "Search" }, value: "", preStateId: s1, postStateId: s1 },
|
{
|
||||||
{ op: "click", target: { ref: "e2", role: "button", name: "Apply" }, preStateId: s1, postStateId: s1 },
|
op: "fill",
|
||||||
|
target: { ref: "e1", role: "textbox", name: "Search" },
|
||||||
|
value: "",
|
||||||
|
preStateId: s1,
|
||||||
|
postStateId: s1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
op: "click",
|
||||||
|
target: { ref: "e2", role: "button", name: "Apply" },
|
||||||
|
preStateId: s1,
|
||||||
|
postStateId: s1,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
registry,
|
registry,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user