feat: implement isBranchRowActionTarget function and add tests for branch row interaction

This commit is contained in:
mlogclub
2026-06-30 11:39:01 +08:00
parent fb612eb32e
commit d72079a580
3 changed files with 26 additions and 0 deletions
@@ -262,6 +262,23 @@ describe("workflow variable display helpers", () => {
})
})
describe("workflow branch interaction helpers", () => {
it("detects branch row action targets inside buttons", async () => {
const { isBranchRowActionTarget } = await loadModule()
assert.equal(isBranchRowActionTarget({
closest(selector) {
return selector === "button" ? {} : null
},
}), true)
assert.equal(isBranchRowActionTarget({
closest() {
return null
},
}), false)
})
})
describe("workflow definition mutations", () => {
it("updates node data without changing unrelated nodes", async () => {
const { updateWorkflowNodeData } = await loadModule()