test(query-devtools/Explorer): add tests for resetting 'CopyButton' state after success and failure#10738
Conversation
…tate after success and failure
|
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 test coverage for the copy-to-clipboard action in the Query DevTools Explorer component. Two new test cases validate the timer-driven UI state transitions: one for successful clipboard operations and one for failure scenarios, both confirming the button resets to its idle state after 1500ms. ChangesCopy-to-clipboard action tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
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 3ec438f
☁️ 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 that lock theCopyButtonstate reset behavior — after either a successful or failed copy, the button should return to its idle state 1500ms later so the user can copy again.Added cases (
action menu, 2):should reset the copy button to the idle state 1500ms after a successful copy— clicks Copy, asserts the successaria-label, advances timers by 1500ms, then asserts the idlearia-labelis back.should reset the copy button to the idle state 1500ms after a failed copy— same flow withclipboard.writeTextrejected, asserting the error → idle transition.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit