test(query-devtools/Explorer): add tests for action menu buttons#10729
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a new test suite for Explorer's action menu functionality. It introduces a type-only import of ChangesExplorer Action Menu Tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit d6aad05
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
Extend
Explorer.test.tsxwith tests for action menu buttons that appear wheneditableis enabled —CopyButton,ClearArrayButton,DeleteItemButton, andToggleValueButton— along with their conditional rendering.Added cases (
action menu, 6):should copy the serialized value to the clipboard when the copy button is clicked— stubsnavigator.clipboard.writeTextand verifies the superjson payload.should clear array items via "setQueryData" when the clear-array button is clicked— asserts the active query is updated to[].should delete the entry at the current "dataPath" when the delete button is clicked— coversitemsDeletable+dataPathtogether.should toggle a boolean value via "setQueryData" when the toggle button is clicked— locks thebooleantype path that rendersToggleValueButton.should not render action buttons when "editable" is false— guards the<Show when={props.editable}>boundary.should not render "ClearArrayButton" when value is not an array— locks thetype() === 'array'condition.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit