diff --git a/package.json b/package.json index 1ff42384f95d51..c3d19367e8b924 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "@elastic/charts": "^14.0.0", "@elastic/datemath": "5.0.2", "@elastic/ems-client": "1.0.5", - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "@elastic/filesaver": "1.1.2", "@elastic/good": "8.1.1-kibana2", "@elastic/numeral": "2.3.3", diff --git a/src/dev/jest/setup/mocks.js b/src/dev/jest/setup/mocks.js index f17c0f44536b6f..19c88d3cc35e42 100644 --- a/src/dev/jest/setup/mocks.js +++ b/src/dev/jest/setup/mocks.js @@ -47,3 +47,12 @@ jest.mock('moment-timezone', () => { moment.tz.guess = () => 'America/New_York'; return moment; }); + +jest.mock('@elastic/eui/lib/services/react', () => { + // `enqueueStateChange` is an EUI method to batch queued functions that trigger React `setState` calls. + // This is for performance, but when used in certain Jest scernarios it can be nondeterministic. + // Jest tests are never concerned about the state prior to batch completion, so we bypass batching entirely. + return { + enqueueStateChange: fn => fn(), + }; +}); diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json index 51b9a5c5f17860..69f958fb91f603 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "react": "^16.12.0", "react-dom": "^16.12.0" } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json index fd0ce478eb6fb2..96a5e26a741093 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json @@ -7,7 +7,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "react": "^16.12.0" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index 98df7f4b246dc6..e95aa04ddd6b1f 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "react": "^16.12.0" }, "scripts": { diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 32f441ba6ccda8..f874cecd5d812c 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -8,7 +8,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "react": "^16.12.0" }, "scripts": { diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot index e9f496bfe6358f..27d82a664ff2ab 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/autoplay_settings.examples.storyshot @@ -30,6 +30,7 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings component: off, aria-labelledby="generated-id" className="euiSwitch__button" id="cycle" + name="cycle" onClick={[Function]} role="switch" type="button" @@ -198,6 +199,7 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings component: on, 5 aria-labelledby="generated-id" className="euiSwitch__button" id="cycle" + name="cycle" onClick={[Function]} role="switch" type="button" @@ -366,6 +368,7 @@ exports[`Storyshots shareables/Footer/Settings/AutoplaySettings contextual 1`] = aria-labelledby="generated-id" className="euiSwitch__button" id="cycle" + name="cycle" onClick={[Function]} role="switch" type="button" diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot index 2fa6b83aef4f0f..a550c7ec47c922 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__examples__/__snapshots__/toolbar_settings.examples.storyshot @@ -38,6 +38,7 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings component: off 1` className="euiSwitch__button" data-test-subj="hideToolbarSwitch" id="generated-id" + name="toolbarHide" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -132,6 +133,7 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings component: on 1`] className="euiSwitch__button" data-test-subj="hideToolbarSwitch" id="generated-id" + name="toolbarHide" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -226,6 +228,7 @@ exports[`Storyshots shareables/Footer/Settings/ToolbarSettings contextual 1`] = className="euiSwitch__button" data-test-subj="hideToolbarSwitch" id="generated-id" + name="toolbarHide" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} diff --git a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap index fbd8c9c5ab0c30..9d7590e977011f 100644 --- a/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap +++ b/x-pack/legacy/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/__snapshots__/settings.test.tsx.snap @@ -316,6 +316,7 @@ exports[` can navigate Autoplay Settings 2`] = ` aria-labelledby="generated-id" class="euiSwitch__button" id="cycle" + name="cycle" role="switch" type="button" > @@ -784,6 +785,7 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] = class="euiSwitch__button" data-test-subj="hideToolbarSwitch" id="generated-id" + name="toolbarHide" role="switch" type="button" > @@ -856,4 +858,4 @@ exports[` can navigate Toolbar Settings, closes when activated 2`] = `; -exports[` can navigate Toolbar Settings, closes when activated 3`] = `"
Settings

Hide Toolbar

Hide the toolbar when the mouse is not within the Canvas?
"`; +exports[` can navigate Toolbar Settings, closes when activated 3`] = `"
Settings

Hide Toolbar

Hide the toolbar when the mouse is not within the Canvas?
"`; diff --git a/x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap index c9a40975e7b92c..526bb52c61afaf 100644 --- a/x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap +++ b/x-pack/legacy/plugins/siem/public/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap @@ -249,7 +249,7 @@ exports[`NoteCardBody renders correctly against snapshot 1`] = ` "euiFormControlPadding": "12px", "euiFormCustomControlBorderColor": "#66676d", "euiFormCustomControlDisabledIconColor": "#a6aab0", - "euiFormInputGroupBorder": "1px solid #313338", + "euiFormInputGroupBorder": "1px solid #282a30", "euiFormInputGroupLabelBackground": "#1f2127", "euiFormMaxWidth": "400px", "euiGradientMiddle": "#282a31", diff --git a/x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap index 4ac25720080a92..ddeb701c3ee31c 100644 --- a/x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap +++ b/x-pack/legacy/plugins/siem/public/components/paginated_table/__snapshots__/index.test.tsx.snap @@ -249,7 +249,7 @@ exports[`Paginated Table Component rendering it renders the default load more ta "euiFormControlPadding": "12px", "euiFormCustomControlBorderColor": "#66676d", "euiFormCustomControlDisabledIconColor": "#a6aab0", - "euiFormInputGroupBorder": "1px solid #313338", + "euiFormInputGroupBorder": "1px solid #282a30", "euiFormInputGroupLabelBackground": "#1f2127", "euiFormMaxWidth": "400px", "euiGradientMiddle": "#282a31", diff --git a/x-pack/package.json b/x-pack/package.json index 6c6181e06a6529..075a7867b4720b 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -176,7 +176,7 @@ "@babel/runtime": "^7.5.5", "@elastic/datemath": "5.0.2", "@elastic/ems-client": "1.0.5", - "@elastic/eui": "16.0.0", + "@elastic/eui": "16.1.0", "@elastic/filesaver": "1.1.2", "@elastic/maki": "6.1.0", "@elastic/node-crypto": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 69ab184d480e98..49216f9dac056e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1226,10 +1226,10 @@ tabbable "^1.1.0" uuid "^3.1.0" -"@elastic/eui@16.0.0": - version "16.0.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-16.0.0.tgz#511898bfbeba5ffea6ac96c077d1184d657a451d" - integrity sha512-i9t13PzrsfBUolMZ6n2X9aAYJ/wUI2NJduCQlDU4zrXfFrM1LFJ5/KSCcpgzI8VNDakeA3PTml+oqD7J0qGA3g== +"@elastic/eui@16.1.0": + version "16.1.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-16.1.0.tgz#b8311a4dd3146da2fcd8cec6ae1ed46e26f90746" + integrity sha512-WbfIc2RGojrUeYyEIjiQ0Cy4xbk6YJ6eQ+ymFHSDGqwkKy5IidSBZIDNLM13LzAhxBFTAMmfVsk4lB2qiFlolQ== dependencies: "@types/lodash" "^4.14.116" "@types/numeral" "^0.0.25"