From 07f77cabdb144131c5de52620cc2b83998881300 Mon Sep 17 00:00:00 2001 From: Drew Taylor <69828061+drew-fisker@users.noreply.github.com> Date: Thu, 14 Apr 2022 18:11:22 -0700 Subject: [PATCH] CEC-1256/CEC-1330 data logger for vehicles/fleets and details tabs for vehicles/fleets (#136) * forms for fleet can filters * unit tests for fleet filters * removing warnings * updating regex * added fleet details page * fleet pages * smoothed out bugs * fleets done * working update, delete vehicles * finished mocks, still need snapshots and context tests * contexts done * snapshot tests * updating code smells * smells --- .../App/__snapshots__/App.test.js.snap | 1606 +++++++---------- .../Add/__snapshots__/index.test.jsx.snap | 730 ++++++++ src/components/Cars/Add/index.jsx | 110 +- src/components/Cars/Add/index.test.jsx | 36 + .../List/__snapshots__/index.test.jsx.snap | 391 ++++ src/components/Cars/List/index.jsx | 34 +- src/components/Cars/List/index.test.jsx | 39 + .../Cars/Status/CANFiltersTab.test.jsx | 2 +- .../Cars/Status/CarUpdatesTab.test.jsx | 2 +- .../Details/__snapshots__/index.test.jsx.snap | 128 ++ src/components/Cars/Status/Details/index.jsx | 95 + .../Cars/Status/Details/index.test.jsx | 36 + src/components/Cars/Status/DetailsTab.jsx | 21 + .../Cars/Status/DetailsTab.test.jsx | 41 + .../__snapshots__/DetailsTab.test.jsx.snap | 138 ++ .../Status/__snapshots__/index.test.jsx.snap | 646 +------ src/components/Cars/Status/index.jsx | 15 +- src/components/Cars/Status/index.test.jsx | 2 +- .../Update/__snapshots__/index.test.jsx.snap | 731 ++++++++ src/components/Cars/Update/index.jsx | 285 +++ src/components/Cars/Update/index.test.jsx | 36 + src/components/Contexts/FleetContext.jsx | 43 +- src/components/Contexts/FleetContext.test.jsx | 63 +- src/components/Contexts/VehicleContext.jsx | 72 +- .../Contexts/VehicleContext.test.jsx | 207 ++- .../Contexts/__mocks__/FleetContext.jsx | 12 +- .../Contexts/__mocks__/VehicleContext.jsx | 15 +- .../Controls/CarSelectionTable/index.jsx | 23 +- .../Add/__snapshots__/index.test.jsx.snap | 494 ++++- src/components/Fleets/Add/index.jsx | 127 +- src/components/Fleets/Add/index.test.jsx | 2 +- .../Fleets/Status/CANFiltersTab.test.jsx | 2 +- .../Details/__snapshots__/index.test.jsx.snap | 135 ++ .../Fleets/Status/Details/index.jsx | 96 + .../Fleets/Status/Details/index.test.jsx | 36 + src/components/Fleets/Status/DetailsTab.jsx | 21 + .../Fleets/Status/DetailsTab.test.jsx | 41 + .../Fleets/Status/Vehicles/Add/index.test.jsx | 2 +- .../Status/Vehicles/Table/index.test.jsx | 2 +- .../Fleets/Status/VehiclesTab.test.jsx | 2 +- .../__snapshots__/DetailsTab.test.jsx.snap | 145 ++ .../Status/__snapshots__/index.test.jsx.snap | 401 ++-- src/components/Fleets/Status/index.jsx | 15 +- src/components/Fleets/Status/index.test.jsx | 2 +- .../Table/__snapshots__/index.test.jsx.snap | 120 +- src/components/Fleets/Table/index.jsx | 85 +- src/components/Fleets/Table/index.test.jsx | 2 +- .../Update/__snapshots__/index.test.jsx.snap | 500 ++++- src/components/Fleets/Update/index.jsx | 160 +- src/components/Fleets/Update/index.test.jsx | 2 +- src/components/Manifest/Deploy/index.jsx | 1 + src/components/Routes/SiteRoutes.jsx | 13 +- src/services/__mocks__/fleetsAPI.js | 30 +- src/services/__mocks__/vehiclesAPI.js | 30 +- src/services/fleetsAPI.js | 9 + src/services/vehiclesAPI.js | 28 + 56 files changed, 5854 insertions(+), 2208 deletions(-) create mode 100644 src/components/Cars/Add/__snapshots__/index.test.jsx.snap create mode 100644 src/components/Cars/Add/index.test.jsx create mode 100644 src/components/Cars/List/__snapshots__/index.test.jsx.snap create mode 100644 src/components/Cars/List/index.test.jsx create mode 100644 src/components/Cars/Status/Details/__snapshots__/index.test.jsx.snap create mode 100644 src/components/Cars/Status/Details/index.jsx create mode 100644 src/components/Cars/Status/Details/index.test.jsx create mode 100644 src/components/Cars/Status/DetailsTab.jsx create mode 100644 src/components/Cars/Status/DetailsTab.test.jsx create mode 100644 src/components/Cars/Status/__snapshots__/DetailsTab.test.jsx.snap create mode 100644 src/components/Cars/Update/__snapshots__/index.test.jsx.snap create mode 100644 src/components/Cars/Update/index.jsx create mode 100644 src/components/Cars/Update/index.test.jsx create mode 100644 src/components/Fleets/Status/Details/__snapshots__/index.test.jsx.snap create mode 100644 src/components/Fleets/Status/Details/index.jsx create mode 100644 src/components/Fleets/Status/Details/index.test.jsx create mode 100644 src/components/Fleets/Status/DetailsTab.jsx create mode 100644 src/components/Fleets/Status/DetailsTab.test.jsx create mode 100644 src/components/Fleets/Status/__snapshots__/DetailsTab.test.jsx.snap diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index aae2e53..8bca4a2 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -6754,6 +6754,504 @@ exports[`App Route /vehicle-add authenticated 1`] = ` + +