CEC-2752-Add-Mobile-Issue-Tracker (#250)

* first commit

* removed comments

* remove more comments

* fix build issues

* fix unused vars

* update snapshot

* fix test

* Fix connect ECONNREFUSED 127.0.0.1:80

* Test Magna side menu

* attempt to pass test

* fix test

* remove comments

* fix some code smells

* fix test

* resolve comments

* fix bug

* resolved comments

* resolve comments

* resolve comments

* update snapshot

* resolved comments

Co-authored-by: jwu-fisker <jwu@fiskerinc.com>
This commit is contained in:
das31
2023-01-09 13:17:41 -05:00
committed by GitHub
parent 097d58656a
commit 28135b4829
23 changed files with 3024 additions and 131 deletions

View File

@@ -0,0 +1,35 @@
import React from "react";
let issue = {
"id": 1,
"vin": "1GNGC26RXXJ407648",
"title": "sometitle",
"description": "2343242",
"driver_id": "valid-cognito-id-1",
"timestamp": "2022-12-09T23:16:38.074858Z",
"images": [
{
"id": 1,
"image": "SGVsbG8x",
"issue_id": 1
}
]
}
let issues = [
{ "id": 15, "vin": "4Y1SL65848Z411439", "title": "sometitle", "description": "2343242", "driver_id": "12345", "timestamp": "2022-12-09T23:16:38.074858Z" },
{ "id": 17, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" },
];
export const IssueProvider = ({ children }) => {
return <div data-testid="mocked-issueprovider">{children}</div>;
};
export const useIssueContext = () => ({
issue,
issues,
deleteIssue: jest.fn(),
getIssues: jest.fn().mockReturnValue(issues),
getIssue: jest.fn(),
});