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

Function Example

packages/@adobe/react-spectrum/test/tabs/Tabs.test.js:913–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911
912 it('updates the tab index of the selected tab if programmatically changed', function () {
913 let Example = props => (
914 <Provider theme={theme}>
915 <Tabs aria-label="Test Tabs" items={defaultItems} selectedKey={props.selectedKey}>
916 <TabList>{item => <Item key={item.name} title={item.name || item.children} />}</TabList>
917 <TabPanels>{item => <Item key={item.name}>{item.children}</Item>}</TabPanels>
918 </Tabs>
919 </Provider>
920 );
921 let {getAllByRole, rerender} = render(<Example selectedKey="Tab 3" />);
922
923 let tabs = getAllByRole('tab');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected