mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-08 06:15:43 +03:00
* use react-use-websockets * check ready state * match context shape * jsonify dispatch * remove unnecessary ready check * bring back h * non-working tests * skip failing tests * upgrade some dependencies --------- Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
22 lines
737 B
JavaScript
22 lines
737 B
JavaScript
import { h } from 'preact';
|
|
import Events from '../Events';
|
|
import { render, screen, waitForElementToBeRemoved } from 'testing-library';
|
|
|
|
describe('Events Route', () => {
|
|
beforeEach(() => {});
|
|
|
|
test('shows an ActivityIndicator if not yet loaded', async () => {
|
|
render(<Events limit={5} path="/events" />);
|
|
expect(screen.queryByLabelText('Loading…')).toBeInTheDocument();
|
|
});
|
|
|
|
// eslint-disable-next-line jest/no-disabled-tests
|
|
test.skip('does not show ActivityIndicator after loaded', async () => {
|
|
render(<Events limit={5} path="/events" />);
|
|
|
|
await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'));
|
|
|
|
expect(screen.queryByLabelText('Loading…')).not.toBeInTheDocument();
|
|
});
|
|
});
|