Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FormTokenField: use KeyboardEvent.code, refactor tests to model RTL a…
…nd user-event (#43442) * FormTokenField: use KeyboardEvent.code instead of KetboardEvent.keyCode * Rewrite tests in TypeScript, modern RTL and using user-event * Fixtures to TypeScript * Use fixtures object instead of inline variables * Expand suggestions only when focused * Basic suggestions-related unit tests * Move suggestions up, split special token tests to their own describe call * Reuse existing logic instead of new focus-related ref * Transform suggestion tests, improve label test * Move special characters under displayTransform * Move "white space" tests to different secions * Tokens as objects * More unescaped values tests * Move fixtures values inline * __experimentalAutoSelectFirstMatch tests * Remove unnecessary old test files * __experimentalRenderItem, messages * CHANGELOG * Apply suggestions from code review Co-authored-by: Marin Atanasov <[email protected]> * Update packages/components/src/form-token-field/test/index.tsx Co-authored-by: Marin Atanasov <[email protected]> * Use initialValue instead of adding values manually, where possible * Use expectVisibleSuggestionsToBe * Add example with special characters Co-authored-by: Marin Atanasov <[email protected]>
- Loading branch information