Merge CEC-394 Car update log (#82)

This commit is contained in:
John Wu
2021-08-26 15:03:45 -07:00
committed by GitHub
parent d1815e2ff9
commit 74eb2707a3
34 changed files with 3114 additions and 3583 deletions

View File

@@ -1,6 +1,5 @@
jest.mock("../Contexts/FileUploadContext");
jest.mock("../Contexts/VehicleContext");
jest.mock("../Contexts/UpdatesContext");
jest.mock("../Contexts/UserContext");
jest.mock("../Contexts/ManifestsContext");
jest.mock("../Contexts/CarUpdatesContext");
@@ -65,26 +64,6 @@ describe("App", () => {
await sleepAndCheck("/home", "span.MuiButton-label", "Sign In");
});
it("Route /vehicle-add unauthenticated", async () => {
await check("/vehicle-add", "span.MuiButton-label", "Sign In");
});
it("Route /carupdate-deploy unauthenticated", async () => {
await check("/carupdate-deploy/1", "span.MuiButton-label", "Sign In");
});
it("Route /carupdate-status unauthenticated", async () => {
await check("/carupdate-status/1", "span.MuiButton-label", "Sign In");
});
it("Route /vehicles unauthenticated", async () => {
await check("/vehicles", "span.MuiButton-label", "Sign In");
});
it("Route /vehicle-status unauthenticated", async () => {
await check("/vehicle-status/FISKER123", "span.MuiButton-label", "Sign In");
});
it("Route /datascope unauthenticated", async () => {
await sleepAndCheck("/datascope", "span.MuiButton-label", "Sign In");
});
@@ -109,6 +88,25 @@ describe("App", () => {
await check("/package-create", "span.MuiButton-label", "Sign In");
});
it("Route /vehicle-add unauthenticated", async () => {
await check("/vehicle-add", "span.MuiButton-label", "Sign In");
});
it("Route /vehicles unauthenticated", async () => {
await check("/vehicles", "span.MuiButton-label", "Sign In");
});
it("Route /vehicle-status unauthenticated", async () => {
await check("/vehicle-status/FISKER123", "span.MuiButton-label", "Sign In");
});
it("Route /vehicle-status/vin/carupdateid unauthenticated", async () => {
await check("/vehicle-status/1G1FP87S3GN100062/283", "span.MuiButton-label", "Sign In");
});
it("Route /page-not-found unauthenticated", async () => {
await check("/page-not-found", "h1", "Page Not Found");
});
it("Route / authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await sleepAndCheck("/", "h6", "Home");
@@ -119,40 +117,11 @@ describe("App", () => {
await sleepAndCheck("/home", "h6", "Home");
});
it("Route /vehicle-add authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicle-add", "h6", "Add Vehicle");
});
it("Route /carupdate-status authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/carupdate-status/1", "h6", "Package Package 1.0");
});
it("Route /vehicles authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicles", "h6", "Vehicles");
});
it("Route /vehicle-status authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicle-status/FISKER123", "h6", "Vehicle FISKER123 Details");
});
it("Route /page-not-found unauthenticated", async () => {
await check("/page-not-found", "h1", "Page Not Found");
});
it("Route /page-not-found authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/page-not-found", "h1", "Page Not Found");
});
it("Route /carupdate-deploy authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/carupdate-deploy/1", "h6", "Deploy Package 1.0");
});
it("Route /datascope authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await sleepAndCheck("/datascope", "h6", "Datascope");
@@ -182,4 +151,24 @@ describe("App", () => {
setToken(TEST_AUTH_OBJECT);
await check("/package-create", "h6", "Create Deployments");
});
it("Route /vehicle-add authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicle-add", "h6", "Add Vehicle");
});
it("Route /vehicles authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicles", "h6", "Vehicles");
});
it("Route /vehicle-status authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await check("/vehicle-status/FISKER123", "h6", "Vehicle FISKER123 Details");
});
it("Route /vehicle-status/vin/carupdateid authenticated", async () => {
setToken(TEST_AUTH_OBJECT);
await sleepAndCheck("/vehicle-status/1G1FP87S3GN100062/283", "h6", "Vehicle 1G1FP87S3GN100062, Update TEST UPDATE");
});
});

File diff suppressed because it is too large Load Diff