Merge CEC-394 Car update log (#82)
This commit is contained in:
@@ -11,9 +11,38 @@ let carUpdates = [
|
||||
status: "downloaded",
|
||||
created: "2021-07-01T22:40:07.778509Z",
|
||||
updated: "2021-07-12T18:22:13.736755Z",
|
||||
updatemanifest: {
|
||||
id: 283,
|
||||
name: "TEST UPDATE",
|
||||
version: "1000",
|
||||
description: "UPDATE DESCRIPTION",
|
||||
ecu_list: "AGS 1.0.0,AMP 1.0.0",
|
||||
created: "2021-08-20T18:37:41.960397Z",
|
||||
updated: "2021-08-20T18:37:50.007853Z",
|
||||
},
|
||||
},
|
||||
];
|
||||
let totalCarUpdates = 1;
|
||||
let carUpdateLog = {
|
||||
data: [
|
||||
{
|
||||
id: 90,
|
||||
status: "package_install_complete",
|
||||
error_code: 0,
|
||||
created: "2021-08-23T17:06:38.410115Z",
|
||||
updated: "2021-08-23T17:06:38.410115Z",
|
||||
},
|
||||
{
|
||||
id: 89,
|
||||
carupdate_id: 283,
|
||||
status: "package_install_start",
|
||||
error_code: 0,
|
||||
created: "2021-08-23T17:06:38.030052Z",
|
||||
updated: "2021-08-23T17:06:38.030052Z",
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
};
|
||||
|
||||
export const CarUpdatesProvider = ({ children }) => {
|
||||
return <div data-testid="mocked-carupdatesprovider">{children}</div>;
|
||||
@@ -24,7 +53,10 @@ export const useCarUpdatesContext = () => ({
|
||||
carUpdates,
|
||||
totalCarUpdates,
|
||||
deployCarUpdates: jest.fn((data) => data),
|
||||
getCarUpdates: jest.fn(() => carUpdates),
|
||||
getCarUpdates: jest.fn(() => ({
|
||||
data: carUpdates,
|
||||
})),
|
||||
getLog: jest.fn(() => carUpdateLog),
|
||||
getVINUpdates: jest.fn(() => carUpdates),
|
||||
startMonitor: jest.fn(),
|
||||
stopMonitor: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user