MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TestSelect

Function TestSelect

packages/react-aria-components/test/Select.test.js:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25import userEvent from '@testing-library/user-event';
26
27let TestSelect = props => (
28 <Select data-testid="select" data-foo="bar" {...props}>
29 <Label>Favorite Animal</Label>
30 <Button>
31 <SelectValue />
32 </Button>
33 <Text slot="description">Description</Text>
34 <Text slot="errorMessage">Error</Text>
35 <Popover>
36 <ListBox>
37 <ListBoxItem id="cat">Cat</ListBoxItem>
38 <ListBoxItem id="dog">Dog</ListBoxItem>
39 <ListBoxItem id="kangaroo">Kangaroo</ListBoxItem>
40 </ListBox>
41 </Popover>
42 </Select>
43);
44
45describe('Select', () => {
46 let user;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected