We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eb770a commit f29ed4fCopy full SHA for f29ed4f
src/components/__tests__/Tabs-test.js
@@ -280,6 +280,23 @@ describe('<Tabs />', () => {
280
expect(result instanceof Error).toBe(true);
281
});
282
283
+ it('should allow random order for elements', () => {
284
+ const wrapper = mount(
285
+ <Tabs>
286
+ <TabPanel>Hello Foo</TabPanel>
287
+ <TabList>
288
+ <Tab>Foo</Tab>
289
+ <Tab>Bar</Tab>
290
+ </TabList>
291
+ <TabPanel>Hello Bar</TabPanel>
292
+ </Tabs>,
293
+ );
294
+
295
296
+ expect(wrapper.childAt(0).text()).toBe('Hello Foo');
297
+ expect(wrapper.childAt(2).text()).toBe('Hello Bar');
298
+ });
299
300
it('should not throw a warning when wrong element is found', () => {
301
const wrapper = shallow(
302
<Tabs>
0 commit comments