Skip to content

test(react-swatch-picker): add hook state coverage - #36533

Open
Dmytro Kirpa (dmytrokirpa) wants to merge 2 commits into
masterfrom
test/react-swatch-picker-hooks
Open

test(react-swatch-picker): add hook state coverage#36533
Dmytro Kirpa (dmytrokirpa) wants to merge 2 commits into
masterfrom
test/react-swatch-picker-hooks

Conversation

@dmytrokirpa

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

Add direct hook-level coverage for the SwatchPicker family before extracting reusable base hooks. The tests lock down returned state, context behavior, accessibility props, and callback forwarding.

Changes

  • add hook tests for SwatchPicker and SwatchPickerRow
  • add hook tests for ColorSwatch, ImageSwatch, and EmptySwatch
  • cover defaults, context state, prop precedence, selection state, and callbacks

Validation

  • yarn nx test react-swatch-picker --runInBand

PR stack

  1. This PR: add SwatchPicker hook state coverage
  2. feat(react-swatch-picker): expose headless base APIs #36534
  3. feat(react-headless-components-preview): add swatch picker controls #36535

This PR should be merged first.

@dmytrokirpa
Dmytro Kirpa (dmytrokirpa) force-pushed the test/react-swatch-picker-hooks branch from 65c6d75 to f48721b Compare August 6, 2026 16:25
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

Split coarse state assertions into single-concern cases and replace inline context providers with a shared wrapper helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant