CEC-3944 Static dashboard (#301)
* CEC-3944 Static dashboard * Unit test
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user