CEC-1387 superset integration and removal of grafana (#138)

* replace grafana with superset

* updating snapshots
This commit is contained in:
Drew Taylor
2022-04-18 09:02:17 -07:00
committed by GitHub
parent 11c85e57d6
commit 491de89269
44 changed files with 1059 additions and 3228 deletions

View File

@@ -4,7 +4,6 @@ jest.mock("../Contexts/VehicleContext");
jest.mock("../Contexts/ManifestCreateContext");
jest.mock("../Contexts/ManifestsContext");
jest.mock("../Contexts/UserContext");
jest.mock("../../services/grafanaAPI");
jest.mock("../../services/monitoring");
jest.mock("../../services/vehiclesAPI");
@@ -38,7 +37,7 @@ const check = async (path, selector, compare) => {
const sleepAndCheck = async (path, selector, compare) => {
const container = await renderRoute(path);
await waitFor(() => {});
await waitFor(() => { });
expect(container.querySelector(selector).innerHTML).toEqual(compare);
expect(container).toMatchSnapshot();
};
@@ -72,14 +71,6 @@ describe("App", () => {
await sleepAndCheck("/home", "span.MuiButton-label", "Sign In");
});
it("Route /datascope unauthenticated", async () => {
await sleepAndCheck("/datascope", "span.MuiButton-label", "Sign In");
});
it("Route /datascope/battery unauthenticated", async () => {
await check("/datascope/battery", "span.MuiButton-label", "Sign In");
});
it("Route /packages unauthenticated", async () => {
await check("/packages", "span.MuiButton-label", "Sign In");
});
@@ -134,16 +125,6 @@ describe("App", () => {
await check("/page-not-found", "h1", "Page Not Found");
});
it("Route /datascope authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await sleepAndCheck("/datascope", "h6", "Datascope");
});
it("Route /datascope/battery authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/datascope/battery", "h6", "Battery");
});
it("Route /packages authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/packages", "h6", "Deployments");