-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lens] Introduces new chart switcher #91844
Changes from 5 commits
5fd3f23
d28a394
78b8218
b9b28aa
89bcb5d
5a8195e
0340e4e
79a6731
2cc0032
7abba6c
0bd7e7c
0a060ea
40f1d19
28035d8
09b9ff2
208cdfb
71ec4be
41e21b0
dc262c3
99d5be4
9986e6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,17 @@ | |
|
||
import React, { ReactElement } from 'react'; | ||
import { ReactWrapper } from 'enzyme'; | ||
|
||
// Mock the AutoSizer inside EuiSelectable (Chart Switch) and return some dimensions > 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Could you leave more detailed info why we have to do this (that the Autosizer behaves in particular way here)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed with Marta- can you specifically say that Jest tests render using jsdom and jsdom does not implement any sizing methods |
||
jest.mock('react-virtualized-auto-sizer', () => { | ||
return function (props: { | ||
children: (dimensions: { width: number; height: number }) => React.ReactNode; | ||
}) { | ||
const { children, ...otherProps } = props; | ||
return <div {...otherProps}>{children({ width: 100, height: 100 })}</div>; | ||
}; | ||
}); | ||
|
||
import { EuiPanel, EuiToolTip } from '@elastic/eui'; | ||
import { mountWithIntl as mount } from '@kbn/test/jest'; | ||
import { EditorFrame } from './editor_frame'; | ||
|
@@ -83,6 +94,7 @@ describe('editor_frame', () => { | |
icon: 'empty', | ||
id: 'testVis', | ||
label: 'TEST1', | ||
groupLabel: 'testVisGroup', | ||
}, | ||
], | ||
}; | ||
|
@@ -94,6 +106,7 @@ describe('editor_frame', () => { | |
icon: 'empty', | ||
id: 'testVis2', | ||
label: 'TEST2', | ||
groupLabel: 'testVis2Group', | ||
}, | ||
], | ||
}; | ||
|
@@ -1372,6 +1385,7 @@ describe('editor_frame', () => { | |
icon: 'empty', | ||
id: 'testVis3', | ||
label: 'TEST3', | ||
groupLabel: 'testVis3Group', | ||
}, | ||
], | ||
getSuggestions: () => [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with naming and match the designs.