Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ committed Sep 11, 2022
1 parent 12f8023 commit 7bd47d3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,15 @@ describe('ChartContainer', () => {
expect(screen.queryByText('Cached')).not.toBeInTheDocument();
});

it('hide gutter when collapse panel', async () => {
it('hides gutter when collapsing data panel', async () => {
const props = createProps();
setItem(LocalStorageKeys.is_datapanel_open, true);
const { container } = render(<ChartContainer {...props} />, {
useRedux: true,
});
userEvent.click(screen.getByLabelText('Collapse data panel'));
const gutter = container.querySelector('.gutter');
expect(window.getComputedStyle(gutter).display).toBe('block');
userEvent.click(screen.getByLabelText('Collapse data panel'));
expect(window.getComputedStyle(gutter).display).toBe('none');
});
});

0 comments on commit 7bd47d3

Please sign in to comment.