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:
11
src/services/__mocks__/issueAPI.js
Normal file
11
src/services/__mocks__/issueAPI.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const issueAPI = {
|
||||
getIssues: async (token) => {
|
||||
return { "data": [{ "id": 18, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 19, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 20, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 21, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 22, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 25, "vin": "1GNGC26RXXJ407648", "title": "Example HMI Problem", "description": "HMI blue screen", "driver_id": "0b6b1930-b20a-4fce-967a-efac6a01fd10", "timestamp": "2022-12-19T22:25:03.848855Z" }, { "id": 26, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 27, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }, { "id": 28, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z" }], "total": 9 }
|
||||
},
|
||||
getIssue: async (token) => {
|
||||
return { "data": { "id": 18, "vin": "1GNGC26RXXJ407648", "title": "sometitle", "description": "2343242", "driver_id": "valid-cognito-id-1", "timestamp": "2022-12-09T23:16:38.074858Z", "images": [{ "id": 15, "image": "SGVsbG8x", "issue_id": 18 }] } }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default issueAPI;
|
||||
@@ -1,4 +1,7 @@
|
||||
const SupersetAPI = {
|
||||
getGuestToken: async () => {
|
||||
return ""
|
||||
},
|
||||
getEmbeddedDashboards: async () => {
|
||||
return [{
|
||||
title: "test title",
|
||||
@@ -7,7 +10,8 @@ const SupersetAPI = {
|
||||
},
|
||||
SupersetDashboardID: () => {
|
||||
return "11111100-0000-1111-1111-000000000000"
|
||||
}
|
||||
},
|
||||
SupersetDashboardURL: () => (null),
|
||||
}
|
||||
|
||||
export default SupersetAPI
|
||||
@@ -59,6 +59,9 @@ const suppliersAPI = {
|
||||
if (index >= 0) data[index] = supplier;
|
||||
return supplier;
|
||||
},
|
||||
getManufactureCert: async () => {
|
||||
return {public_key:"-----BEGIN CERTIFICATE-----\nTEST\n-----END CERTIFICATE-----",private_key:"-----BEGIN RSA PRIVATE KEY-----\nTEST\n-----END RSA PRIVATE KEY-----","serial_number":"66:c8:45:20:bd:75:04:79:e8:5e:0e:46:5b:5c:1a:21:8b:ea:81:9f","type":"rsa"}
|
||||
},
|
||||
};
|
||||
|
||||
export default suppliersAPI;
|
||||
|
||||
Reference in New Issue
Block a user