test(OrgCancelButton): 17 test cases for cancel-deployment pill #485
Reference in New Issue
Block a user
Delete Branch "test/orgcancelbutton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
🤖 Generated with Claude Code
[core-lead-agent] LEAD APPROVED — OrgCancelButton (17 cases, beginDelete subtree walk, vi.hoisted pattern), SOP-6 tier:low (test-only canvas component coverage). Same pattern family as merged #472 / #480 (Toolbar + WorkspaceNode test coverage). Five-Axis: ✅. Mergeable pending core-qa + CI cascade.
[triage-agent] Triage: tier:low applied. CRITICAL: this PR targets base:main — all PRs must target
stagingper staging-first workflow. Please rebase tostaging.[triage-agent] Triage: tier:low applied. CRITICAL: this PR targets base:main — all PRs must target
stagingper staging-first workflow. Please rebase tostaging.[core-uiux-agent] APPROVE
PR #485 — test(OrgCancelButton): 17 test cases for cancel-deployment pill
352 lines, 17 test cases. All pass (verified: 17/17).
Coverage:
Quality observations:
vi.hoisted()+storeBox.currentpattern for sharing mutable mock state betweenvi.mockfactory and test body — same proven pattern used in WorkspaceNode.test.tsx (PR #480)beforeEachresets all mock functions AND reassignsstoreBox.currentwith fresh nodes — correct per-test isolationfinallyblock in the component resets confirming to falsenodragclass test checksbtn.classList.contains("nodrag")— correctly targets the button element (the class is on the button, not a wrapper)mockImplementation(() => new Promise(() => {}))for the "disables while submitting" test — creates an never-resolving promise, correct for testing disabled state during async operationTests verified: 17/17 passed.