@astryxdesign/core 0.1.6-canary.e65bbd4 → 0.1.6-canary.e8d4c3f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.1.6-canary.
|
|
3
|
+
"version": "0.1.6-canary.e8d4c3f",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import {describe, it, expect, vi, beforeEach, afterEach} from 'vitest';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
render,
|
|
15
|
+
screen,
|
|
16
|
+
fireEvent,
|
|
17
|
+
waitFor,
|
|
18
|
+
within,
|
|
19
|
+
} from '@testing-library/react';
|
|
14
20
|
import userEvent from '@testing-library/user-event';
|
|
15
21
|
import {Selector} from './Selector';
|
|
16
22
|
import {SelectorOption} from './SelectorOption';
|
|
@@ -545,7 +551,11 @@ describe('Selector', () => {
|
|
|
545
551
|
await user.click(screen.getByRole('button', {name: 'Fruit'}));
|
|
546
552
|
await user.type(screen.getByRole('combobox', h), 'xyz');
|
|
547
553
|
expect(screen.queryAllByRole('option', h)).toHaveLength(0);
|
|
548
|
-
|
|
554
|
+
// Scope to the listbox: the polite live region also announces "No results
|
|
555
|
+
// found", so an unscoped query matches both the visible empty state and
|
|
556
|
+
// the a11y announcement.
|
|
557
|
+
const listbox = screen.getByRole('listbox', h);
|
|
558
|
+
expect(within(listbox).getByText('No results found')).toBeInTheDocument();
|
|
549
559
|
});
|
|
550
560
|
|
|
551
561
|
it('calls onChange when selecting a filtered option', async () => {
|