Change car ID api
MODIFY
test/api/CarTest.ts
test/api/CarTest.ts
@@ -316,6 +316,21 @@ describe('Car Service', function() {
expect(response.status).to.equal(550);
});
});
+
+ after(async () => {
+ testData.centralService = new CentralServerService(ContextDefinition.TENANT_CONTEXTS.TENANT_CAR, {
+ email: config.get('admin.username'),
+ password: config.get('admin.password')
+ });
+ // Delete any created car
+ testData.createdCars.forEach(async (car) => {
+ await testData.centralService.deleteEntity(
+ testData.centralService.carApi,
+ car,
+ false
+ );
+ });
+ });
});
describe('Where Super admin user', () => {

MODIFY
test/api/client/CarApi.ts
test/api/client/CarApi.ts
@@ -23,7 +23,7 @@ export default class CarApi extends CrudApi {
}
public async readCar(id) {
- return super.read({ CarID: id }, '/client/api/Car');
+ return super.read({ ID: id }, '/client/api/Car');
}
public async readCars(params, paging = TestConstants.DEFAULT_PAGING, ordering = TestConstants.DEFAULT_ORDERING) {
@@ -38,4 +38,8 @@ export default class CarApi extends CrudApi {
return super.create(data, '/client/api/CarCreate');
}
+ public async delete(id) {
+ return super.delete(id, '/client/api/CarDelete');
+ }
+
}

Change car ID api