1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-13 23:48:55 +01:00
fab-manager/test/frontend/components/notifications/notifications-list.test.tsx

16 lines
742 B
TypeScript

import { render, screen, waitFor } from '@testing-library/react';
import { NotificationsList } from '../../../../app/frontend/src/javascript/components/notifications/notifications-list';
// Notifications list in Notification Center
describe('Notifications list', () => {
test('should render the correct list', async () => {
const onError = jest.fn();
render(<NotificationsList onError={onError} />);
await waitFor(() => screen.getByTestId('notifications-list'));
expect(screen.getByText('Decription of the first notification')).toBeDefined();
expect(screen.getByText('Decription of the second notification')).toBeDefined();
expect(screen.getByText('Decription of the third notification')).toBeDefined();
});
});