Adapt unit tests to visualTagID
MODIFY
test/api/OCPPCommonTests.ts
test/api/OCPPCommonTests.ts
@@ -442,19 +442,22 @@ export default class OCPPCommonTests {
const response = await this.centralUserService.chargingStationApi.remoteStartTransaction({
'chargingStationID': this.chargingStationContext.getChargingStation().id,
'args': {
- 'tagID': this.transactionStartUser.tags[0].id,
- 'connectorId': this.chargingStationContext.getChargingStation().connectors[0].connectorId
+ 'visualTagID': this.transactionStartUser.tags[0].visualID,
+ 'connectorId': this.chargingStationContext.getChargingStation().connectors[0].connectorId,
+ 'userID': this.transactionStartUser.id
}
});
expect(response.status).to.equal(StatusCodes.INTERNAL_SERVER_ERROR);
}
public async testRemoteStartTransactionWithUnassignedChargingStation() {
+ console.log('yooo ' + this.transactionStartUser.tags[0].id);
const response = await this.centralUserService.chargingStationApi.remoteStartTransaction({
'chargingStationID': this.chargingStationContext.getChargingStation().id,
'args': {
- 'tagID': this.transactionStartUser.tags[0].id,
- 'connectorId': this.chargingStationContext.getChargingStation().connectors[0].connectorId
+ 'visualTagID': this.transactionStartUser.tags[0].visualID,
+ 'connectorId': this.chargingStationContext.getChargingStation().connectors[0].connectorId,
+ 'userID': this.transactionStartUser.id
}
});
expect(response.status).to.equal(StatusCodes.INTERNAL_SERVER_ERROR);

MODIFY
test/api/context/ContextDefinition.ts
test/api/context/ContextDefinition.ts
@@ -383,6 +383,7 @@ export default class ContextDefinition {
assignedToSite: ContextDefinition.USER_CONTEXTS.DEFAULT_ADMIN.assignedToSite,
tags: (ContextDefinition.USER_CONTEXTS.DEFAULT_ADMIN.withTags ? [{
id: 'A1234',
+ visualID: new ObjectID().toString(),
issuer: false,
active: true
}] : null)

Adapt unit tests to visualTagID