diff --git a/src/store/store.spec.js b/src/store/store.spec.js index bd8a5f2a..f736806b 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -4,6 +4,7 @@ import globalMethods from '@/global-methods.js'; import { getRandomString, getRandomGuid, getRandomInt, getRandomBoolean } from '@/helpers/data-generation.js'; import coverageStatuses from '@/constants/coverage-statuses.js'; import { endpoints } from '@/constants/endpoints'; +import { AppointmentTypeStrings } from '@/constants/schedule-constants'; describe('Store', () => { let store; @@ -994,7 +995,7 @@ describe('Store', () => { describe('updatePolicyITACFlag method', () => { it('updatePolicyITACFlag updates policy.isITAC flag in store', () => { - // Assert + // Arrange const moqIsITAC = getRandomBoolean(); // Act @@ -1004,4 +1005,40 @@ describe('Store', () => { expect(store.order.policy.isITAC).toEqual(moqIsITAC); }); }); + + describe('isMobileAppointment', () => { + it('Should return true for mobile appointments', () => { + // Arrange + + // Act + store.updateServiceLocation({ + appointmentType: AppointmentTypeStrings.MOBILE + }); + + // Assert + expect(store.isMobileAppointment).toBe(true); + }); + + it('Should return false for non-mobile appointments', () => { + // Arrange + + // Act + store.updateServiceLocation({ + appointmentType: AppointmentTypeStrings.IN_SHOP + }); + + // Assert + expect(store.isMobileAppointment).toBe(false); + }); + + it('Should return false for null appointments', () => { + // Arrange + + // Act + store.updateServiceLocation({ appointmentType: null }); + + // Assert + expect(store.isMobileAppointment).toBe(false); + }); + }); });