From d8f14aaeba5f5e2e5592359154f93643f1e02c4e Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Wed, 2 Jun 2021 11:26:38 -0700 Subject: [PATCH] Update Dashboard Charts (#47) * Update dashboard charts * Remove chart time lock * Update snapshot test --- src/components/App/App.test.js | 10 + .../App/__snapshots__/App.test.js.snap | 823 ++++++++++++------ src/components/Dashboard/index.jsx | 11 +- .../Create/__snapshots__/Create.test.js.snap | 16 +- src/components/useStyles.jsx | 3 + 5 files changed, 607 insertions(+), 256 deletions(-) diff --git a/src/components/App/App.test.js b/src/components/App/App.test.js index 65ede98..86b9731 100644 --- a/src/components/App/App.test.js +++ b/src/components/App/App.test.js @@ -91,6 +91,10 @@ describe("App", () => { await check("/vehicles-command", "span.MuiButton-label", "Sign In"); }); + it("Route /dashboard unauthenticated", async () => { + await check("/dashboard", "span.MuiButton-label", "Sign In"); + }); + it("Route / authenticated", async () => { setToken(TEST_AUTH_OBJECT); await check("/", "h1", "Welcome John!"); @@ -154,4 +158,10 @@ describe("App", () => { setToken(TEST_AUTH_OBJECT); await check("/carupdate-deploy/1", "h6", "Deploy "); }); + + it("Route /dashboard authenticated", async () => { + setToken(TEST_AUTH_OBJECT); + await check("/dashboard", "h6", "Dashboard"); + }); + }); diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index 100fc98..dde53f1 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -6,10 +6,10 @@ exports[`App Route / authenticated 1`] = ` data-testid="mocked-userprovider" >
Fisker Admin Portal
@@ -237,16 +237,16 @@ exports[`App Route / authenticated 1`] = `

Fisker Admin Portal
@@ -555,10 +555,10 @@ exports[`App Route /carupdate-deploy authenticated 1`] = `

0 Selected
@@ -652,7 +652,7 @@ exports[`App Route /carupdate-deploy authenticated 1`] = ` style="text-align: right;" >
VIN sorted ascending @@ -1005,10 +1005,10 @@ exports[`App Route /carupdate-deploy unauthenticated 1`] = ` data-testid="mocked-userprovider" >
+ + +`; + +exports[`App Route /dashboard authenticated 1`] = ` +
+
+
+
+
+
+ Dashboard +
+ +
+
+ +
+
+
+
+ +