diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b2134181..f21dde96 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -244,6 +244,11 @@ stages: Contents: '**' TargetFolder: 'public/.well-known' CleanTargetFolder: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/non-prod' + Contents: '**' + TargetFolder: 'public/.well-known' - task: DeleteFiles@1 inputs: SourceFolder: 'public/apple-pay' @@ -309,6 +314,11 @@ stages: Contents: '**' TargetFolder: 'public/.well-known' CleanTargetFolder: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/non-prod' + Contents: '**' + TargetFolder: 'public/.well-known' - task: DeleteFiles@1 inputs: SourceFolder: 'public/apple-pay' @@ -374,6 +384,11 @@ stages: Contents: '**' TargetFolder: 'public/.well-known' CleanTargetFolder: true + - task: CopyFiles@2 + inputs: + SourceFolder: 'public/apple-pay/non-prod' + Contents: '**' + TargetFolder: 'public/.well-known' - task: DeleteFiles@1 inputs: SourceFolder: 'public/apple-pay' diff --git a/package-lock.json b/package-lock.json index 9ecec093..558ff855 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4696,9 +4696,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -4842,7 +4842,9 @@ } }, "node_modules/@vitest/coverage-v8/node_modules/brace-expansion": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -7017,7 +7019,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -8966,7 +8970,9 @@ } }, "node_modules/editorconfig/node_modules/brace-expansion": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -14672,7 +14678,9 @@ } }, "node_modules/js-beautify/node_modules/brace-expansion": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -16745,7 +16753,9 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.12", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", "dev": true, "license": "MIT" }, diff --git a/public/apple-pay/non-prod/apple-developer-merchantid-domain-association b/public/apple-pay/non-prod/apple-developer-merchantid-domain-association new file mode 100644 index 00000000..06a25bc8 --- /dev/null +++ b/public/apple-pay/non-prod/apple-developer-merchantid-domain-association @@ -0,0 +1 @@ +7B227073704964223A2236304337424642364544314638313934464532303338324430433546453643423146433836313133344643433343333338303042463334303446414635454546222C2276657273696F6E223A312C22637265617465644F6E223A313731353230333539303839352C227369676E6174757265223A223330383030363039326138363438383666373064303130373032613038303330383030323031303133313064333030623036303936303836343830313635303330343032303133303830303630393261383634383836663730643031303730313030303061303830333038323033653333303832303338386130303330323031303230323038313636333463386230653330353731373330306130363038326138363438636533643034303330323330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333031653137306433323334333033343332333933313337333433373332333735613137306433323339333033343332333833313337333433373332333635613330356633313235333032333036303335353034303330633163363536333633326437333664373032643632373236663662363537323264373336393637366535663535343333343264353035323466343433313134333031323036303335353034306230633062363934663533323035333739373337343635366437333331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333035393330313330363037326138363438636533643032303130363038326138363438636533643033303130373033343230303034633231353737656465626436633762323231386636386464373039306131323138646337623062643666326332383364383436303935643934616634613534313162383334323065643831316633343037653833333331663163353463336637656233323230643662616435643465666634393238393839336537633066313361333832303231313330383230323064333030633036303335353164313330313031666630343032333030303330316630363033353531643233303431383330313638303134323366323439633434663933653465663237653663346636323836633366613262626664326534623330343530363038326230363031303530353037303130313034333933303337333033353036303832623036303130353035303733303031383632393638373437343730336132663266366636333733373032653631373037303663363532653633366636643266366636333733373033303334326436313730373036633635363136393633363133333330333233303832303131643036303335353164323030343832303131343330383230313130333038323031306330363039326138363438383666373633363430353031333038316665333038316333303630383262303630313035303530373032303233303831623630633831623335323635366336393631366536333635323036663665323037343638363937333230363336353732373436393636363936333631373436353230363237393230363136653739323037303631373237343739323036313733373337353664363537333230363136333633363537303734363136653633363532303666363632303734363836353230373436383635366532303631373037303663363936333631363236633635323037333734363136653634363137323634323037343635373236643733323036313665363432303633366636653634363937343639366636653733323036663636323037353733363532633230363336353732373436393636363936333631373436353230373036663663363936333739323036313665363432303633363537323734363936363639363336313734363936663665323037303732363136333734363936333635323037333734363137343635366436353665373437333265333033363036303832623036303130353035303730323031313632613638373437343730336132663266373737373737326536313730373036633635326536333666366432663633363537323734363936363639363336313734363536313735373436383666373236393734373932663330333430363033353531643166303432643330326233303239613032376130323538363233363837343734373033613266326636333732366332653631373037303663363532653633366636643266363137303730366336353631363936333631333332653633373236633330316430363033353531643065303431363034313439343537646236666435373438313836383938393736326637653537383530376537396235383234333030653036303335353164306630313031666630343034303330323037383033303066303630393261383634383836663736333634303631643034303230353030333030613036303832613836343863653364303430333032303334393030333034363032323130306336663032336362323631346262333033383838613136323938336531613933663130353666353066613738636462396261346361323431636331346532356530323231303062653363643064666431363234376636343934343735333830653964343463323238613130383930613361316463373234623862346362383838393831386263333038323032656533303832303237356130303330323031303230323038343936643266626633613938646139373330306130363038326138363438636533643034303330323330363733313162333031393036303335353034303330633132343137303730366336353230353236663666373432303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330316531373064333133343330333533303336333233333334333633333330356131373064333233393330333533303336333233333334333633333330356133303761333132653330326330363033353530343033306332353431373037303663363532303431373037303663363936333631373436393666366532303439366537343635363737323631373436393666366532303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330353933303133303630373261383634386365336430323031303630383261383634386365336430333031303730333432303030346630313731313834313964373634383564353161356532353831303737366538383061326566646537626165346465303864666334623933653133333536643536363562333561653232643039373736306432323465376262613038666437363137636538386362373662623636373062656338653832393834666635343435613338316637333038316634333034363036303832623036303130353035303730313031303433613330333833303336303630383262303630313035303530373330303138363261363837343734373033613266326636663633373337303265363137303730366336353265363336663664326636663633373337303330333432643631373037303663363537323666366637343633363136373333333031643036303335353164306530343136303431343233663234396334346639336534656632376536633466363238366333666132626266643265346233303066303630333535316431333031303166663034303533303033303130316666333031663036303335353164323330343138333031363830313462626230646561313538333338383961613438613939646562656264656261666461636232346162333033373036303335353164316630343330333032653330326361303261613032383836323636383734373437303361326632663633373236633265363137303730366336353265363336663664326636313730373036633635373236663666373436333631363733333265363337323663333030653036303335353164306630313031666630343034303330323031303633303130303630613261383634383836663736333634303630323065303430323035303033303061303630383261383634386365336430343033303230333637303033303634303233303361636637323833353131363939623138366662333563333536636136326266663431376564643930663735346461323865626566313963383135653432623738396638393866373962353939663938643534313064386639646539633266653032333033323264643534343231623061333035373736633564663333383362393036376664313737633263323136643936346663363732363938323132366635346638376137643162393963623962303938393231363130363939306630393932316430303030333138323031383833303832303138343032303130313330383138363330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533303230383136363334633862306533303537313733303062303630393630383634383031363530333034303230316130383139333330313830363039326138363438383666373064303130393033333130623036303932613836343838366637306430313037303133303163303630393261383634383836663730643031303930353331306631373064333233343330333533303338333233313332333633333330356133303238303630393261383634383836663730643031303933343331316233303139333030623036303936303836343830313635303330343032303161313061303630383261383634386365336430343033303233303266303630393261383634383836663730643031303930343331323230343230623231633335366532323037626639343466366163366362616331366630326162346130323539613334626436366338336464376364633736616464353336663330306130363038326138363438636533643034303330323034343733303435303232303132346264343939323464373533643835643233363066316635616165306230653765343263346237326166613766306263313032616539316365613930613830323231303062353061343036396433366632326634333265303061666665636136663364626265633633633666396133346231353838323436643634363032313332363636303030303030303030303030227D \ No newline at end of file diff --git a/src/constants/experiments.js b/src/constants/experiments.js index c336503b..1c0edd15 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -19,9 +19,18 @@ const experimentSettings = Object.freeze({ ISS_ENABLE_ADYEN_V1: 'ISS_Enable_Adyen_V1' }); +const experimentTest = Object.freeze({ + ISS_MOBILE_FIRST_POPUP_V3: 'ISS_Mobile_First_Popup_V3' +}); + +const experimentVariation = Object.freeze({ + ISS_MOBILE_FIRST_CONTROL_V3: 'NoShowMobileFirstPopUp_V3_CONTROL', + ISS_MOBILE_FIRST_TEST_V3: 'YesShowMobileFirstPopUp_V3_TEST' +}); + const experimentTriggers = Object.freeze({ SITE_ENTRY: 'SiteEntry', PAGE_ENTRY: 'PageEntry' }); -export { experimentUniverses, experimentSettings, experimentTriggers }; +export { experimentUniverses, experimentSettings, experimentTest, experimentVariation, experimentTriggers }; diff --git a/src/helpers/service-location-helper.js b/src/helpers/service-location-helper.js index 13aced81..5da94148 100644 --- a/src/helpers/service-location-helper.js +++ b/src/helpers/service-location-helper.js @@ -73,6 +73,21 @@ export async function getZipCodeData(zipCode) { return await processZipCodeResults(useMainStore().validateZip({ zip: zipCode })); } +export function isServiceableMobileWithData(isGlassServiceableMobile, isRecalibrationServiceableMobile) { + const isBigTruck = useMainStore().order.serviceLocation.isBigTruck; + if (isBigTruck) { + return false; + } + + if (isRecalibrationServiceableMobile === true || isRecalibrationServiceableMobile === false) { + return ( + isGlassServiceableMobile + && isRecalibrationServiceableMobile + ); + } + return !!isGlassServiceableMobile; +} + export function mapTimeSlot(timeSlot, timeOfDay) { return { ...timeSlot, diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index f94ead7e..b96e2850 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -96,7 +96,7 @@ import suggestTimeslotModal from '@/layouts/schedule-page/suggest-timeslot-modal import recalAckModal from '@/layouts/schedule-page/recal-ack-modal/recal-ack-modal.vue'; // Supporting files -import { experimentSettings, experimentUniverses } from '@/constants/experiments'; +import { experimentSettings, experimentTest, experimentVariation, experimentUniverses } from '@/constants/experiments'; import { AppointmentTypeStrings, GET_MOBILE_TIME_SLOTS, @@ -118,6 +118,7 @@ import { getPricedMobileFeePart, getMobileZipCodeData, getZipCodeData, + isServiceableMobileWithData, mapTimeSlot } from '@/helpers/service-location-helper'; import { Form } from 'vee-validate'; @@ -359,7 +360,7 @@ export default { mobileProviderNumber: resultMap.providers?.mobileProviderNumber, serviceabilityDetails: resultMap.serviceabilityDetails, zipCode: initialServiceLocationObj.zipCode - } + }; vm.setCmsContent(resultMap.cmsContent); vm.$refs.serviceLocation.initializeComponent(serviceLocationData); @@ -531,13 +532,18 @@ export default { ); }, async checkMobileFirstExperience(mobileFirstObject = {}) { + const mobileFirstExperimentVariation = this.getExperimentVariationNameByTestName(experimentTest.ISS_MOBILE_FIRST_POPUP_V3); + const isMobileFirstTestVariation = mobileFirstExperimentVariation === experimentVariation.ISS_MOBILE_FIRST_TEST_V3; const showMobileFirst = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_SHOW_FIRST_MOBILE_APPOINTMENT); if (showMobileFirst) { const pmMobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_PM_MOBILE_DAYS); const mobileDaysLimit = this.getSettingValue(experimentSettings.ISS_MOBILE_FIRST_MAX_MOBILE_DAYS); const hasSelectedDate = !!this.getSelectedDate(); - const isServicableMobile = mobileFirstObject.serviceabilityDetails?.isGlassServiceableMobile; - if (!hasSelectedDate && isServicableMobile && mobileFirstObject.mobileProviderNumber && mobileFirstObject.zipCode) { + const isServiceableMobile = isServiceableMobileWithData( + mobileFirstObject.serviceabilityDetails?.isGlassServiceableMobile ?? null, + mobileFirstObject.serviceabilityDetails?.isRecalibrationServiceableMobile ?? null + ); + if (!hasSelectedDate && isServiceableMobile && mobileFirstObject.mobileProviderNumber && mobileFirstObject.zipCode) { const todayDateObject = new Date(); const todayDateString = convertDateToDateString(todayDateObject); const calendarViewDirection = 'future'; @@ -663,7 +669,11 @@ export default { this.mainStore.logMobileFirstExperimentExposure(); } - this.$refs[SUGGEST_TIMESLOT_MODAL_REF_NAME].openModal(timeSlotForAutoSelectionMobile); + if (isMobileFirstTestVariation) { + this.$refs[SUGGEST_TIMESLOT_MODAL_REF_NAME].openModal(timeSlotForAutoSelectionMobile); + } else { + console.log('In Control group or experiment not found, skip showing popup'); + } } } } diff --git a/src/layouts/schedule-page/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue index 227c20bb..7476acd1 100644 --- a/src/layouts/schedule-page/service-location/service-location.vue +++ b/src/layouts/schedule-page/service-location/service-location.vue @@ -252,7 +252,7 @@ export default { return false; } - if (this.isRecalibrationServiceableMobile !== null) { + if (this.isRecalibrationServiceableMobile === true || this.isRecalibrationServiceableMobile === false) { return ( this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile diff --git a/src/mixins/experiment-mixin.js b/src/mixins/experiment-mixin.js index 7f9a761e..fab87d88 100644 --- a/src/mixins/experiment-mixin.js +++ b/src/mixins/experiment-mixin.js @@ -12,6 +12,17 @@ export default { const experiment = useMainStore().applicationUser.experiments.find((e) => e.universeName === experimentName); return experiment ? experiment : null; }, + getExperimentByTestName(testName) { + const experiment = useMainStore().applicationUser.experiments.find((experiment) => experiment.testName === testName); + return experiment ? experiment : null; + }, + getExperimentVariationNameByTestName(testName) { + const experimentByTestName = this.getExperimentByTestName(testName); + if (!experimentByTestName) { + return null; + } + return experimentByTestName.variationName; + }, getSettingValue(settingName) { return this.hasSetting(settingName) ? useMainStore().experimentSettings[settingName] diff --git a/src/store/index.js b/src/store/index.js index 2741c8bf..c1f79f0d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1344,8 +1344,22 @@ export const useMainStore = defineStore({ endpoint: `${endpoints.GetMobileFeePart.url}?${params.toString()}` }); }, - getServiceabilityDetails(serviceZipCode) { + console.log('BEEP BOOP'); + console.log('--ENVIRONMENT DETECTOR ROBOT ENGAGED--'); + const currentEnvironment = applicationConfig.CURRENT_ENVIRONMENT; + console.log('I HAVE DETERMINED THAT THE CURRENT ENVIRONMENT IS:', currentEnvironment); + console.log('---'); + console.log('---'); + if (currentEnvironment === 'Localhost' || currentEnvironment === 'Dev') { + console.log('NEW SERVICEABILITY DETAILS METHOD ACTIVATED'); + return this.getServiceabilityDetailsNewMethod(serviceZipCode); + } else { + console.log('OLD SERVICEABILITY DETAILS METHOD ACTIVATED'); + return this.getServiceabilityDetailsOldMethod(serviceZipCode); + } + }, + getServiceabilityDetailsOldMethod(serviceZipCode) { const { vehicle, damage, parentAccountNumber, referralSequenceNumber, lineItems } = this.order; const { carId } = vehicle; const glassArray = convertGlassPieceNamingForApi(damage.glassToReplace); @@ -1369,6 +1383,22 @@ export const useMainStore = defineStore({ endpoint: `${endpoints.GetServiceabilityDetails.url}?${params.toString()}` }); }, + getServiceabilityDetailsNewMethod(serviceZipCode) { + const { damage, lineItems, parentAccountNumber, vehicle } = this.order; + const { carId } = vehicle; + const flattenedGlassParts = getLineItemsFlattened(lineItems.glassParts); + const lineItemsList = flattenedGlassParts.map((part) => part.partNumber).join(','); + + let endPoint = `${endpoints.GetServiceabilityDetails.url}?zip=${serviceZipCode}&carId=${carId}&parentAccountNumber=${parentAccountNumber}&isRepair=${damage.isRepair}`; + if (lineItemsList) { + endPoint += `&lineItems=${lineItemsList}`; + } + + return globalMethods.callHttpClient({ + method: endpoints.GetServiceabilityDetails.method, + endpoint: endPoint + }); + }, lookupVehicleByVin(vin) { return globalMethods.callHttpClient({ method: endpoints.LookupVehicleByVin.method, @@ -1935,6 +1965,9 @@ export const useMainStore = defineStore({ this.updateMobileFee(fee); } else if (fee.partNumber === partNumberStrings.RECYCLE_FEE) { this.updateRecycleFee(fee); + } else if (fee.partNumber === partNumberStrings.LABOR2) { + // Do not add Labor2 to feeItems since it's already been added to supportingItems + this.addPartNumberFeeItem(null, partNumberStrings.LABOR2); } else { this.addPartNumberFeeItem(fee, fee.partNumber); } @@ -1949,8 +1982,8 @@ export const useMainStore = defineStore({ // Process Recycle Fee this.updateRecycleFee(partsData.find((rf) => rf.partNumber === partNumberStrings.RECYCLE_FEE)); - // Remove RecycleFee and Labor2 from supporting items as they're saved in feeItems; - this.order.lineItems.supportingItems = partsData.filter((i) => i.partNumber !== partNumberStrings.RECYCLE_FEE && i.partNumber !== partNumberStrings.LABOR2); + // Remove RecycleFee from supporting items since it's already been added to feeItems + this.order.lineItems.supportingItems = partsData.filter((i) => i.partNumber !== partNumberStrings.RECYCLE_FEE); }, updateVaps(partsData) { @@ -3084,7 +3117,7 @@ export const useMainStore = defineStore({ }); return response.data; }, - + hasSubmittedOrder() { return window.sessionStorage.getItem(webStorageConstants.SUBMITTED_ORDER) !== null; }, diff --git a/src/store/store.spec.js b/src/store/store.spec.js index bd601c24..38a52c16 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -2490,16 +2490,12 @@ describe('Store', () => { }); }); describe('updateSupportingItems method', () => { - it('updateSupportingItems removes Recyle Fee and Labor2 Fee from supporting items in store', () => { + it('updateSupportingItems removes Recycle Fee from supporting items in store', () => { // Arrange const partsData = [ { partNumber: 'RECYCLE FEE', partType: 'REPLACE FEE' - }, - { - partNumber: 'LABOR2', - partType: 'NON_GLASS' } ]; @@ -2507,14 +2503,38 @@ describe('Store', () => { store.updateSupportingItems(partsData); // Assert - expect.not.objectContaining({ - partNumber: 'RECYCLE FEE', - partType: 'REPLACE FEE' - }); - expect.not.objectContaining({ - partNumber: 'LABOR2', - partType: 'NON_GLASS' - }); + expect(store.order.lineItems.supportingItems).not.toEqual( + expect.arrayContaining([ + expect.objectContaining({ + partNumber: 'RECYCLE FEE', + partType: 'REPLACE FEE' + }) + ]) + ); }); }); -}); + describe('updateGlassFees method', () => { + it('updateGlassFees does not add Labor2 fee to feeItems', () => { + // Arrange + const feeData = [ + { + partNumber: 'LABOR2', + partType: 'LABOR FEE' + } + ]; + + // Act + store.updateGlassFees(feeData); + + // Assert + expect(store.order.lineItems.feeItems).not.toEqual( + expect.arrayContaining([ + expect.objectContaining({ + partNumber: 'LABOR2', + partType: 'LABOR FEE' + }) + ]) + ); + }); + }); +}); \ No newline at end of file