From fafcc0240327b5ebd27d74bf5d9f24294bb776ba Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Wed, 30 Mar 2022 20:33:17 +0000 Subject: [PATCH] Update jest tests Signed-off-by: Joshua Li --- .../__snapshots__/gantt_chart.test.tsx.snap | 20 +- .../gantt_chart_editor.test.tsx.snap | 233 +++++++++--------- .../options_editor.test.tsx.snap | 4 +- .../__tests__/options_editor.test.tsx | 2 +- 4 files changed, 131 insertions(+), 128 deletions(-) diff --git a/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart.test.tsx.snap b/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart.test.tsx.snap index fe95bee..6ce0cbc 100644 --- a/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart.test.tsx.snap +++ b/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart.test.tsx.snap @@ -4,14 +4,14 @@ exports[` spec renders empty prompt when no data is returned 1`] =
+

+ No data +

-

- No data -

@@ -32,14 +32,14 @@ exports[` spec renders empty prompt when no field is selected 1`]
+

+ No data +

-

- No data -

diff --git a/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart_editor.test.tsx.snap b/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart_editor.test.tsx.snap index 7923a1a..9352378 100644 --- a/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart_editor.test.tsx.snap +++ b/gantt-chart/public/components/__tests__/__snapshots__/gantt_chart_editor.test.tsx.snap @@ -2,7 +2,7 @@ exports[` spec renders the component 1`] = `

spec renders the component 1`] = ` class="euiFormRow__fieldWrapper" >
- -
+
+
- - Select an option: - , is selected - -
@@ -85,7 +86,7 @@ exports[` spec renders the component 1`] = `
Gantt chart allows you to compare schedules of the selected field.
@@ -109,54 +110,55 @@ exports[` spec renders the component 1`] = ` class="euiFormRow__fieldWrapper" >
- -
+
+
- - Select an option: - , is selected - -
@@ -164,7 +166,7 @@ exports[` spec renders the component 1`] = `
Select a timestamp field to represent the beginning of a schedule.
@@ -188,54 +190,55 @@ exports[` spec renders the component 1`] = ` class="euiFormRow__fieldWrapper" >
- -
+
+
- - Select an option: - , is selected - -
@@ -243,7 +246,7 @@ exports[` spec renders the component 1`] = `
Value of duration field must be a time interval that can be added to the start timestamp field.
diff --git a/gantt-chart/public/components/__tests__/__snapshots__/options_editor.test.tsx.snap b/gantt-chart/public/components/__tests__/__snapshots__/options_editor.test.tsx.snap index 7ebfb87..e1c8cd5 100644 --- a/gantt-chart/public/components/__tests__/__snapshots__/options_editor.test.tsx.snap +++ b/gantt-chart/public/components/__tests__/__snapshots__/options_editor.test.tsx.snap @@ -2,7 +2,7 @@ exports[` spec renders the component 1`] = `

spec renders the component 1`] = ` exports[` spec renders the component with different options 1`] = `

spec', () => { it('sets colors', () => { const setValue = jest.fn(); const utils = render(); - const colorPicker = utils.getByTestId('colorPickerAnchor'); + const colorPicker = utils.getByTestId('euiColorPickerAnchor'); fireEvent.change(colorPicker, { target: { value: '#EEEEEE' } }); expect(setValue).toBeCalledWith('colors', '#EEEEEE'); });