From 0fad12b23b76dc4913c0fbead976619953b7c9ba Mon Sep 17 00:00:00 2001 From: arpanetus Date: Tue, 6 Dec 2022 04:27:26 +0600 Subject: [PATCH 1/4] CEC-3245 Fix console errors during test (#246) * fix/fleet-vehicles-search * fix/fleet-name-update * Fix errors in console during test --- src/components/CANFilter/Add/__snapshots__/index.test.jsx.snap | 1 - src/components/CANFilter/Add/index.jsx | 2 +- src/components/CANFilter/Add/index.test.jsx | 1 - src/components/Fleets/Status/CANFilters/Add/index.jsx | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/CANFilter/Add/__snapshots__/index.test.jsx.snap b/src/components/CANFilter/Add/__snapshots__/index.test.jsx.snap index d72040a..9d96d85 100644 --- a/src/components/CANFilter/Add/__snapshots__/index.test.jsx.snap +++ b/src/components/CANFilter/Add/__snapshots__/index.test.jsx.snap @@ -161,7 +161,6 @@ exports[`CANFiltersAdd Render 1`] = ` - f `; diff --git a/src/components/CANFilter/Add/index.jsx b/src/components/CANFilter/Add/index.jsx index b1bafac..0c64009 100644 --- a/src/components/CANFilter/Add/index.jsx +++ b/src/components/CANFilter/Add/index.jsx @@ -19,7 +19,7 @@ const MainForm = () => { const { setMessage, setTitle, setSitePath } = useStatusContext(); const [redirect, setRedirect] = useState(null); const classes = useStyles(); - const [canId, setCanId] = useState(null); + const [canId, setCanId] = useState(undefined); const [interval, setInterval] = useState(""); const [edgeMask, setEdgeMask] = useState(""); const queries = new URLSearchParams(useLocation().search); diff --git a/src/components/CANFilter/Add/index.test.jsx b/src/components/CANFilter/Add/index.test.jsx index 7afca84..5484339 100644 --- a/src/components/CANFilter/Add/index.test.jsx +++ b/src/components/CANFilter/Add/index.test.jsx @@ -23,7 +23,6 @@ const renderCANFiltersAdd = async () => { - f ); await waitFor(() => {}); diff --git a/src/components/Fleets/Status/CANFilters/Add/index.jsx b/src/components/Fleets/Status/CANFilters/Add/index.jsx index 726f7c3..0b653ee 100644 --- a/src/components/Fleets/Status/CANFilters/Add/index.jsx +++ b/src/components/Fleets/Status/CANFilters/Add/index.jsx @@ -16,7 +16,7 @@ const MainForm = () => { const { addFleetCANFilter, busy } = useFleetContext(); const { token: { idToken: { jwtToken: token } } } = useUserContext(); const classes = useStyles(); - const [canId, setCanId] = useState(null); + const [canId, setCanId] = useState(undefined); const [interval, setInterval] = useState(""); const [edgeMask, setEdgeMask] = useState(""); const [redirect, setRedirect] = useState(null); From 888e8925bd14b319026f993762b3126a127768f0 Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Wed, 7 Dec 2022 11:21:20 -0800 Subject: [PATCH 2/4] CEC-3040 Fix add car button permission (#245) --- .../App/__snapshots__/App.test.js.snap | 17 ++++++++++++++++- .../Cars/List/__snapshots__/index.test.jsx.snap | 17 ++++++++++++++++- src/components/Cars/List/index.jsx | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index c93bf07..a714fc5 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -8402,7 +8402,22 @@ exports[`App Route /vehicles authenticated 1`] = ` >
+ > + + + +
diff --git a/src/components/Cars/List/__snapshots__/index.test.jsx.snap b/src/components/Cars/List/__snapshots__/index.test.jsx.snap index 50c7849..cc2b5f0 100644 --- a/src/components/Cars/List/__snapshots__/index.test.jsx.snap +++ b/src/components/Cars/List/__snapshots__/index.test.jsx.snap @@ -22,7 +22,22 @@ exports[`VehicleTable Render 1`] = ` >
+ > + + + +
diff --git a/src/components/Cars/List/index.jsx b/src/components/Cars/List/index.jsx index db72783..c0ab155 100644 --- a/src/components/Cars/List/index.jsx +++ b/src/components/Cars/List/index.jsx @@ -53,7 +53,7 @@ const MainForm = () => { From 8e1b01b65113e95b2341e742267cd4373d7358f5 Mon Sep 17 00:00:00 2001 From: Paul Adamsen <117673433+pauladamseniii@users.noreply.github.com> Date: Wed, 7 Dec 2022 19:17:08 -0500 Subject: [PATCH 3/4] CEC-3242 - New form for Fleet/AddVehicle (#243) * CEC-3242 - New form for Fleet/AddVehicle * fixes, improvements * update snapshot * CEC-3242 and CEC-3262 * update snapshot * un-require removed fields from vehicle add --- .../App/__snapshots__/App.test.js.snap | 140 ----- .../Add/__snapshots__/index.test.jsx.snap | 140 ----- src/components/Cars/Add/index.jsx | 51 -- src/components/Contexts/VehicleContext.jsx | 8 - .../Add/__snapshots__/index.test.jsx.snap | 498 ++++++++++++++++++ .../Fleets/Status/Vehicles/Add/index.jsx | 115 +++- 6 files changed, 610 insertions(+), 342 deletions(-) diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap index a714fc5..4788d68 100644 --- a/src/components/App/__snapshots__/App.test.js.snap +++ b/src/components/App/__snapshots__/App.test.js.snap @@ -6392,146 +6392,6 @@ exports[`App Route /vehicle-add authenticated 1`] = `
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-