Skip to content

Commit

Permalink
FontSizePicker: Rewrite unit tests to use userEvent and be more compr…
Browse files Browse the repository at this point in the history
…ehensive (#45298)

* Rewrite FontSizePicker unit tests to use userEvent and be more comprehensive

* Use header label's aria-label

* Put back the Gigantosaurus 🦖

* Update changelog

* Remove editorialising comment

* Use getByLabelText( 'Custom Size' ) to select slider

* Remove redundant test

* Add tests for non-px font sizes

* Assert length of options/radios

* Assert number of calls to onChange
  • Loading branch information
noisysocks authored Nov 1, 2022
1 parent 51d9222 commit fe31535
Show file tree
Hide file tree
Showing 2 changed files with 444 additions and 211 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- `CustomGradientBar`: Refactor away from Lodash ([#45367](https://github.com/WordPress/gutenberg/pull/45367/)).
- `TextControl`: Set Storybook control types on `help`, `label` and `type` ([#45405](https://github.com/WordPress/gutenberg/pull/45405)).
- `Autocomplete`: use Popover's new `placement` prop instead of legacy `position` prop ([#44396](https://github.com/WordPress/gutenberg/pull/44396/)).
- `FontSizePicker`: Add more comprehensive tests ([#45298](https://github.com/WordPress/gutenberg/pull/45298)).

## 21.3.0 (2022-10-19)

Expand Down
Loading

0 comments on commit fe31535

Please sign in to comment.