diff --git a/src/components/Contexts/CarUpdatesContext.jsx b/src/components/Contexts/CarUpdatesContext.jsx index 8fdb43a..b4e6ed5 100644 --- a/src/components/Contexts/CarUpdatesContext.jsx +++ b/src/components/Contexts/CarUpdatesContext.jsx @@ -303,4 +303,4 @@ export const CarUpdatesProvider = ({ children }) => { ); }; -export const useCarUpdatesContext = () => useContext(CarUpdatesContext); +export const useCarUpdatesContext = () => useContext(CarUpdatesContext); \ No newline at end of file diff --git a/src/components/Contexts/VehicleContext.test.jsx b/src/components/Contexts/VehicleContext.test.jsx index a8c79d5..97dc0ed 100644 --- a/src/components/Contexts/VehicleContext.test.jsx +++ b/src/components/Contexts/VehicleContext.test.jsx @@ -23,7 +23,7 @@ const checkVehiclesResult = (error, busy, vehicles) => { const checkFleetsResult = (error, busy, fleets) => { checkBaseResults(error, busy); expect(screen.getByTestId("fleets").innerHTML).toEqual(fleets); -} +}; const checkBaseResults = (error, busy) => { expect(screen.getByTestId("error").innerHTML).toEqual(error); @@ -69,7 +69,7 @@ describe("VehicleContext", () => { ); checkFleetsResult("", "false", JSON.stringify(["fleet1", "fleet2"])); }); - }) + }); describe("getVehicles", () => { beforeEach(() => { diff --git a/src/components/Controls/IssueSelectionTable/index.jsx b/src/components/Controls/IssueSelectionTable/index.jsx index 9ef35d6..ad351e4 100644 --- a/src/components/Controls/IssueSelectionTable/index.jsx +++ b/src/components/Controls/IssueSelectionTable/index.jsx @@ -214,4 +214,4 @@ IssueSelectionTable.propTypes = { onSelectAll: PropTypes.func, }; -export default IssueSelectionTable; +export default IssueSelectionTable; \ No newline at end of file diff --git a/src/components/Controls/SendCommand/Parameters.jsx b/src/components/Controls/SendCommand/Parameters.jsx index 5d6fe6c..21a5339 100644 --- a/src/components/Controls/SendCommand/Parameters.jsx +++ b/src/components/Controls/SendCommand/Parameters.jsx @@ -1,9 +1,9 @@ import PropTypes from "prop-types"; -import {FormControl} from "@material-ui/core"; +import { FormControl } from "@material-ui/core"; import useStyles from "../../useStyles"; export const Parameters = (props) => { - const {params} = props; + const { params } = props; const classes = useStyles(); @@ -11,19 +11,19 @@ export const Parameters = (props) => { return null; } - const {data, handleDataChange} = props; + const { data, handleDataChange } = props; return ( -
+
{params.dataFunc(data, handleDataChange)}
- ) -} + ); +}; Parameters.propTypes = { params: PropTypes.any, data: PropTypes.any, handleDataChange: PropTypes.func, -}; \ No newline at end of file +}; diff --git a/src/components/Controls/SendCommand/Parameters.test.jsx b/src/components/Controls/SendCommand/Parameters.test.jsx index df7f416..422bd4a 100644 --- a/src/components/Controls/SendCommand/Parameters.test.jsx +++ b/src/components/Controls/SendCommand/Parameters.test.jsx @@ -1,49 +1,52 @@ -import {render, waitFor} from "@testing-library/react"; -import {Parameters} from "./Parameters"; +import { render, waitFor } from "@testing-library/react"; +import { Parameters } from "./Parameters"; import addSnapshotSerializer from "../../../utils/snapshot"; const renderState = { EMPTY: 0, JUST_DATA: 1, -} +}; const renderParameters = async (rs) => { await waitFor(() => { /* render */ }); - if (rs===renderState.EMPTY) { - const { container } = render() + if (rs === renderState.EMPTY) { + const { container } = render(); return container; } - const params = {dataFunc:(val, handleValChange) =>
val.toString()
} - const [data, handleDataChange] = [true, (_)=>{}]; + const params = { + dataFunc: (val, handleValChange) =>
val.toString()
, + }; + const [data, handleDataChange] = [true, (_) => {}]; - if (rs===renderState.JUST_DATA) { - const { container } = render() + if (rs === renderState.JUST_DATA) { + const { container } = render( + + ); return container; } -} - +}; describe("Params", () => { beforeAll(() => { addSnapshotSerializer(expect); - }) + }); it("Render empty", async () => { const container = await renderParameters(renderState.EMPTY); expect(container).toMatchSnapshot(); - }) + }); it("Render just data", async () => { const container = await renderParameters(renderState.JUST_DATA); expect(container).toMatchSnapshot(); - }) -}) + }); +}); diff --git a/src/components/Fleets/Status/Vehicles/Table/index.jsx b/src/components/Fleets/Status/Vehicles/Table/index.jsx index 1554689..7d15c49 100644 --- a/src/components/Fleets/Status/Vehicles/Table/index.jsx +++ b/src/components/Fleets/Status/Vehicles/Table/index.jsx @@ -6,7 +6,7 @@ import { TableFooter, TablePagination, TableRow, - Tooltip, + Tooltip } from "@material-ui/core"; import AddCircleIcon from "@material-ui/icons/AddCircle"; import DeleteIcon from "@material-ui/icons/Delete"; @@ -18,7 +18,7 @@ import { logger } from "../../../../../services/monitoring"; import { hasRole, Permissions } from "../../../../../utils/roles"; import { FleetProvider, - useFleetContext, + useFleetContext } from "../../../../Contexts/FleetContext"; import { useStatusContext } from "../../../../Contexts/StatusContext"; import { useUserContext } from "../../../../Contexts/UserContext"; diff --git a/src/components/Fleets/Update/index.jsx b/src/components/Fleets/Update/index.jsx index 4672a49..62709bd 100644 --- a/src/components/Fleets/Update/index.jsx +++ b/src/components/Fleets/Update/index.jsx @@ -180,7 +180,11 @@ const MainForm = () => { } label="Trace" /> } label="Debug" /> } label="Info" /> - } label="Warning" /> + } + label="Warning" + /> } label="Error" /> ( ); -export default VehicleMap; +export default VehicleMap; \ No newline at end of file