Skip to content

No warnings when testing#592

Open
kneth wants to merge 5 commits into
masterfrom
kneth/no-warnings-when-testing
Open

No warnings when testing#592
kneth wants to merge 5 commits into
masterfrom
kneth/no-warnings-when-testing

Conversation

@kneth
Copy link
Copy Markdown
Member

@kneth kneth commented May 12, 2026

Summary of changes

#585 without GSD files.

Checklist

  • Link to issue this PR refers to:
  • Relevant changes are reflected in CHANGES.md.
  • Added or changed code is covered by tests.
  • Required Grand Central APIs are already merged.

kneth and others added 5 commits May 12, 2026 10:00
Initialize activeTab state synchronously via lazy initializer instead
of undefined, and remove redundant defaultValue prop from Radix Tabs
Root. Eliminates the React warning in CrateTabsShad and SQLResults tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds autoResetPageIndex: false to prevent @tanstack/table-core from
scheduling page-index resets via Promise.resolve() microtasks. Those
deferred updates fired outside act() in synchronous tests, causing
console warnings in SQLResultsTable and SQLResults test suites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a console.error spy in beforeAll to filter the "trigger element
and popup element should in same shadow root" warning emitted by
@rc-component/trigger in jsdom. The warning is a React 19 passive
effect timing issue (dev-mode only) and does not affect test outcomes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oads

Eliminates the jsdom 'Not implemented: navigation' error in tests by
removing bare <a href="data:..."> elements from SQLResultsTable. Download
is now triggered via URL.createObjectURL + a transient anchor, keeping
large data payloads out of the DOM. Tests updated to verify Blob type;
test/setup.ts gains URL and anchor-click mocks required by jsdom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ct() warnings

antd's static message/notification APIs use an internal `act` that defaults to
a plain pass-through. In a React 19 test environment, this causes
"not configured to support act(...)" warnings because state updates happen
outside React's act scope.

Wire antd's `actWrapper` to RTL's `act` (which sets IS_REACT_ACT_ENVIRONMENT=true)
so all antd state updates are correctly batched. Using RTL's act rather than
React's raw act is required because the IS_REACT_ACT_ENVIRONMENT flag must be
set when act() fires or React still warns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kneth kneth requested a review from joncombe as a code owner May 12, 2026 09:13
@kneth kneth mentioned this pull request May 12, 2026
4 tasks
@kneth kneth self-assigned this May 12, 2026
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