From 5943b42a9103ff40ac7c961c70fca6c5b772a178 Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Thu, 27 May 2021 09:03:42 -0700 Subject: [PATCH] CEC-244 Add search (#43) * Add search to car send command page Add snapshot check --- src/components/App/App.test.js | 9 + .../App/__snapshots__/App.test.js.snap | 3132 +++++++++++------ src/components/CarUpdates/Status/index.jsx | 2 +- src/components/Cars/List/index.jsx | 2 +- src/components/Cars/SendCommandBulk/index.jsx | 16 +- src/components/UpdatePackages/List/index.jsx | 2 +- 6 files changed, 2003 insertions(+), 1160 deletions(-) diff --git a/src/components/App/App.test.js b/src/components/App/App.test.js index 4be54a7..65ede98 100644 --- a/src/components/App/App.test.js +++ b/src/components/App/App.test.js @@ -87,6 +87,10 @@ describe("App", () => { await check("/vehicle-status/FISKER123", "span.MuiButton-label", "Sign In"); }); + it("Route /vehicles-command unauthenticated", async () => { + await check("/vehicles-command", "span.MuiButton-label", "Sign In"); + }); + it("Route / authenticated", async () => { setToken(TEST_AUTH_OBJECT); await check("/", "h1", "Welcome John!"); @@ -132,6 +136,11 @@ describe("App", () => { await check("/vehicle-status/FISKER123", "h6", "Vehicle FISKER123 Details"); }); + it("Route /vehicles-command authenticated", async () => { + setToken(TEST_AUTH_OBJECT); + await check("/vehicles-command", "h6", "Send Command"); + }); + it("Route /page-not-found unauthenticated", async () => { await check("/page-not-found", "h1", "Page Not Found"); }); diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index 969c00f..b93036c 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" >