test(query-devtools/Devtools): add tests for opening a picture-in-picture window#10760
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 test coverage for Picture-in-Picture functionality in the query devtools. Tests verify that clicking the PiP button opens a window with the correct parameters and persists the ChangesPicture-in-Picture Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 3bdac28
☁️ 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
Devtools.test.tsxwith tests that lock the entry points for the Devtools picture-in-picture window — clicking the inline PiP button opens a popup window with the expected target / features and persistspip_open, and a storedpip_open=truetriggers the same auto-open on mount.Added cases (
picture-in-picture, 2):should open a PiP window when the picture-in-picture button is clicked— stubswindow.openwith a fake PiP window, clicks the inline PiP button, and asserts the open call shape and thepip_openlocalStorage value.should automatically open a PiP window when "pip_open" is "true" in "localStorage"— seedspip_open=truein localStorage and asserts thepip_openreactive effect callswindow.openon mount without any explicit click.The new
picture-in-picturedescribe ships a typedFakePipWindow(Pick<Window, ...>) and astubPipWindow()helper so subsequent PiP scenarios (popup blocked, in-page panel toggle, pagehide) can reuse the same setup.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit