Skip to content

Commit

Permalink
tests: [ZNO-2072] Fixed tests for HeaderActionsDropdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayBorovenskiy committed Sep 27, 2023
1 parent 802964b commit fd2a24b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ test('should render', () => {
test('should render the dropdown button', () => {
const mockedProps = createProps();
setup(mockedProps);
expect(screen.getByRole('button')).toBeInTheDocument();
const dropdownButtons = screen.getAllByRole('button');
expect(dropdownButtons[0]).toBeInTheDocument();
});

test('should render the menu items', async () => {
Expand All @@ -121,7 +122,7 @@ test('should render the menu items', async () => {
expect(screen.getAllByRole('menuitem')).toHaveLength(4);
expect(screen.getByText('Refresh dashboard')).toBeInTheDocument();
expect(screen.getByText('Set auto-refresh interval')).toBeInTheDocument();
expect(screen.getByText('Download as image')).toBeInTheDocument();
expect(screen.getByText('Download')).toBeInTheDocument();
expect(screen.getByText('Enter fullscreen')).toBeInTheDocument();
});

Expand Down

0 comments on commit fd2a24b

Please sign in to comment.