diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 84c1d1f2..1b9640ad 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -117,6 +117,10 @@ const endpoints = Object.freeze({ url: `${ACCOUNT_BASE_URL}/`, method: 'GET' }, + TaxOrderItems: { + url: `${PRICE_BASE_URL}/taxed-order-items`, + method: 'GET' + }, LogExperimentExposureIfAssigned: { url: `${EXPERIMENTS_BASE_URL}/log-exposure`, method: 'POST' diff --git a/src/iss-components/vehicle-banner/vehicle-banner.vue b/src/iss-components/vehicle-banner/vehicle-banner.vue index d86e7bfc..fd4010f9 100644 --- a/src/iss-components/vehicle-banner/vehicle-banner.vue +++ b/src/iss-components/vehicle-banner/vehicle-banner.vue @@ -23,7 +23,10 @@ export default { return this.genericVehicleImage; } - const { imageUrl } = this.mainStore.order.vehicle; + const imageUrl = (this.mainStore.hasSubmittedOrder()) + ? this.mainStore.submittedOrder.vehicle.imageUrl + : this.mainStore.order.vehicle.imageUrl; + if (!imageUrl || imageUrl === 'NULL') { return this.getUnmatchedVehicleIcon(); } diff --git a/src/layouts/duplicate-check/duplicate-check.spec.js b/src/layouts/duplicate-check/duplicate-check.spec.js index 13d00c9f..22c60c38 100644 --- a/src/layouts/duplicate-check/duplicate-check.spec.js +++ b/src/layouts/duplicate-check/duplicate-check.spec.js @@ -136,7 +136,8 @@ describe('duplicateCheck.vue', () => { expect(wrapper.vm.duplicateOrders[0]).toStrictEqual({ Text: duplicateOrderText, Name: referralNumber, - SubText: expectedSubtext + SubText: expectedSubtext, + value: useMainStore().applicationUser.duplicateOrders[0] }); }); test('duplicateOrder in store with null vehicle make => returns order with only date subtext', () => { @@ -173,7 +174,8 @@ describe('duplicateCheck.vue', () => { expect(wrapper.vm.duplicateOrders[0]).toStrictEqual({ Text: duplicateOrderText, Name: referralNumber, - SubText: expectedSubtext + SubText: expectedSubtext, + value: useMainStore().applicationUser.duplicateOrders[0] }); }); test('duplicateOrder in store with null vehicle model => returns order with only date subtext', () => { @@ -210,7 +212,8 @@ describe('duplicateCheck.vue', () => { expect(wrapper.vm.duplicateOrders[0]).toStrictEqual({ Text: duplicateOrderText, Name: referralNumber, - SubText: expectedSubtext + SubText: expectedSubtext, + value: useMainStore().applicationUser.duplicateOrders[0] }); }); test('duplicateOrder in store with all vehicle info => returns order with year, make, model and date in subtext', () => { @@ -248,7 +251,8 @@ describe('duplicateCheck.vue', () => { expect(wrapper.vm.duplicateOrders[0]).toStrictEqual({ Text: duplicateOrderText, Name: referralNumber, - SubText: `${expectedVehicle}, ${expectedDate}` + SubText: `${expectedVehicle}, ${expectedDate}`, + value: useMainStore().applicationUser.duplicateOrders[0] }); }); }); @@ -352,7 +356,7 @@ describe('duplicateCheck.vue', () => { test('Selected duplicate => load session called', async () => { // Arrange const newOrderSelectionName = getRandomString(6, 6); - const selectedAnswer = getRandomString(6, 6); + const selectedAnswer = {}; const mountOptions = getMountOptions({ router: { navigate: jest.fn() } @@ -405,7 +409,7 @@ describe('duplicateCheck.vue', () => { test('Load session throws error => still navigate forward', async () => { // Arrange const newOrderSelectionName = getRandomString(6, 6); - const selectedAnswer = getRandomString(6, 6); + const selectedAnswer = {}; const mountOptions = getMountOptions({ router: { navigate: jest.fn() } diff --git a/src/layouts/duplicate-check/duplicate-check.vue b/src/layouts/duplicate-check/duplicate-check.vue index 7245adef..4a842ba1 100644 --- a/src/layouts/duplicate-check/duplicate-check.vue +++ b/src/layouts/duplicate-check/duplicate-check.vue @@ -75,7 +75,7 @@ export default { }, data() { return { - selectedAnswer: '', + selectedAnswer: null, widget: { siteHeader: 'SiteHeaderWidget', siteSubHeader: 'SiteSubHeaderWidget', @@ -113,7 +113,8 @@ export default { return { Text: duplicateOrderText, Name: o.referralNumber, - SubText: toTitleCase(subtext) + SubText: toTitleCase(subtext), + value: o }; }) ?? []; }, @@ -126,13 +127,16 @@ export default { * @summary Steps to perform when forward button clicked. */ async forwardButtonAction() { - if (this.selectedAnswer !== this.getNewOrderSelectionName) { - await useMainStore().loadSession() - .then(() => {}, () => {}) - .finally(() => { this.navigateForward(); }); - } else { - this.navigateForward(); + if (this.selectedAnswer !== null && typeof this.selectedAnswer === 'object') { + await useMainStore().loadSession(this.selectedAnswer) + .catch(() => {}) + .finally(() => { + this.navigateForward(); + }); + return; } + + this.navigateForward(); }, navigateForward() { if (!this.mainStore.order.policy.policyLookupSuccessful) { diff --git a/src/layouts/order-confirmation/order-confirmation.spec.js b/src/layouts/order-confirmation/order-confirmation.spec.js index 5883b9d1..99ba8fa7 100644 --- a/src/layouts/order-confirmation/order-confirmation.spec.js +++ b/src/layouts/order-confirmation/order-confirmation.spec.js @@ -15,7 +15,7 @@ jest.mock('@/helpers/cms-content-helper', () => ({ fetchCmsContentForPage: jest.fn(), processIfStatements: jest.fn() })); -const wordingText = 'wording Text {custom:address}'; +const wordingText = 'wording text {custom:address}'; const mockMixin = { methods: { @@ -67,6 +67,55 @@ const initialStore = { } }; +const sessionStorage = { + schedule: { + date: '2024-03-01', + startTime: '09:00', + endTime: '10:00', + jobMinMinutes: 60, + jobMaxMinutes: 90 + }, + serviceLocation: { + address: '123 Test Way', + address2: '#1', + city: 'Mesa', + state: 'AZ', + zipCode: '12345', + appointmentType: 'Inshop', + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } + } + } +}; + +const sessionStorageMock = (() => { + let sessionStore = {}; + + return { + getItem(key) { + return sessionStore[key] || null; + }, + setItem(key, value) { + sessionStore[key] = value.toString(); + }, + removeItem(key) { + delete sessionStore[key]; + }, + clear() { + sessionStore = {}; + } + }; +})(); + +Object.defineProperty(window, 'sessionStorage', { + value: sessionStorageMock +}); + function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRun = () => {}) { const mountOptions = getMountOptions({ router: { @@ -107,9 +156,16 @@ function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRu } describe('OrderConfirmation.vue', () => { + beforeEach(() => { + window.sessionStorage.clear(); + }); + afterEach(() => { + window.sessionStorage.removeItem('submittedOrder'); + }); describe('Rendering', () => { test('Should render Site Header', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const { wrapper } = getMountedComponent(initialStore); // Act @@ -120,6 +176,7 @@ describe('OrderConfirmation.vue', () => { }); test('Should render Vehicle Banner', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const { wrapper } = getMountedComponent(initialStore); // Act @@ -130,6 +187,7 @@ describe('OrderConfirmation.vue', () => { }); test('If Advanced flow, should display Site Footer', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const testStore = { order: { schedule: { @@ -154,6 +212,7 @@ describe('OrderConfirmation.vue', () => { }); test('If Essential flow, should not display Site Footer', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const { wrapper } = getMountedComponent(initialStore); // Act @@ -166,6 +225,7 @@ describe('OrderConfirmation.vue', () => { describe('Navigation', () => { test('If Advanced flow, forward button action navigates to carrier URL', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const carrierReturnUrl = 'testURL'; const testStore = { order: { @@ -193,6 +253,7 @@ describe('OrderConfirmation.vue', () => { describe('Computed properties', () => { test('appointmentDateFormatted should return date in expected format', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const { wrapper } = getMountedComponent(initialStore); // Act @@ -203,19 +264,18 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentTimeFormatted should return Mobile time in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' - }, - serviceLocation: { - appointmentType: 'Mobile' - } + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + appointmentType: 'Mobile' } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentTimeFormatted; @@ -225,19 +285,26 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentTimeFormatted should return Drop Off time in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' - }, - serviceLocation: { - appointmentType: 'Dropoff' + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + appointmentType: 'Dropoff', + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } } } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentTimeFormatted; @@ -247,6 +314,7 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentTimeFormatted should return In Shop time in expected format', () => { // Arrange + window.sessionStorage.setItem('submittedOrder', JSON.stringify(sessionStorage)); const { wrapper } = getMountedComponent(initialStore); // Act @@ -257,111 +325,162 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentWordingText should return Mobile text in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' - }, - serviceLocation: { - address: '123 Test Way', - address2: '#1', - city: 'Mesa', - state: 'AZ', - zipCode: '12345', - appointmentType: 'Mobile' - } + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + address: '123 Test Way', + address2: '#1', + city: 'Mesa', + state: 'AZ', + zipCode: '12345', + appointmentType: 'Mobile' } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText; // Assert - expect(testValue).toEqual('wording Text
123 Test Way, #1,
Mesa, AZ 12345
'); + expect(testValue).toEqual('wording text 123 Test Way, #1,
Mesa, AZ 12345'); }); test('appointmentWordingText should return Drop Off text in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } }, - serviceLocation: { - provider: { - address: { - streetAddress: '123 Safelite Street', - city: 'Mesa', - state: 'AZ', - zipCode: '12345' - } - }, - appointmentType: 'Dropoff' - } + appointmentType: 'Dropoff' } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText; // Assert - expect(testValue).toEqual('wording Text
123 Safelite Street,
Mesa, AZ 12345
'); + expect(testValue).toEqual('wording text 123 Safelite Street,
Mesa, AZ 12345'); }); test('appointmentWordingText should return In Shop text in expected format', () => { // Arrange - const { wrapper } = getMountedComponent(initialStore); + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } + }, + appointmentType: 'Inshop' + } + }; + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText; // Assert - expect(testValue).toEqual('wording Text
123 Safelite Street,
Mesa, AZ 12345
'); + expect(testValue).toEqual('wording text 123 Safelite Street,
Mesa, AZ 12345'); }); test('serviceLocationFullAddress should return text in expected format', () => { // Arrange - const { wrapper } = getMountedComponent(initialStore); + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + address: '123 Test Way', + address2: '#1', + city: 'Mesa', + state: 'AZ', + zipCode: '12345', + appointmentType: 'Mobile' + } + }; + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.serviceLocationFullAddress; // Assert - expect(testValue).toEqual('
123 Test Way, #1,
Mesa, AZ 12345
'); + expect(testValue).toEqual('123 Test Way, #1,
Mesa, AZ 12345'); }); test('providerFullAddress should return text in expected format', () => { // Arrange - const { wrapper } = getMountedComponent(initialStore); + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } + }, + appointmentType: 'Inshop' + } + }; + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.providerFullAddress; // Assert - expect(testValue).toEqual('
123 Safelite Street,
Mesa, AZ 12345
'); + expect(testValue).toEqual('123 Safelite Street,
Mesa, AZ 12345'); }); test('appointmentWordingText2 should return Mobile text in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' - }, - serviceLocation: { - address: '123 Test Way', - address2: '#1', - city: 'Mesa', - state: 'AZ', - zipCode: '12345', - appointmentType: 'Mobile' - } + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + address: '123 Test Way', + address2: '#1', + city: 'Mesa', + state: 'AZ', + zipCode: '12345', + appointmentType: 'Mobile' } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText2; @@ -371,27 +490,26 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentWordingText2 should return Drop Off and text in expected format', () => { // Arrange - const testStore = { - order: { - schedule: { - date: '2019-01-01', - startTime: '09:00', - endTime: '10:00' + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } }, - serviceLocation: { - provider: { - address: { - streetAddress: '123 Safelite Street', - city: 'Mesa', - state: 'AZ', - zipCode: '12345' - } - }, - appointmentType: 'Dropoff' - } + appointmentType: 'Dropoff' } }; - const { wrapper } = getMountedComponent(testStore); + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText2; @@ -402,7 +520,26 @@ describe('OrderConfirmation.vue', () => { }); test('appointmentWordingText2 should return In Shop text in expected format', () => { // Arrange - const { wrapper } = getMountedComponent(initialStore); + const testSessionStorage = { + schedule: { + date: '2019-01-01', + startTime: '09:00', + endTime: '10:00' + }, + serviceLocation: { + provider: { + address: { + streetAddress: '123 Safelite Street', + city: 'Mesa', + state: 'AZ', + zipCode: '12345' + } + }, + appointmentType: 'Inshop' + } + }; + window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage)); + const { wrapper } = getMountedComponent(); // Act const testValue = wrapper.vm.appointmentWordingText2; diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue index f1bddf9e..fa7a4c14 100644 --- a/src/layouts/order-confirmation/order-confirmation.vue +++ b/src/layouts/order-confirmation/order-confirmation.vue @@ -58,7 +58,9 @@ import settleAllPromises from '@/helpers/layout-helper'; import { Form } from 'vee-validate'; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; -import { get12HourTimeFormat, get12HourTimeMobileFormat, convertDateStringToDate, +import { get12HourTimeFormat, + get12HourTimeMobileFormat, + convertDateStringToDate, getDisplayTextForDurationLength } from '@/helpers/date-helper.js'; import { toTitleCase } from '@/helpers/text-helper.js'; import { AppointmentTypeStrings } from '@/constants/schedule-constants'; @@ -66,14 +68,15 @@ import { AppointmentTypeStrings } from '@/constants/schedule-constants'; export default { name: 'order-confirmation', components: { + // eslint-disable-next-line vue/no-reserved-component-names + Form, siteHeader, vehicleBanner, - siteFooter, - // eslint-disable-next-line vue/no-reserved-component-names - Form + siteFooter }, mixins: [BaseFormMixin], async beforeRouteEnter(to, from, next) { + useMainStore().createSubmittedOrder(); // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.issPage); // Settle promises and get results @@ -90,7 +93,8 @@ export default { }, setup() { const mainStore = useMainStore(); - return { mainStore }; + const { submittedOrder } = mainStore; + return { mainStore, submittedOrder }; }, computed: { carrierName() { @@ -106,16 +110,16 @@ export default { return this.getCmsContent('OrderConfirmationContent', 'Image'); }, appointmentType() { - return this.mainStore.order.serviceLocation.appointmentType; + return this.submittedOrder.serviceLocation.appointmentType; }, appointmentDate() { - return this.mainStore.order.schedule.date; + return this.submittedOrder.schedule.date; }, appointmentStartTime() { - return this.mainStore.order.schedule.startTime; + return this.submittedOrder.schedule.startTime; }, appointmentEndTime() { - return this.mainStore.order.schedule.endTime; + return this.submittedOrder.schedule.endTime; }, appointmentDateFormatted() { // This conversion ensures we don't get get GMT induced date changes @@ -144,39 +148,39 @@ export default { return this.getBodyText2FromCms('DropOffAndInShopWordingWidget'); }, serviceLocationAddress() { - return this.mainStore.order.serviceLocation.address; + return this.submittedOrder.serviceLocation.address; }, serviceLocationAddress2() { - return this.mainStore.order.serviceLocation.address2; + return this.submittedOrder.serviceLocation.address2; }, serviceLocationCity() { - return this.mainStore.order.serviceLocation.city; + return this.submittedOrder.serviceLocation.city; }, serviceLocationState() { - return this.mainStore.order.serviceLocation.state; + return this.submittedOrder.serviceLocation.state; }, serviceLocationZipCode() { - return this.mainStore.order.serviceLocation.zipCode; + return this.submittedOrder.serviceLocation.zipCode; }, serviceLocationFullAddress() { // eslint-disable-next-line max-len - return `
${this.serviceLocationAddress}, ${this.serviceLocationAddress2 ? `${this.serviceLocationAddress2},` : ''}
${this.serviceLocationCity}, ${this.serviceLocationState} ${this.serviceLocationZipCode}
`; + return `${this.serviceLocationAddress}, ${this.serviceLocationAddress2 ? `${this.serviceLocationAddress2},` : ''}
${this.serviceLocationCity}, ${this.serviceLocationState} ${this.serviceLocationZipCode}`; }, providerAddress() { - return toTitleCase(this.mainStore.order.serviceLocation.provider.address.streetAddress); + return toTitleCase(this.submittedOrder.serviceLocation.provider.address.streetAddress); }, providerCity() { - return toTitleCase(this.mainStore.order.serviceLocation.provider.address.city); + return toTitleCase(this.submittedOrder.serviceLocation.provider.address.city); }, providerState() { - return this.mainStore.order.serviceLocation.provider.address.state; + return this.submittedOrder.serviceLocation.provider.address.state; }, providerZipCode() { - return this.mainStore.order.serviceLocation.provider.address.zipCode; + return this.submittedOrder.serviceLocation.provider.address.zipCode; }, providerFullAddress() { // eslint-disable-next-line max-len - return `
${this.providerAddress},
${this.providerCity}, ${this.providerState} ${this.providerZipCode}
`; + return `${this.providerAddress},
${this.providerCity}, ${this.providerState} ${this.providerZipCode}`; }, appointmentWordingText() { switch (this.appointmentType) { @@ -217,18 +221,19 @@ export default { } }, mobileAppointment() { - return this.mainStore.isMobileAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE + || this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; }, inShopAppointment() { - return this.mainStore.isInShopAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.IN_SHOP; }, dropOffAppointment() { - return this.mainStore.isDropOffAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF; }, inShopAppointmentDuration() { const inshopDurationTime = getDisplayTextForDurationLength( - this.mainStore.order.schedule.jobMinMinutes, - this.mainStore.order.schedule.jobMaxMinutes + this.submittedOrder.schedule.jobMinMinutes, + this.submittedOrder.schedule.jobMaxMinutes ); return inshopDurationTime; } @@ -310,6 +315,9 @@ $page-side-padding: 1.5rem; } .appointment-text { + :deep(p) { + margin: 0; + } :deep(strong) { font-weight: $font-weight-bold; color: $black; diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 24ee6102..2190d406 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -36,7 +36,6 @@ ref="siteFooter" cmsWidgetName="SiteFooterWidget" :isForwardActionDisabled="!meta.valid" - :isBackButtonHidden="shouldHideBackButton" :isStackedVertically="true" @backClicked="navigateBack" @ForwardClicked="forwardButtonAction" /> diff --git a/src/layouts/payment-page/payment-page.spec.js b/src/layouts/payment-page/payment-page.spec.js index 07822757..4aea7c28 100644 --- a/src/layouts/payment-page/payment-page.spec.js +++ b/src/layouts/payment-page/payment-page.spec.js @@ -264,44 +264,6 @@ describe('payment-page.vue', () => { }); }); - describe('beforeRouteEnter', () => { - test('Properly initializes fields and kicks off hop', async () => { - // Arrange - const vmMock = { - setCmsContent: jest.fn(), - $refs: { - cart: { - cartItems: [] - } - }, - getPiaLineItems: jest.fn(), - fetchSignatureInfo: jest.fn(), - setIFrameListener: jest.fn(), - - $nextTick: (f) => { - f(); - } - }; - - const nextF = (f) => { - f(vmMock); - }; - - // Act - await payment.beforeRouteEnter.call( - vmMock, - { query: { issPage: 'payment-page' } }, - undefined, - nextF - ); - - // Assert - expect(vmMock.setCmsContent).toBeCalled(); - expect(vmMock.fetchSignatureInfo).toBeCalled(); - expect(vmMock.setIFrameListener).toBeCalled(); - }); - }); - describe('payment type mapping', () => { describe('getPaymentType', () => { test('Maps AFTERPAY -> hopPaymentMethods.AFTERPAY', () => { diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 1f77de74..b230d5ee 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -1,9 +1,5 @@