diff --git a/jest.config.js b/jest.config.js index 28c5557cb..c712c24da 100644 --- a/jest.config.js +++ b/jest.config.js @@ -26,7 +26,7 @@ module.exports = { testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], coverageThreshold: { global: { - statements: 78, + statements: 77, // Got the go ahead from Mark to temporarily lower this. Taking out initialize component made the year,make,model and style coverage drop a bit. Once unit tests for license plate lookup, vin lookup and address lookup are in the coverage should go back up to 90 }, }, diff --git a/src/store/index.js b/src/store/index.js index f00d6c460..38dd859be 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -349,6 +349,17 @@ export const mutations = { state.order.schedule.endTime = null; state.order.schedule.routeCode = null; state.order.schedule.jobMaxMinutes = null; + + //early bird fee used on schedule page also needs reset when schedule is reset + const supportingItems = state.order.lineItems.supportingItems; + const removeEarlyBirdIndex = supportingItems.findIndex( + (item) => item.partNumber == PREMIUM_FEE_PART_TYPE + ); + + if (removeEarlyBirdIndex >= 0) { + supportingItems.splice(removeEarlyBirdIndex, 1); + state.order.lineItems.supportingItems = supportingItems; + } }, resetState(state) { Object.assign(state, getDefaultState());