diff --git a/x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js b/x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js index 10842f4268fd3..7e8afe3b04378 100644 --- a/x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js +++ b/x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js @@ -27,6 +27,19 @@ Date.now = jest.fn(() => testTime); // Mock EUI generated ids to be consistently predictable for snapshots. jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`); +// Mocking to prevent errors with React portal. +// Temporary until https://github.com/elastic/kibana/pull/55877 provides other alternatives. +jest.mock('@elastic/eui/lib/components/code/code', () => { + const React = require.requireActual('react'); + return { + EuiCode: ({children, className}) => ( + + {children} + + ), + }; +}); + // Jest automatically mocks SVGs to be a plain-text string that isn't an SVG. Canvas uses // them in examples, so let's mock a few for tests. jest.mock('../canvas_plugin_src/renderers/shape/shapes', () => ({ diff --git a/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot b/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot index 9397a67402e51..35cdd5ac378f4 100644 --- a/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot +++ b/x-pack/legacy/plugins/canvas/public/components/keyboard_shortcuts_doc/__examples__/__snapshots__/keyboard_shortcuts_doc.stories.storyshot @@ -104,24 +104,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + X @@ -136,24 +126,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + C @@ -168,24 +148,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + V @@ -200,24 +170,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + D @@ -232,13 +192,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + DEL @@ -249,13 +204,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + BACKSPACE @@ -270,24 +220,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + @@ -302,35 +242,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + SHIFT - - + + @@ -345,24 +270,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + @@ -377,35 +292,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + SHIFT - - + + @@ -420,13 +320,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + G @@ -441,13 +336,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + U @@ -462,13 +352,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + @@ -483,13 +368,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + @@ -504,13 +384,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + @@ -525,13 +400,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + @@ -546,24 +416,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + SHIFT - - + + @@ -578,24 +438,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + SHIFT - - + + @@ -610,24 +460,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + SHIFT - - + + @@ -642,24 +482,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + SHIFT - - + + @@ -693,24 +523,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + ENTER @@ -744,24 +564,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + SHIFT - - + + CLICK @@ -776,24 +586,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + DRAG @@ -808,24 +608,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + DRAG @@ -840,24 +630,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + CLICK @@ -872,24 +652,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + Z @@ -904,35 +674,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + SHIFT - - + + Z @@ -947,24 +702,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + [ @@ -979,24 +724,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + ] @@ -1011,24 +746,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + E @@ -1043,24 +768,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + G @@ -1075,24 +790,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + R @@ -1107,35 +812,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + ALT - - + + + @@ -1150,35 +840,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + ALT - - + + - @@ -1193,35 +868,20 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + CTRL - - + + ALT - - + + [ @@ -1236,24 +896,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + F @@ -1264,24 +914,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + ALT - - + + P @@ -1315,24 +955,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + F @@ -1343,24 +973,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + ALT - - + + P @@ -1375,13 +995,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ESC @@ -1396,24 +1011,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + [ @@ -1424,13 +1029,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + BACKSPACE @@ -1441,13 +1041,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + @@ -1462,24 +1057,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + ] @@ -1490,13 +1075,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + SPACE @@ -1507,13 +1087,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` - - + + @@ -1528,24 +1103,14 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + ALT - - + + R @@ -1560,13 +1125,8 @@ exports[`Storyshots components/KeyboardShortcutsDoc default 1`] = ` className="euiDescriptionList__description" > - - + + P