Skip to content

Commit

Permalink
Updated storyshots
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliu1 committed Apr 21, 2020
1 parent 3c15292 commit fd94640
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
5 changes: 4 additions & 1 deletion x-pack/legacy/plugins/canvas/.storybook/storyshots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ moment.tz.setDefault('UTC');
const testTime = new Date(Date.UTC(2019, 5, 1)); // June 1 2019
Date.now = jest.fn(() => testTime);

// Mock telemetry service
jest.mock('../public/lib/ui_metric', () => ({ trackCanvasUiMetric: () => { } }));

// Mock EUI generated ids to be consistently predictable for snapshots.
jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `generated-id`);

Expand All @@ -33,7 +36,7 @@ jest.mock(`@elastic/eui/lib/components/form/form_row/make_id`, () => () => `gene
jest.mock('@elastic/eui/lib/components/code/code', () => {
const React = require.requireActual('react');
return {
EuiCode: ({children, className}) => (
EuiCode: ({ children, className }) => (
<span>
<code>{children}</code>
</span>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd94640

Please sign in to comment.