Skip to content

Commit

Permalink
test: Fixes act errors in Alert test (#21386)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored Sep 8, 2022
1 parent 25188c4 commit 75d5da8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions superset-frontend/src/components/Alert/Alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ test('renders without icon', async () => {
});
});

test('renders message', () => {
test('renders message', async () => {
render(<Alert message="Message" />);
expect(screen.getByRole('alert')).toHaveTextContent('Message');
expect(await screen.findByRole('alert')).toHaveTextContent('Message');
});

test('renders message and description', () => {
test('renders message and description', async () => {
render(<Alert message="Message" description="Description" />);
expect(screen.getByRole('alert')).toHaveTextContent('Message');
expect(screen.getByRole('alert')).toHaveTextContent('Description');
const alert = await screen.findByRole('alert');
expect(alert).toHaveTextContent('Message');
expect(alert).toHaveTextContent('Description');
});

0 comments on commit 75d5da8

Please sign in to comment.