mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
* Fix/removed forwarding Signed-off-by: Levi Harrison <git@leviharrison.dev> * Added global 'wasReady' and 'wasUnexpected' Signed-off-by: Levi Harrison <git@leviharrison.dev> * Eslint fixes Signed-off-by: Levi Harrison <git@leviharrison.dev> * Added withStartingIndicator wrapper Signed-off-by: Levi Harrison <git@leviharrison.dev> * Fixed condition Signed-off-by: Levi Harrison <git@leviharrison.dev> * Removed unused import Signed-off-by: Levi Harrison <git@leviharrison.dev> * Moved withStartingIndicator calls to pages index Signed-off-by: Levi Harrison <git@leviharrison.dev> * Fixed withStartingIndicator tests Signed-off-by: Levi Harrison <git@leviharrison.dev> * Fixed eslint (maybe?) Signed-off-by: Levi Harrison <git@leviharrison.dev> * Trailing comma Signed-off-by: Levi Harrison <git@leviharrison.dev> * Added prettier ignore Signed-off-by: Levi Harrison <git@leviharrison.dev> * Fix eslint (pt. 2) Signed-off-by: Levi Harrison <git@leviharrison.dev>
44 lines
934 B
TypeScript
Executable file
44 lines
934 B
TypeScript
Executable file
import * as React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import App from './App';
|
|
import Navigation from './Navbar';
|
|
import { Container } from 'reactstrap';
|
|
import { Router } from '@reach/router';
|
|
import {
|
|
AlertsPage,
|
|
ConfigPage,
|
|
FlagsPage,
|
|
RulesPage,
|
|
ServiceDiscoveryPage,
|
|
StatusPage,
|
|
TargetsPage,
|
|
TSDBStatusPage,
|
|
PanelListPage,
|
|
} from './pages';
|
|
|
|
describe('App', () => {
|
|
const app = shallow(<App />);
|
|
|
|
it('navigates', () => {
|
|
expect(app.find(Navigation)).toHaveLength(1);
|
|
});
|
|
it('routes', () => {
|
|
[
|
|
AlertsPage,
|
|
ConfigPage,
|
|
FlagsPage,
|
|
RulesPage,
|
|
ServiceDiscoveryPage,
|
|
StatusPage,
|
|
TargetsPage,
|
|
TSDBStatusPage,
|
|
PanelListPage,
|
|
].forEach(component => {
|
|
const c = app.find(component);
|
|
expect(c).toHaveLength(1);
|
|
});
|
|
expect(app.find(Router)).toHaveLength(1);
|
|
expect(app.find(Container)).toHaveLength(1);
|
|
});
|
|
});
|