Skip to content

test(query-devtools/Devtools): drop the 'pip_open' localStorage assertion from the PiP restore case now covered by 'PiPContext.test.tsx'#10806

Merged
sukvvon merged 1 commit into
mainfrom
test/query-devtools-devtools-trim-pip-restore-localstorage
May 26, 2026
Merged

test(query-devtools/Devtools): drop the 'pip_open' localStorage assertion from the PiP restore case now covered by 'PiPContext.test.tsx'#10806
sukvvon merged 1 commit into
mainfrom
test/query-devtools-devtools-trim-pip-restore-localstorage

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented May 26, 2026

🎯 Changes

The should restore the in-page panel and reset "pip_open" when the PiP window is closed case asserted on two things that belonged to different layers:

Drop the localStorage assertion (now redundant with PiPContext.test.tsx) and rename the case to match the single remaining responsibility (should restore the in-page panel when the PiP window is closed). Devtools.tsx coverage is unchanged and PiPContext.tsx stays at 100% / 95.23%.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Tests
    • Updated picture-in-picture mode test case to refine validation of control visibility after closing the PiP window.

Review Change Stack

…tion from the PiP restore case now covered by 'PiPContext.test.tsx'
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 704fc1b7-203f-4fbe-9651-52acdfc3bbbc

📥 Commits

Reviewing files that changed from the base of the PR and between e42d85c and 54a080f.

📒 Files selected for processing (1)
  • packages/query-devtools/src/__tests__/Devtools.test.tsx

📝 Walkthrough

Walkthrough

The test case for closing the picture-in-picture (PiP) window is simplified by removing the assertion that TanstackQueryDevtools.pip_open resets to 'false' after the pagehide event. The test name is updated accordingly, and the test continues to verify that the PiP open button is displayed again.

Changes

Picture-in-picture close test update

Layer / File(s) Summary
PiP close test description and assertion updates
packages/query-devtools/src/__tests__/Devtools.test.tsx
The test name drops reference to resetting pip_open state, and the assertion that TanstackQueryDevtools.pip_open becomes 'false' after pagehide is removed while keeping validation that the PiP open button reappears.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/query#10803: Adjusts PiP-related tests around pip_open behavior on PiP window close and lifecycle handling.
  • TanStack/query#10805: Updates PiP test expectations by removing assertions around pip_open auto-open and pagehide behavior.
  • TanStack/query#10801: Adds test coverage for pagehide setting pip_open to 'false' and clearing pipWindow state.

Suggested labels

package: query-devtools

Poem

🐰 A test is refined with surgical care,
Removing assumptions that weren't there,
The PiP still closes, the button appears,
Simpler assertions, no more doubts or fears!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing a localStorage assertion from a PiP test case that is now covered elsewhere.
Description check ✅ Passed The description follows the template with complete sections explaining changes, motivation, checklist completion, and release impact classification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/query-devtools-devtools-trim-pip-restore-localstorage

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 26, 2026

View your CI Pipeline Execution ↗ for commit 54a080f

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 3m 44s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 27s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-26 05:14:18 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

2 package(s) bumped directly, 23 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.6 → 0.2.7 Changeset
@tanstack/query-devtools 5.100.14 → 5.100.15 Changeset
@tanstack/angular-query-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/angular-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/eslint-plugin-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/query-async-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/query-broadcast-client-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/query-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-persist-client-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-sync-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/react-query 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-next-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/svelte-query 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-devtools 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-persist-client 6.1.33 → 6.1.34 Dependent
@tanstack/vue-query 5.100.14 → 5.100.15 Dependent
@tanstack/vue-query-devtools 6.1.33 → 6.1.34 Dependent

@sukvvon sukvvon self-assigned this May 26, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10806

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10806

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@10806

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10806

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10806

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10806

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10806

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10806

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10806

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10806

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10806

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10806

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10806

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10806

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10806

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10806

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10806

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10806

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10806

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10806

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10806

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10806

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10806

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10806

commit: 54a080f

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.11 KB (0%)
react minimal 9.08 KB (0%)

@sukvvon sukvvon merged commit 1ccc028 into main May 26, 2026
9 checks passed
@sukvvon sukvvon deleted the test/query-devtools-devtools-trim-pip-restore-localstorage branch May 26, 2026 06:12
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.

1 participant