Skip to content

test(solid-query-devtools/devtools): restore forwarding cases for 'buttonPosition' and 'position' props#10824

Merged
sukvvon merged 1 commit into
mainfrom
test/solid-query-devtools-devtools-restore-buttonposition-position-forward
May 29, 2026
Merged

test(solid-query-devtools/devtools): restore forwarding cases for 'buttonPosition' and 'position' props#10824
sukvvon merged 1 commit into
mainfrom
test/solid-query-devtools-devtools-restore-buttonposition-position-forward

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented May 29, 2026

🎯 Changes

Restore the two forwarding test cases for buttonPosition and position that were inadvertently dropped while rewriting the suite in a previous PR.

Without these cases, the truthy branches of the two guarded createEffect blocks in devtools.tsx were not exercised (uncovered lines 82 and 89). Re-adding them brings devtools.tsx back to 100% statement coverage and 85.71% branch coverage, and keeps the wiring matrix consistent with the other DevtoolsOptions props.

  • buttonPosition="top-left"setButtonPosition('top-left')
  • position="left"setPosition('left')

Both cases use vi.spyOn(TanstackQueryDevtools.prototype, ...) so the real Solid devtools instance is constructed and mounted; only the setter calls are observed.

✅ 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
    • Added test coverage verifying that buttonPosition and position configuration props are correctly forwarded to the underlying devtools component. Enhanced test suite ensures proper prop handling and confirms SolidQueryDevtools reliably passes customization options to its underlying implementation.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 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: 369c9286-efc7-4399-8dd4-ab1c6d0ebeed

📥 Commits

Reviewing files that changed from the base of the PR and between 7c3e028 and 6522e70.

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

📝 Walkthrough

Walkthrough

This PR adds two new test cases to verify that the SolidQueryDevtools component correctly forwards buttonPosition and position props to the underlying TanstackQueryDevtools instance by calling setButtonPosition('top-left') and setPosition('left') respectively.

Changes

Prop forwarding test coverage

Layer / File(s) Summary
TanstackQueryDevtools prop forwarding tests
packages/solid-query-devtools/src/__tests__/devtools.test.tsx
Adds test cases that spy on setButtonPosition and setPosition methods on the TanstackQueryDevtools prototype, render SolidQueryDevtools with buttonPosition and position props, and assert those methods are called with the expected values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/query#10818: Adds analogous tests for React Query devtools asserting the same buttonPosition and position prop forwarding behavior.
  • TanStack/query#10819: Adds identical test assertions to the same file verifying SolidQueryDevtools forwards buttonPosition and position props.
  • TanStack/query#10817: Adds devtools adapter tests across multiple packages validating prop-to-setter forwarding for buttonPosition and position.

Suggested labels

package: query-devtools

Poem

🐰 Two tests hop into view,
Props forwarding, tried and true!
DevTools settings dance their way,
SolidQuery brightens the day! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change—restoring two test cases for forwarding props in solid-query-devtools—and is specific and concise.
Description check ✅ Passed The description includes all required sections from the template (Changes, Checklist, Release Impact) with detailed explanations and both checklist items appropriately marked.
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/solid-query-devtools-devtools-restore-buttonposition-position-forward

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 29, 2026

View your CI Pipeline Execution ↗ for commit 6522e70

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

☁️ Nx Cloud last updated this comment at 2026-05-29 01:35:08 UTC

@sukvvon sukvvon self-assigned this May 29, 2026
@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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 6522e70

@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 7f947b9 into main May 29, 2026
9 checks passed
@sukvvon sukvvon deleted the test/solid-query-devtools-devtools-restore-buttonposition-position-forward branch May 29, 2026 01:38
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