Skip to content

Commit

Permalink
fix ut (#1040)
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am authored Aug 1, 2024
1 parent ce4742b commit 4270710
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('MonitorTimeField', () => {
</Formik>
);
// Default blank option
expect(wrapper.find('EuiComboBox').props().options.length).toBe(0);
expect(wrapper.find('EuiCompressedComboBox').props().options.length).toBe(0);
});

test('displays options', () => {
Expand All @@ -37,7 +37,7 @@ describe('MonitorTimeField', () => {
</Formik>
);
// 3 options
expect(wrapper.find('EuiComboBox').props().options.length).toBe(3);
expect(wrapper.find('EuiCompressedComboBox').props().options.length).toBe(3);
});

test('displays options includes date_nanos', () => {
Expand All @@ -51,8 +51,8 @@ describe('MonitorTimeField', () => {
expect(wrapper).toMatchSnapshot();

// 4 options
expect(wrapper.find('EuiComboBox').props().options.length).toBe(4);
expect(wrapper.find('EuiComboBox').props().options).toEqual(
expect(wrapper.find('EuiCompressedComboBox').props().options.length).toBe(4);
expect(wrapper.find('EuiCompressedComboBox').props().options).toEqual(
expect.arrayContaining([{ label: 'date_nanos1' }])
);
});
Expand Down
Loading

0 comments on commit 4270710

Please sign in to comment.