Reintegrate tests
MODIFY
test/api/OCPPCommonTests.ts
test/api/OCPPCommonTests.ts
@@ -610,7 +610,7 @@ export default class OCPPCommonTests {
}
}
- public async testStopTransaction(withSoC = false) {
+ public async testStopTransaction(withSoC = false, withSignedData = false) {
// Check on Transaction
expect(this.newTransaction).to.not.be.null;
expect(this.transactionCurrentTime).to.not.be.null;
@@ -634,6 +634,7 @@ export default class OCPPCommonTests {
const totalTransactionPrice = Utils.computeSimplePrice(this.pricekWh, this.transactionTotalConsumptionWh);
expect(this.totalPrice).equal(totalTransactionPrice);
expect(transactionValidation.data).to.deep['containSubset']({
+ 'signedData': (withSignedData ? this.transactionStartSignedData : null),
'stop': {
'meterStop': this.energyActiveImportEndMeterValue,
'totalConsumptionWh': this.transactionTotalConsumptionWh,
@@ -647,6 +648,7 @@ export default class OCPPCommonTests {
'tagID': this.transactionStopUser.tags[0].id,
'timestamp': this.transactionCurrentTime.toISOString(),
'stateOfCharge': (withSoC ? this.socMeterValues[this.socMeterValues.length - 1] : 0),
+ 'signedData': (withSignedData ? this.transactionEndSignedData : null),
'user': {
'id': this.transactionStopUser.id,
'name': this.transactionStopUser.name,
@@ -667,6 +669,7 @@ export default class OCPPCommonTests {
expect(response.data).to.deep['containSubset']({
'chargeBoxID': this.newTransaction.chargeBoxID,
'connectorId': this.newTransaction.connectorId,
+ 'signedData': (withSignedData ? this.transactionStartSignedData : null),
'stop': {
'price': this.totalPrice,
'pricingSource': 'simple',
@@ -676,6 +679,7 @@ export default class OCPPCommonTests {
'totalInactivitySecs': this.transactionTotalInactivitySecs,
'inactivityStatus': InactivityStatus.INFO,
'stateOfCharge': (withSoC ? this.socMeterValues[this.socMeterValues.length - 1] : 0),
+ 'signedData': (withSignedData ? this.transactionEndSignedData : null),
'user': {
'id': this.transactionStopUser.id,
'name': this.transactionStopUser.name,

Reintegrate tests