From 91d9e4d7e8f7ebfae18a69a884ef0af45d29a764 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 25 Feb 2020 11:30:53 -0600 Subject: [PATCH] Mock `EuiIcon` in Jest (#2878) * mock euiicon * all the snaps * Inverted the mocking approach * CL Co-authored-by: Chandler Prall --- CHANGELOG.md | 1 + scripts/jest/config.json | 3 +- scripts/jest/mocks/icon_mock.js | 1 + .../__snapshots__/accordion.test.tsx.snap | 108 +-- .../badge/__snapshots__/badge.test.tsx.snap | 36 +- .../collapsed_item_actions.test.tsx.snap | 11 +- .../in_memory_table.test.tsx.snap | 75 +- .../button/__snapshots__/button.test.tsx.snap | 33 +- .../__snapshots__/button_empty.test.tsx.snap | 33 +- .../__snapshots__/button_icon.test.tsx.snap | 11 +- .../__snapshots__/call_out.test.tsx.snap | 11 +- .../card/__snapshots__/card.test.tsx.snap | 12 +- .../__snapshots__/card_select.test.tsx.snap | 11 +- .../__snapshots__/code_block.test.tsx.snap | 22 +- .../__snapshots__/color_picker.test.tsx.snap | 187 ++--- .../__snapshots__/combo_box.test.tsx.snap | 22 +- .../__snapshots__/context_menu.test.tsx.snap | 98 +-- .../context_menu_item.test.tsx.snap | 12 +- .../context_menu_panel.test.tsx.snap | 110 +-- .../__snapshots__/control_bar.test.tsx.snap | 266 ++----- .../__snapshots__/data_grid.test.tsx.snap | 429 ++++-------- .../date_picker_range.test.js.snap | 11 +- .../__snapshots__/empty_prompt.test.tsx.snap | 24 +- .../__snapshots__/facet_button.test.tsx.snap | 12 +- .../__snapshots__/filter_button.test.tsx.snap | 11 +- .../filter_select_item.test.tsx.snap | 11 +- .../flyout/__snapshots__/flyout.test.tsx.snap | 77 +- .../__snapshots__/file_picker.test.tsx.snap | 11 +- .../form_control_layout.test.tsx.snap | 56 +- ..._control_layout_clear_button.test.tsx.snap | 12 +- ...m_control_layout_custom_icon.test.tsx.snap | 22 +- ...orm_control_layout_delimited.test.tsx.snap | 11 +- .../__snapshots__/super_select.test.tsx.snap | 280 ++------ .../super_select_control.test.tsx.snap | 88 +-- .../switch/__snapshots__/switch.test.tsx.snap | 48 +- .../__snapshots__/header_logo.test.tsx.snap | 36 +- .../__snapshots__/header_links.test.tsx.snap | 11 +- .../health/__snapshots__/health.test.tsx.snap | 11 +- src/components/icon/icon.test.tsx | 4 + .../image/__snapshots__/image.test.tsx.snap | 13 +- .../link/__snapshots__/link.test.tsx.snap | 12 +- .../list_group_item.test.tsx.snap | 35 +- .../loading_kibana.test.tsx.snap | 44 +- .../__snapshots__/confirm_modal.test.tsx.snap | 22 +- .../modal/__snapshots__/modal.test.tsx.snap | 11 +- .../__snapshots__/nav_drawer.test.js.snap | 264 ++----- .../__snapshots__/pagination.test.tsx.snap | 22 +- .../selectable_list_item.test.tsx.snap | 86 +-- .../selectable_search.test.tsx.snap | 22 +- .../__snapshots__/side_nav.test.tsx.snap | 112 +-- .../steps/__snapshots__/step.test.tsx.snap | 36 +- .../step_horizontal.test.tsx.snap | 48 +- .../__snapshots__/step_number.test.tsx.snap | 36 +- .../steps_horizontal.test.tsx.snap | 12 +- .../__snapshots__/suggest_input.test.tsx.snap | 13 +- .../__snapshots__/suggest_item.test.tsx.snap | 33 +- .../table_sort_mobile.test.tsx.snap | 11 +- .../table_sort_mobile_item.test.tsx.snap | 12 +- .../table_pagination.test.tsx.snap | 55 +- .../global_toast_list.test.tsx.snap | 42 +- .../toast/__snapshots__/toast.test.tsx.snap | 25 +- .../token/__snapshots__/token.test.tsx.snap | 660 ++++-------------- .../__snapshots__/icon_tip.test.tsx.snap | 45 +- .../__snapshots__/tree_view.test.tsx.snap | 44 +- 64 files changed, 953 insertions(+), 2990 deletions(-) create mode 100644 scripts/jest/mocks/icon_mock.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6f7db3f56..777c40c70cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Extending `EuiSelectable[options]` type with correct HTML element ([#2869](https://github.com/elastic/eui/pull/2869)) - Added check mark to single selection `EuiComboBox` ([#2890](https://github.com/elastic/eui/pull/2890)) - Added `logoGoogleG` third-party logo to `EuiIcon` ([#2853](https://github.com/elastic/eui/pull/2853)) +- Added Jest `modulesNameMapper` alias for `EuiIcon` using test environment mock ([#2878](https://github.com/elastic/eui/pull/2878)) **Bug fixes** diff --git a/scripts/jest/config.json b/scripts/jest/config.json index c7f87a762d3..7668eed3a37 100644 --- a/scripts/jest/config.json +++ b/scripts/jest/config.json @@ -15,7 +15,8 @@ ], "moduleNameMapper": { "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/scripts/jest/mocks/file_mock.js", - "\\.(css|less|scss)$": "/scripts/jest/mocks/style_mock.js" + "\\.(css|less|scss)$": "/scripts/jest/mocks/style_mock.js", + "/icon$": "/scripts/jest/mocks/icon_mock.js" }, "setupFiles": [ "/scripts/jest/setup/polyfills.js", diff --git a/scripts/jest/mocks/icon_mock.js b/scripts/jest/mocks/icon_mock.js new file mode 100644 index 00000000000..f7d4989cfd2 --- /dev/null +++ b/scripts/jest/mocks/icon_mock.js @@ -0,0 +1 @@ +export * from '../../../src/components/icon/icon.testenv'; diff --git a/src/components/accordion/__snapshots__/accordion.test.tsx.snap b/src/components/accordion/__snapshots__/accordion.test.tsx.snap index 576221f0924..492bcd03be8 100644 --- a/src/components/accordion/__snapshots__/accordion.test.tsx.snap +++ b/src/components/accordion/__snapshots__/accordion.test.tsx.snap @@ -27,25 +27,11 @@ exports[`EuiAccordion behavior closes when clicked twice 1`] = ` size="m" type="arrowRight" > - - - +
@@ -105,25 +91,11 @@ exports[`EuiAccordion behavior opens when clicked once 1`] = ` size="m" type="arrowRight" > - - - +
@@ -174,15 +146,9 @@ exports[`EuiAccordion is rendered 1`] = ` - @@ -217,15 +183,9 @@ exports[`EuiAccordion props buttonContent is rendered 1`] = ` - @@ -264,15 +224,9 @@ exports[`EuiAccordion props buttonContentClassName is rendered 1`] = ` - - @@ -359,15 +307,9 @@ exports[`EuiAccordion props initialIsOpen is rendered 1`] = ` - diff --git a/src/components/badge/__snapshots__/badge.test.tsx.snap b/src/components/badge/__snapshots__/badge.test.tsx.snap index bf15eec40b7..187c4527013 100644 --- a/src/components/badge/__snapshots__/badge.test.tsx.snap +++ b/src/components/badge/__snapshots__/badge.test.tsx.snap @@ -210,15 +210,9 @@ exports[`EuiBadge props iconSide left is rendered 1`] = ` > Content - @@ -237,15 +231,9 @@ exports[`EuiBadge props iconSide right is rendered 1`] = ` > Content - @@ -264,15 +252,9 @@ exports[`EuiBadge props iconType is rendered 1`] = ` > Content - diff --git a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap index 781e43cbe8a..3268b0b4941 100644 --- a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap +++ b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap @@ -17,15 +17,10 @@ exports[`CollapsedItemActions render 1`] = ` data-test-subj="euiCollapsedItemActionsButton" type="button" > - diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap index 82cc6ec84f3..626acbbb17a 100644 --- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap +++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap @@ -389,25 +389,12 @@ exports[`EuiInMemoryTable behavior pagination 1`] = ` size="m" type="arrowDown" > - - - + @@ -134,15 +119,10 @@ exports[`renders EuiColorPicker with a color swatch when color is defined 1`] = -
@@ -188,15 +168,10 @@ exports[`renders EuiColorPicker with an empty swatch when color is "" 1`] = ` -
@@ -209,15 +184,10 @@ exports[`renders EuiColorPicker with an empty swatch when color is "" 1`] = ` - @@ -263,15 +233,10 @@ exports[`renders EuiColorPicker with an empty swatch when color is null 1`] = ` - @@ -284,15 +249,10 @@ exports[`renders EuiColorPicker with an empty swatch when color is null 1`] = ` - @@ -344,15 +304,10 @@ exports[`renders a EuiColorPicker with a prepend and append 1`] = ` - @@ -365,15 +320,10 @@ exports[`renders a EuiColorPicker with a prepend and append 1`] = ` - @@ -425,15 +375,10 @@ exports[`renders compressed EuiColorPicker 1`] = ` - @@ -446,15 +391,10 @@ exports[`renders compressed EuiColorPicker 1`] = ` - @@ -502,15 +442,10 @@ exports[`renders disabled EuiColorPicker 1`] = ` - @@ -523,15 +458,10 @@ exports[`renders disabled EuiColorPicker 1`] = ` - @@ -578,15 +508,10 @@ exports[`renders fullWidth EuiColorPicker 1`] = ` - @@ -599,15 +524,10 @@ exports[`renders fullWidth EuiColorPicker 1`] = ` - @@ -838,15 +758,10 @@ exports[`renders readOnly EuiColorPicker 1`] = ` - diff --git a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap index e74a238243a..0df100a5ed5 100644 --- a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap +++ b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap @@ -45,15 +45,10 @@ exports[`EuiComboBox is rendered 1`] = ` data-test-subj="comboBoxToggleListButton" type="button" > - @@ -261,15 +256,10 @@ exports[`props options list is rendered 1`] = ` data-test-subj="comboBoxToggleListButton" type="button" > - diff --git a/src/components/context_menu/__snapshots__/context_menu.test.tsx.snap b/src/components/context_menu/__snapshots__/context_menu.test.tsx.snap index 07dd69b196e..85a3236d7bb 100644 --- a/src/components/context_menu/__snapshots__/context_menu.test.tsx.snap +++ b/src/components/context_menu/__snapshots__/context_menu.test.tsx.snap @@ -68,21 +68,10 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - +
@@ -118,21 +107,10 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - +
@@ -160,15 +138,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - 2a - @@ -215,15 +181,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the > 2b - @@ -239,15 +199,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the > 2c - @@ -273,15 +227,9 @@ exports[`EuiContextMenu props panels and initialPanelId renders the referenced p - - diff --git a/src/components/context_menu/__snapshots__/context_menu_panel.test.tsx.snap b/src/components/context_menu/__snapshots__/context_menu_panel.test.tsx.snap index 391fa49716f..f786ba06ce3 100644 --- a/src/components/context_menu/__snapshots__/context_menu_panel.test.tsx.snap +++ b/src/components/context_menu/__snapshots__/context_menu_panel.test.tsx.snap @@ -68,21 +68,10 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - +
@@ -118,21 +107,10 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - +
@@ -160,15 +138,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the - 2a - @@ -215,15 +181,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the > 2b - @@ -239,15 +199,9 @@ exports[`EuiContextMenu props panels and initialPanelId allows you to click the > 2c - @@ -273,15 +227,9 @@ exports[`EuiContextMenu props panels and initialPanelId renders the referenced p - - -
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
-
- - - + className="euiControlBar__icon" + color="danger" + data-euiicon-type="alert" + />
- -
@@ -203,15 +188,10 @@ Array [ - - - -
@@ -434,15 +399,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -501,15 +461,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -562,15 +517,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -629,15 +579,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -690,15 +635,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -770,15 +710,10 @@ Array [ - - - -
@@ -1059,15 +979,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1182,15 +1097,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1243,15 +1153,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1366,15 +1271,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1427,15 +1327,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1532,15 +1427,10 @@ Array [ - - - -
@@ -1765,15 +1640,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1832,15 +1702,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1893,15 +1758,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -1960,15 +1820,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > -
@@ -2021,15 +1876,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - @@ -2098,15 +1948,10 @@ Array [ - - - - @@ -2329,15 +2159,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - @@ -2396,15 +2221,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - @@ -2457,15 +2277,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - @@ -2524,15 +2339,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - @@ -2585,15 +2395,10 @@ Array [ title="Click or hit enter to interact with cell content" type="button" > - diff --git a/src/components/date_picker/__snapshots__/date_picker_range.test.js.snap b/src/components/date_picker/__snapshots__/date_picker_range.test.js.snap index 7285e1f08c4..e7c0ae33e80 100644 --- a/src/components/date_picker/__snapshots__/date_picker_range.test.js.snap +++ b/src/components/date_picker/__snapshots__/date_picker_range.test.js.snap @@ -9,15 +9,8 @@ exports[`EuiDatePickerRange is rendered 1`] = ` - diff --git a/src/components/empty_prompt/__snapshots__/empty_prompt.test.tsx.snap b/src/components/empty_prompt/__snapshots__/empty_prompt.test.tsx.snap index 264d2c651eb..b93126155c6 100644 --- a/src/components/empty_prompt/__snapshots__/empty_prompt.test.tsx.snap +++ b/src/components/empty_prompt/__snapshots__/empty_prompt.test.tsx.snap @@ -6,15 +6,9 @@ exports[`EuiEmptyPrompt is rendered 1`] = ` class="euiEmptyPrompt testClass1 testClass2" data-test-subj="test subject string" > -
-
- - -
-
@@ -76,15 +71,10 @@ exports[`EuiFlyout max width can be set to a custom number 1`] = ` data-test-subj="euiFlyoutCloseButton" type="button" > -
@@ -124,15 +114,10 @@ exports[`EuiFlyout max width can be set to a custom value and measurement 1`] = data-test-subj="euiFlyoutCloseButton" type="button" > - @@ -171,15 +156,10 @@ exports[`EuiFlyout max width can be set to a default 1`] = ` data-test-subj="euiFlyoutCloseButton" type="button" > - @@ -247,15 +227,10 @@ exports[`EuiFlyout size l is rendered 1`] = ` data-test-subj="euiFlyoutCloseButton" type="button" > - @@ -294,15 +269,10 @@ exports[`EuiFlyout size m is rendered 1`] = ` data-test-subj="euiFlyoutCloseButton" type="button" > - @@ -341,15 +311,10 @@ exports[`EuiFlyout size s is rendered 1`] = ` data-test-subj="euiFlyoutCloseButton" type="button" > - diff --git a/src/components/form/file_picker/__snapshots__/file_picker.test.tsx.snap b/src/components/form/file_picker/__snapshots__/file_picker.test.tsx.snap index 36833bba0dd..2646cef0b3b 100644 --- a/src/components/form/file_picker/__snapshots__/file_picker.test.tsx.snap +++ b/src/components/form/file_picker/__snapshots__/file_picker.test.tsx.snap @@ -16,15 +16,10 @@ exports[`EuiFilePicker is rendered 1`] = `
-
-
@@ -69,15 +63,10 @@ exports[`EuiFormControlLayout props icon is rendered as a string 1`] = ` -
@@ -99,15 +88,10 @@ exports[`EuiFormControlLayout props icon is rendered as an object 1`] = ` class="euiFormControlLayoutCustomIcon customClass" data-test-subj="myIcon" > -
@@ -128,15 +112,10 @@ exports[`EuiFormControlLayout props icon side left is rendered 1`] = ` - @@ -157,15 +136,10 @@ exports[`EuiFormControlLayout props icon side right is rendered 1`] = ` - diff --git a/src/components/form/form_control_layout/__snapshots__/form_control_layout_clear_button.test.tsx.snap b/src/components/form/form_control_layout/__snapshots__/form_control_layout_clear_button.test.tsx.snap index 7fc777146cf..ea446b013a4 100644 --- a/src/components/form/form_control_layout/__snapshots__/form_control_layout_clear_button.test.tsx.snap +++ b/src/components/form/form_control_layout/__snapshots__/form_control_layout_clear_button.test.tsx.snap @@ -7,15 +7,9 @@ exports[`EuiFormControlLayoutClearButton is rendered 1`] = ` data-test-subj="clearButton" type="button" > - `; diff --git a/src/components/form/form_control_layout/__snapshots__/form_control_layout_custom_icon.test.tsx.snap b/src/components/form/form_control_layout/__snapshots__/form_control_layout_custom_icon.test.tsx.snap index 42a8a3ba696..7215b218ab0 100644 --- a/src/components/form/form_control_layout/__snapshots__/form_control_layout_custom_icon.test.tsx.snap +++ b/src/components/form/form_control_layout/__snapshots__/form_control_layout_custom_icon.test.tsx.snap @@ -6,15 +6,10 @@ exports[`EuiFormControlLayoutCustomIcon is rendered as button 1`] = ` data-test-subj="customIcon" type="button" > - `; @@ -24,15 +19,10 @@ exports[`EuiFormControlLayoutCustomIcon is rendered as span 1`] = ` class="euiFormControlLayoutCustomIcon customClass" data-test-subj="customIcon" > -
`; diff --git a/src/components/form/form_control_layout/__snapshots__/form_control_layout_delimited.test.tsx.snap b/src/components/form/form_control_layout/__snapshots__/form_control_layout_delimited.test.tsx.snap index 80d262fc253..d31af264e1a 100644 --- a/src/components/form/form_control_layout/__snapshots__/form_control_layout_delimited.test.tsx.snap +++ b/src/components/form/form_control_layout/__snapshots__/form_control_layout_delimited.test.tsx.snap @@ -50,15 +50,8 @@ exports[`EuiFormControlLayoutDelimited props delimiter is rendered as a node 1`]
-
diff --git a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap index 3f251ce1c58..b08ec8be4a3 100644 --- a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap +++ b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap @@ -39,15 +39,10 @@ exports[`EuiSuperSelect is rendered 1`] = ` - @@ -96,15 +91,10 @@ exports[`EuiSuperSelect props compressed is rendered 1`] = ` - @@ -152,15 +142,10 @@ exports[`EuiSuperSelect props custom display is propagated to dropdown 1`] = ` - @@ -214,15 +199,9 @@ exports[`EuiSuperSelect props custom display is propagated to dropdown 1`] = ` - - - @@ -368,15 +336,10 @@ exports[`EuiSuperSelect props more props are propogated to each option 1`] = ` - @@ -432,15 +395,9 @@ exports[`EuiSuperSelect props more props are propogated to each option 1`] = ` - - - - - + diff --git a/src/components/form/super_select/__snapshots__/super_select_control.test.tsx.snap b/src/components/form/super_select/__snapshots__/super_select_control.test.tsx.snap index 7e99f042576..f6162b57f15 100644 --- a/src/components/form/super_select/__snapshots__/super_select_control.test.tsx.snap +++ b/src/components/form/super_select/__snapshots__/super_select_control.test.tsx.snap @@ -34,15 +34,10 @@ Array [ - @@ -83,15 +78,10 @@ Array [ - @@ -132,15 +122,10 @@ Array [ - @@ -181,15 +166,10 @@ Array [ - @@ -230,15 +210,10 @@ Array [ - @@ -279,15 +254,10 @@ Array [ - @@ -331,15 +301,10 @@ Array [ - @@ -382,15 +347,10 @@ Array [ - diff --git a/src/components/form/switch/__snapshots__/switch.test.tsx.snap b/src/components/form/switch/__snapshots__/switch.test.tsx.snap index 654198902ae..467f89e4cad 100644 --- a/src/components/form/switch/__snapshots__/switch.test.tsx.snap +++ b/src/components/form/switch/__snapshots__/switch.test.tsx.snap @@ -21,25 +21,13 @@ exports[`EuiSwitch assigns automatically generated ID to label 1`] = ` - - @@ -76,25 +64,13 @@ exports[`EuiSwitch is rendered 1`] = ` - - diff --git a/src/components/header/__snapshots__/header_logo.test.tsx.snap b/src/components/header/__snapshots__/header_logo.test.tsx.snap index fe876e91fc5..e2b9a785ce8 100644 --- a/src/components/header/__snapshots__/header_logo.test.tsx.snap +++ b/src/components/header/__snapshots__/header_logo.test.tsx.snap @@ -6,16 +6,10 @@ exports[`EuiHeaderLogo is rendered 1`] = ` class="euiHeaderLogo testClass1 testClass2" data-test-subj="test subject string" > - `; @@ -25,16 +19,10 @@ exports[`EuiHeaderLogo renders href 1`] = ` class="euiHeaderLogo" href="#" > - `; @@ -44,16 +32,10 @@ exports[`EuiHeaderLogo renders optional props 1`] = ` class="euiHeaderLogo" style="color:red" > - `; diff --git a/src/components/header/header_links/__snapshots__/header_links.test.tsx.snap b/src/components/header/header_links/__snapshots__/header_links.test.tsx.snap index b4001331eb7..b05fbdf2d09 100644 --- a/src/components/header/header_links/__snapshots__/header_links.test.tsx.snap +++ b/src/components/header/header_links/__snapshots__/header_links.test.tsx.snap @@ -24,15 +24,8 @@ exports[`EuiHeaderLinks is rendered 1`] = ` class="euiHeaderSectionItem__button" type="button" > - diff --git a/src/components/health/__snapshots__/health.test.tsx.snap b/src/components/health/__snapshots__/health.test.tsx.snap index 570bb41a377..b98b662987a 100644 --- a/src/components/health/__snapshots__/health.test.tsx.snap +++ b/src/components/health/__snapshots__/health.test.tsx.snap @@ -12,15 +12,8 @@ exports[`EuiHealth is rendered 1`] = `
-
{ + return require.requireActual('./icon'); +}); + const prettyHtml = cheerio.load(''); function testIcon(props: PropsOf) { diff --git a/src/components/image/__snapshots__/image.test.tsx.snap b/src/components/image/__snapshots__/image.test.tsx.snap index 68532048b81..2627b8bba43 100644 --- a/src/components/image/__snapshots__/image.test.tsx.snap +++ b/src/components/image/__snapshots__/image.test.tsx.snap @@ -32,15 +32,10 @@ exports[`EuiImage is rendered and allows full screen 1`] = ` data-test-subj="test subject string" src="/cat.jpg" /> - diff --git a/src/components/link/__snapshots__/link.test.tsx.snap b/src/components/link/__snapshots__/link.test.tsx.snap index c7033872a2f..6a9c5d7cf8b 100644 --- a/src/components/link/__snapshots__/link.test.tsx.snap +++ b/src/components/link/__snapshots__/link.test.tsx.snap @@ -41,16 +41,10 @@ exports[`EuiLink it is an external link 1`] = ` href="/baz/bing" rel="noreferrer" > - `; diff --git a/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap b/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap index 320dd40822b..cc4c0775932 100644 --- a/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap +++ b/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap @@ -36,15 +36,10 @@ exports[`EuiListGroupItem props extraAction is rendered 1`] = ` class="euiButtonIcon euiButtonIcon--primary euiListGroupItem__extraAction euiListGroupItem__extraAction-alwaysShow" type="button" > - @@ -111,15 +106,9 @@ exports[`EuiListGroupItem props iconType is rendered 1`] = ` - - - @@ -30,15 +23,8 @@ exports[`EuiLoadingKibana size l is rendered 1`] = ` - @@ -51,15 +37,8 @@ exports[`EuiLoadingKibana size m is rendered 1`] = ` - @@ -72,15 +51,8 @@ exports[`EuiLoadingKibana size xl is rendered 1`] = ` - diff --git a/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap b/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap index cdfebf3a559..1f40a73883a 100644 --- a/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap +++ b/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap @@ -26,15 +26,10 @@ Array [ class="euiButtonIcon euiButtonIcon--text euiModal__closeIcon" type="button" > -
-
-
- - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap b/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap index 455bc780554..16b977c8c09 100644 --- a/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap +++ b/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap @@ -11,15 +11,9 @@ exports[`EuiSelectableListItem is rendered 1`] = ` - - - - - - - -
@@ -56,15 +51,10 @@ exports[`EuiSelectableSearch props defaultValue 1`] = ` -
diff --git a/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap b/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap index 575510a6883..b65107a87fb 100644 --- a/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap +++ b/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap @@ -16,15 +16,10 @@ exports[`EuiSideNav is rendered 1`] = ` - @@ -48,15 +43,10 @@ exports[`EuiSideNav props isOpenOnMobile defaults to false 1`] = ` - @@ -80,15 +70,10 @@ exports[`EuiSideNav props isOpenOnMobile is rendered when specified as true 1`] - @@ -112,15 +97,10 @@ exports[`EuiSideNav props items is rendered 1`] = ` - @@ -177,15 +157,9 @@ exports[`EuiSideNav props items is rendered 1`] = ` > C -
@@ -210,15 +184,10 @@ exports[`EuiSideNav props items renders items having { forceOpen: true } in open - @@ -340,15 +309,10 @@ exports[`EuiSideNav props items renders items using a specified callback 1`] = ` - @@ -414,15 +378,10 @@ exports[`EuiSideNav props items renders items which are links 1`] = ` - @@ -480,15 +439,9 @@ exports[`EuiSideNav props items renders items which are links 1`] = ` > C
-
@@ -513,15 +466,10 @@ exports[`EuiSideNav props items renders selected item and automatically opens pa - diff --git a/src/components/steps/__snapshots__/step.test.tsx.snap b/src/components/steps/__snapshots__/step.test.tsx.snap index 21bc190fd0a..7ffe2836e6e 100644 --- a/src/components/steps/__snapshots__/step.test.tsx.snap +++ b/src/components/steps/__snapshots__/step.test.tsx.snap @@ -71,16 +71,10 @@ exports[`EuiStep props status complete is rendered 1`] = ` aria-label="Step 1" class="euiStepNumber euiStepNumber--complete euiStep__circle" > -

-

-

-

-
-
-
-
`; @@ -36,16 +30,10 @@ exports[`EuiStepNumber props status danger is rendered 1`] = `
-
`; @@ -70,16 +58,10 @@ exports[`EuiStepNumber props status warning is rendered 1`] = `
-
`; diff --git a/src/components/steps/__snapshots__/steps_horizontal.test.tsx.snap b/src/components/steps/__snapshots__/steps_horizontal.test.tsx.snap index d45967f661e..86f32424d51 100644 --- a/src/components/steps/__snapshots__/steps_horizontal.test.tsx.snap +++ b/src/components/steps/__snapshots__/steps_horizontal.test.tsx.snap @@ -23,16 +23,10 @@ exports[`EuiStepsHorizontal is rendered 1`] = `
-
-
diff --git a/src/components/suggest/__snapshots__/suggest_item.test.tsx.snap b/src/components/suggest/__snapshots__/suggest_item.test.tsx.snap index c3448f97f3f..5614e5858c2 100644 --- a/src/components/suggest/__snapshots__/suggest_item.test.tsx.snap +++ b/src/components/suggest/__snapshots__/suggest_item.test.tsx.snap @@ -9,15 +9,8 @@ exports[`EuiSuggestItem is rendered 1`] = ` - - - - - - - @@ -187,15 +172,10 @@ exports[`EuiTablePagination is rendered when hiding the per page options 1`] = ` data-test-subj="pagination-button-previous" type="button" > - diff --git a/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap b/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap index fa7eaa20ccb..06d9c0582e4 100644 --- a/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap +++ b/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap @@ -31,15 +31,10 @@ exports[`EuiGlobalToastList props toasts is rendered 1`] = ` class="euiToastHeader euiToastHeader--withBody" data-test-subj="euiToastHeader" > - -
- -
- - - +