From b97129752ee35c32b5b93118f5acbc4c7b7aca2c Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Mon, 18 Sep 2023 13:19:52 -0700 Subject: [PATCH] Add `shouldRenderCustomStyles` Jest tests --- src/components/combo_box/combo_box.test.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/combo_box/combo_box.test.tsx b/src/components/combo_box/combo_box.test.tsx index eb2bf1624a2..e2151d9ed57 100644 --- a/src/components/combo_box/combo_box.test.tsx +++ b/src/components/combo_box/combo_box.test.tsx @@ -10,6 +10,7 @@ import React, { ReactNode } from 'react'; import { act, fireEvent } from '@testing-library/react'; import { shallow, mount } from 'enzyme'; import { render } from '../../test/rtl'; +import { shouldRenderCustomStyles } from '../../test/internal'; import { requiredProps, findTestSubject, @@ -64,6 +65,17 @@ const options: TitanOption[] = [ ]; describe('EuiComboBox', () => { + shouldRenderCustomStyles(); + + shouldRenderCustomStyles(, { + skip: { parentTest: true }, + childProps: ['truncationProps', 'options[0]'], + renderCallback: async ({ getByTestSubject, findAllByTestSubject }) => { + fireEvent.click(getByTestSubject('comboBoxToggleListButton')); + await findAllByTestSubject('truncatedText'); + }, + }); + test('is rendered', () => { const { container } = render();