Skip to content

fix(frontend): mock useMessages in WorkflowBuilder unit test - #33

Merged
LukasHirt merged 2 commits into
mainfrom
fix/workflow-builder-test-mock
Jul 27, 2026
Merged

fix(frontend): mock useMessages in WorkflowBuilder unit test#33
LukasHirt merged 2 commits into
mainfrom
fix/workflow-builder-test-mock

Conversation

@LukasHirt

Copy link
Copy Markdown
Collaborator

Summary

  • WorkflowBuilder.vue calls useAutomationConnect(), which calls useMessages() from @ownclouders/web-pkg at setup time.
  • tests/unit/WorkflowBuilder.spec.ts mocks @ownclouders/web-pkg but didn't include useMessages, so mounting the component threw and failed the frontend CI job.
  • This is currently failing on main and is inherited by every open PR rebased on top of it.

Test plan

  • pnpm test:unit run passes locally (6 files, 14 tests)
  • CI green on this PR

WorkflowBuilder.vue calls useAutomationConnect(), which calls useMessages()
from @ownclouders/web-pkg at setup time. The test's mock of that module
didn't include useMessages, so mounting the component threw and failed CI.

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt requested a review from a team as a code owner July 24, 2026 21:12
… e2e specs

PR #20 made adding a node auto-open its config overlay, which covers the
canvas and intercepts clicks meant for buttons underneath it. Most specs
already closed the panel after adding a node, but automation.spec.ts and
add-node-button-alignment.spec.ts never did, so their locator clicks timed
out waiting for the overlay to get out of the way.

Also fixes two flakes surfaced while stabilizing these: the alignment spec
measured node bounding boxes before WorkflowBuilder's 50ms-delayed fitView
call had settled, and the automation spec could race the workflow list's
async load, causing automatedWorkflowCount to read 0 and skip the
disconnect confirmation step.
@LukasHirt
LukasHirt merged commit b5014d4 into main Jul 27, 2026
5 checks passed
@LukasHirt
LukasHirt deleted the fix/workflow-builder-test-mock branch July 27, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants