Skip to content

Commit c6cc7b2

Browse files
committed
fix unit test
1 parent 51b39e5 commit c6cc7b2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/iris-grid/src/sidebar/aggregations/Aggregations.test.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ it('shows all operations in select when no aggregations selected yet', () => {
3737
expect(screen.getByText('Min')).toBeInTheDocument();
3838
expect(screen.getByText('Max')).toBeInTheDocument();
3939
expect(screen.getByText('Avg')).toBeInTheDocument();
40+
expect(screen.getByText('Median')).toBeInTheDocument();
4041
expect(screen.getByText('Std')).toBeInTheDocument();
4142
expect(screen.getByText('First')).toBeInTheDocument();
4243
expect(screen.getByText('Last')).toBeInTheDocument();
@@ -61,7 +62,9 @@ it('adds an aggregation when clicking the add button', async () => {
6162
aggregations: expect.arrayContaining([
6263
expect.objectContaining({ operation: SELECTABLE_OPTIONS[0] }),
6364
]),
64-
})
65+
}),
66+
expect.arrayContaining([SELECTABLE_OPTIONS[0]]),
67+
expect.arrayContaining([])
6568
);
6669
});
6770

@@ -80,7 +83,9 @@ it('deletes an aggregation when clicking the trash can', async () => {
8083
await user.click(buttons[buttons.length - 1]);
8184

8285
expect(onChange).toHaveBeenCalledWith(
83-
expect.objectContaining({ aggregations: [], showOnTop: false })
86+
expect.objectContaining({ aggregations: [], showOnTop: false }),
87+
expect.arrayContaining([]),
88+
expect.arrayContaining([AggregationOperation.SUM])
8489
);
8590
});
8691

0 commit comments

Comments
 (0)