Skip to content

test(react-table): add unit tests for useTable_unstable and useDataGrid_unstable hooks#36050

Draft
dmytrokirpa wants to merge 1 commit intomicrosoft:masterfrom
dmytrokirpa:test/table-hook-tests
Draft

test(react-table): add unit tests for useTable_unstable and useDataGrid_unstable hooks#36050
dmytrokirpa wants to merge 1 commit intomicrosoft:masterfrom
dmytrokirpa:test/table-hook-tests

Conversation

@dmytrokirpa
Copy link
Copy Markdown
Contributor

Summary

Adds unit tests that cover the core behaviour of the two main table hooks before introducing new exports on top of them:

  • useTable_unstable — default state, noNativeElements, as prop, size, sortable
  • useDataGrid_unstable / useDataGridContextValues_unstable — default state, selectionMode → selectableRows, tableState.getRows(), resizableColumns, context shape

Stack order (review in this order)

  1. This PR — hook unit tests ← you are here
  2. feat(react-table): export useTableContextValues_unstable and useTableCellLayoutContextValues_unstable
  3. feat(react-headless-components-preview): headless Table and DataGrid component families

Test plan

  • nx test react-table passes with the new test files

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,85 @@
import * as React from 'react';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 2243 Changed
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 2172 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 654 Changed
vr-tests-react-components/CalendarCompat.multiDayView - RTL.default.chromium.png 654 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 600 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 910 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 505 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 25 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 32 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 54 Changed
vr-tests-react-components/TagPicker 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png 1319 Changed
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed

There were 5 duplicate changes discarded. Check the build logs for more information.

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