diff --git a/src/components/date_picker/super_date_picker/__snapshots__/super_date_picker.test.tsx.snap b/src/components/date_picker/super_date_picker/__snapshots__/super_date_picker.test.tsx.snap index 942022815b0..d753a10e5c1 100644 --- a/src/components/date_picker/super_date_picker/__snapshots__/super_date_picker.test.tsx.snap +++ b/src/components/date_picker/super_date_picker/__snapshots__/super_date_picker.test.tsx.snap @@ -8,7 +8,8 @@ exports[`EuiSuperDatePicker is rendered 1`] = ` > shallow(component).dive().dive(); describe('EuiSuperDatePicker', () => { + shouldRenderCustomStyles(, { + skipStyles: true, + }); + shouldRenderCustomStyles(, { + childProps: ['updateButtonProps'], + skipParentTest: true, + }); + test('is rendered', () => { const component = shallowAndDive( - + ); expect(component).toMatchSnapshot(); diff --git a/src/components/date_picker/super_date_picker/super_date_picker.tsx b/src/components/date_picker/super_date_picker/super_date_picker.tsx index 8b93c9713df..06c5ab7a293 100644 --- a/src/components/date_picker/super_date_picker/super_date_picker.tsx +++ b/src/components/date_picker/super_date_picker/super_date_picker.tsx @@ -541,6 +541,7 @@ export class EuiSuperDatePickerInternal extends Component< width: _width, isQuickSelectOnly, compressed, + className, } = this.props; // Force reduction in width if showing quick select only @@ -600,13 +601,14 @@ export class EuiSuperDatePickerInternal extends Component< compressed={compressed} isDisabled={isDisabled} data-test-subj={dataTestSubj} + className={className} /> ) : ( <> {}; describe('EuiSuperUpdateButton', () => { + shouldRenderCustomStyles(); + shouldRenderCustomStyles( + Test, delay: 'regular', position: 'top' }} // React throws a `Failed prop type` error without this + />, + { + childProps: ['toolTipProps'], + skipParentTest: true, + renderCallback: async ({ getByTestSubject }) => { + fireEvent.mouseOver(getByTestSubject('trigger')); + await waitForEuiToolTipVisible(); + }, + } + ); + test('is rendered', () => { const component = shallow(); diff --git a/src/components/key_pad_menu/key_pad_menu.test.tsx b/src/components/key_pad_menu/key_pad_menu.test.tsx index a9c5826b8ba..be96a29ed14 100644 --- a/src/components/key_pad_menu/key_pad_menu.test.tsx +++ b/src/components/key_pad_menu/key_pad_menu.test.tsx @@ -9,10 +9,17 @@ import React from 'react'; import { render } from 'enzyme'; import { requiredProps } from '../../test/required_props'; +import { shouldRenderCustomStyles } from '../../test/internal'; import { EuiKeyPadMenu } from './key_pad_menu'; describe('EuiKeyPadMenu', () => { + shouldRenderCustomStyles(); + shouldRenderCustomStyles(, { + childProps: ['checkable.legendProps'], + skipParentTest: true, + }); + test('is rendered', () => { const component = render(); diff --git a/src/components/key_pad_menu/key_pad_menu_item.test.tsx b/src/components/key_pad_menu/key_pad_menu_item.test.tsx index 1826bde2047..92e46e75033 100644 --- a/src/components/key_pad_menu/key_pad_menu_item.test.tsx +++ b/src/components/key_pad_menu/key_pad_menu_item.test.tsx @@ -8,11 +8,35 @@ import React from 'react'; import { render, shallow } from 'enzyme'; +import { fireEvent } from '@testing-library/react'; +import { waitForEuiToolTipVisible } from '../../test/rtl'; import { requiredProps } from '../../test'; +import { shouldRenderCustomStyles } from '../../test/internal'; import { EuiKeyPadMenuItem } from './key_pad_menu_item'; describe('EuiKeyPadMenuItem', () => { + shouldRenderCustomStyles( + Test + ); + shouldRenderCustomStyles( + + Test + , + { + skipParentTest: true, + childProps: ['betaBadgeTooltipProps'], + renderCallback: async ({ getByTestSubject }) => { + fireEvent.mouseOver(getByTestSubject('trigger')); + await waitForEuiToolTipVisible(); + }, + } + ); + test('is rendered', () => { const component = render( diff --git a/src/components/tool_tip/__snapshots__/tool_tip.test.tsx.snap b/src/components/tool_tip/__snapshots__/tool_tip.test.tsx.snap index 923b18ec8f7..4d17225945c 100644 --- a/src/components/tool_tip/__snapshots__/tool_tip.test.tsx.snap +++ b/src/components/tool_tip/__snapshots__/tool_tip.test.tsx.snap @@ -30,7 +30,9 @@ exports[`EuiToolTip display prop renders block 1`] = ` `; exports[`EuiToolTip is rendered 1`] = ` - +
{ + shouldRenderCustomStyles( + , + { + childProps: ['iconProps'], + renderCallback: async ({ getByTestSubject }) => { + fireEvent.mouseOver(getByTestSubject('trigger')); + await waitForEuiToolTipVisible(); + }, + } + ); + test('is rendered', () => { const component = render( diff --git a/src/components/tool_tip/tool_tip.test.tsx b/src/components/tool_tip/tool_tip.test.tsx index 6181b8895cb..ebbefd185ab 100644 --- a/src/components/tool_tip/tool_tip.test.tsx +++ b/src/components/tool_tip/tool_tip.test.tsx @@ -15,10 +15,24 @@ import { waitForEuiToolTipHidden, } from '../../test/rtl'; import { requiredProps, findTestSubject } from '../../test'; +import { shouldRenderCustomStyles } from '../../test/internal'; import { EuiToolTip } from './tool_tip'; describe('EuiToolTip', () => { + shouldRenderCustomStyles( + +