CEC-3944 Static dashboard (#301)

* CEC-3944 Static dashboard

* Unit test
This commit is contained in:
John Wu
2023-03-22 19:39:48 -07:00
committed by GitHub
parent 5a8e823822
commit 6ddcf795a1
13 changed files with 2331 additions and 786 deletions

View File

@@ -126,6 +126,10 @@ describe("App", () => {
await check("/tools/security-dll", "span.MuiButton-label", "Sign In");
});
it("Route /dashboards/0 unauthenticated", async () => {
await check("/dashboards/0", "span.MuiButton-label", "Sign In");
});
it("Route /page-not-found unauthenticated", async () => {
await check("/page-not-found", "h1", "Page Not Found");
});
@@ -200,4 +204,15 @@ describe("App", () => {
setToken(TEST_AUTH_OBJECT_MAGNA);
await sleepAndCheck("/tools/security-dll", "h6", "Security.dll Download");
});
it("Route /dashboards/0 authenticated", async () => {
setToken(TEST_AUTH_OBJECT_FISKER);
await check("/dashboards/0", "h6", "Datascope");
});
// test bad dashboard
it("Route /dashboards/1000 authenticated", async () => {
setToken(TEST_AUTH_OBJECT_FISKER);
await check("/dashboards/1000", "span.error", "Invalid Dashboard");
});
});

File diff suppressed because it is too large Load Diff