Skip to content

Commit b971297

Browse files
committed
Add shouldRenderCustomStyles Jest tests
1 parent d188bb5 commit b971297

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/components/combo_box/combo_box.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import React, { ReactNode } from 'react';
1010
import { act, fireEvent } from '@testing-library/react';
1111
import { shallow, mount } from 'enzyme';
1212
import { render } from '../../test/rtl';
13+
import { shouldRenderCustomStyles } from '../../test/internal';
1314
import {
1415
requiredProps,
1516
findTestSubject,
@@ -64,6 +65,17 @@ const options: TitanOption[] = [
6465
];
6566

6667
describe('EuiComboBox', () => {
68+
shouldRenderCustomStyles(<EuiComboBox />);
69+
70+
shouldRenderCustomStyles(<EuiComboBox options={[{ label: 'test' }]} />, {
71+
skip: { parentTest: true },
72+
childProps: ['truncationProps', 'options[0]'],
73+
renderCallback: async ({ getByTestSubject, findAllByTestSubject }) => {
74+
fireEvent.click(getByTestSubject('comboBoxToggleListButton'));
75+
await findAllByTestSubject('truncatedText');
76+
},
77+
});
78+
6779
test('is rendered', () => {
6880
const { container } = render(<EuiComboBox {...requiredProps} />);
6981

0 commit comments

Comments
 (0)