{{ appointmentDateFormatted }}
+{{ appointmentTimeFormatted }}
+-
+
diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js
index 5f3b1a91..8bd893e9 100644
--- a/src/constants/endpoints.js
+++ b/src/constants/endpoints.js
@@ -1,190 +1,203 @@
+const CONTENT_BASE_URL = '/content/api/v1/content';
+const LOCATION_BASE_URL = '/location/api/v1/location';
+const SCHEDULE_BASE_URL = '/schedule/api/v1/schedule';
+const PARTS_BASE_URL = '/parts/api/v1/parts';
+const VEHICLE_BASE_URL = '/vehicle/api/v1/vehicle';
+const PRICE_BASE_URL = '/price/api/v1/price';
+const ACCOUNT_BASE_URL = '/account/api/v1/account';
+const EXPERIMENTS_BASE_URL = '/experiments/api/v1/experiments';
+const ANALYTICS_BASE_URL = '/analytics/api/v1/analytics';
+const CLIENT_AUTH_BASE_URL = '/clientauth/api/v1/clientauth';
+const COVERAGE_BASE_URL = '/coverage/api/v1/coverage';
+const ORDER_BASE_URL = '/order/api/v1/order';
+
const endpoints = Object.freeze({
GetRouteInfo: {
- url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/RouteInfo`,
+ url: (applicationAbbreviation) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/RouteInfo`,
method: 'POST'
},
GetHomepageInfo: {
- url: (applicationAbbreviation) => `/content/api/v1/content/${applicationAbbreviation}/HomepageInfo`,
+ url: (applicationAbbreviation) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/HomepageInfo`,
method: 'GET'
},
GetPageData: {
- url: (applicationAbbreviation, pageName) => `/content/api/v1/content/${applicationAbbreviation}/${pageName}`,
+ url: (applicationAbbreviation, pageName) => `${CONTENT_BASE_URL}/${applicationAbbreviation}/${pageName}`,
method: 'GET'
},
GetAlertReasons: {
- url: '/location/api/v1/location/alert-reasons',
+ url: `${LOCATION_BASE_URL}/alert-reasons`,
method: 'GET'
},
GetShopTimeSlots: {
- url: '/schedule/api/v1/schedule/shop-time-slots',
+ url: `${SCHEDULE_BASE_URL}/shop-time-slots`,
method: 'POST'
},
GetMobileTimeSlots: {
- url: '/schedule/api/v1/schedule/mobile-time-slots',
+ url: `${SCHEDULE_BASE_URL}/mobile-time-slots`,
method: 'POST'
},
GetMobilePremiumFee: {
- url: '/parts/api/v1/parts/mobile-premium-fee',
+ url: `${PARTS_BASE_URL}/mobile-premium-fee`,
method: 'GET'
},
GetVehicleYears: {
- url: '/vehicle/api/v1/vehicle/years',
+ url: `${VEHICLE_BASE_URL}/years`,
method: 'GET'
},
GetVehicleMakes: {
- url: '/vehicle/api/v1/vehicle/makes/',
+ url: `${VEHICLE_BASE_URL}/makes/`,
method: 'GET'
},
GetVehicleModels: {
- url: '/vehicle/api/v1/vehicle/models',
+ url: `${VEHICLE_BASE_URL}/models`,
method: 'GET'
},
GetVehicleStyles: {
- url: '/vehicle/api/v1/vehicle/styles',
+ url: `${VEHICLE_BASE_URL}/styles`,
method: 'GET'
},
GetDamageOptions: {
- url: '/parts/api/v1/parts/damage-options',
+ url: `${PARTS_BASE_URL}/damage-options`,
method: 'GET'
},
GetPartsOrQuestions: {
- url: '/parts/api/v1/parts/parts-or-questions',
+ url: `${PARTS_BASE_URL}/parts-or-questions`,
method: 'POST'
},
GetParts: {
- url: '/parts/api/v1/parts/parts',
+ url: `${PARTS_BASE_URL}/parts`,
method: 'POST'
},
GetInsurancePriceOrderItems: {
- url: '/price/api/v1/price/order-items-with-insurance-pricing',
+ url: `${PRICE_BASE_URL}/order-items-with-insurance-pricing`,
method: 'GET'
},
GetPriceOrderItems: {
- url: '/price/api/v1/price/order-items',
+ url: `${PRICE_BASE_URL}/order-items`,
method: 'GET'
},
GetProviders: {
- url: '/location/api/v1/location/providers',
+ url: `${LOCATION_BASE_URL}/providers`,
method: 'GET'
},
GetCapabilityQuestions: {
- url: '/parts/api/v1/parts/capability-questions',
+ url: `${PARTS_BASE_URL}/capability-questions`,
method: 'GET'
},
GetPartFromCapabilityAnswer: {
- url: '/parts/api/v1/parts/part-from-capability-answer',
+ url: `${PARTS_BASE_URL}/part-from-capability-answer`,
method: 'POST'
},
GetWipers: {
- url: '/parts/api/v1/parts/wipers',
+ url: `${PARTS_BASE_URL}/wipers`,
method: 'GET'
},
GetRainDefense: {
- url: '/parts/api/v1/parts/rain-defense',
+ url: `${PARTS_BASE_URL}/rain-defense`,
method: 'GET'
},
GetSupportingItems: {
- url: '/parts/api/v1/parts/supporting-items',
+ url: `${PARTS_BASE_URL}/supporting-items`,
method: 'POST'
},
GetMobileFeePart: {
- url: '/parts/api/v1/parts/mobile-fee',
+ url: `${PARTS_BASE_URL}/mobile-fee`,
method: 'GET'
},
GetServiceabilityDetails: {
- url: '/location/api/v1/location/serviceability-details',
+ url: `${LOCATION_BASE_URL}/serviceability-details`,
method: 'GET'
},
GetVehicle: {
- url: '/vehicle/api/v1/vehicle/lookup',
+ url: `${VEHICLE_BASE_URL}/lookup`,
method: 'GET'
},
GetAccountInfo: {
- url: '/account/api/v1/account/',
+ url: `${ACCOUNT_BASE_URL}/`,
method: 'GET'
},
LogExperimentExposureIfAssigned: {
- url: '/experiments/api/v1/experiments/log-exposure',
+ url: `${EXPERIMENTS_BASE_URL}/log-exposure`,
method: 'POST'
},
LogPageView: {
- url: '/analytics/api/v1/analytics/log-page-view',
+ url: `${ANALYTICS_BASE_URL}/log-page-view`,
method: 'POST'
},
LogCustomEvent: {
- url: '/analytics/api/v1/analytics/log-custom-event',
+ url: `${ANALYTICS_BASE_URL}/log-custom-event`,
method: 'POST'
},
LookupVehicleByVin: {
- url: '/vehicle/api/v1/vehicle/lookup',
+ url: `${VEHICLE_BASE_URL}/lookup`,
method: 'POST'
},
LookupVinByAddress: {
- url: '/vehicle/api/v1/vehicle/lookup-vin-by-address',
+ url: `${VEHICLE_BASE_URL}/lookup-vin-by-address`,
method: 'POST'
},
LookupVinByPlate: {
- url: '/vehicle/api/v1/vehicle/lookup-vin-by-plate',
+ url: `${VEHICLE_BASE_URL}/lookup-vin-by-plate`,
method: 'POST'
},
InitializeSession: {
- url: '/analytics/api/v1/analytics/initialize',
+ url: `${ANALYTICS_BASE_URL}/initialize`,
method: 'POST'
},
GetExperimentsByUser: {
- url: '/analytics/api/v1/analytics/get-experiments',
+ url: `${ANALYTICS_BASE_URL}/get-experiments`,
method: 'GET'
},
RunExperimentsForTrigger: {
- url: '/experiments/api/v1/experiments/run',
+ url: `${EXPERIMENTS_BASE_URL}/run`,
method: 'POST'
},
ValidateZip: {
- url: '/location/api/v1/location/zip',
+ url: `${LOCATION_BASE_URL}/zip`,
method: 'GET'
},
GooglePlaces: {
url: (apiKey) => `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=places`
},
ValidateClientTag: {
- url: '/clientauth/api/v1/clientauth/validate-client-tag',
+ url: `${CLIENT_AUTH_BASE_URL}/validate-client-tag`,
method: 'GET'
},
ValidateClientSignature: {
- url: '/clientauth/api/v1/clientauth/validate-client-signature',
+ url: `${CLIENT_AUTH_BASE_URL}/validate-client-signature`,
method: 'POST'
},
IsVinbyAddressPermissible: {
- url: '/vehicle/api/v1/vehicle/is-vin-by-address-permissible',
+ url: `${VEHICLE_BASE_URL}/is-vin-by-address-permissible`,
method: 'Get'
},
CoveragePolicyInfo: {
- url: '/coverage/api/v1/coverage/policy-information',
+ url: `${COVERAGE_BASE_URL}/policy-information`,
method: 'POST'
},
RegisterClaim: {
- url: '/coverage/api/v1/coverage/register-claim',
+ url: `${COVERAGE_BASE_URL}/register-claim`,
method: 'POST'
},
SaveSession: {
- url: '/order/api/v1/order/save-session/iss',
+ url: `${ORDER_BASE_URL}/save-session/iss`,
method: 'POST'
},
LoadSession: {
- url: '/order/api/v1/order/load-session',
+ url: `${ORDER_BASE_URL}/load-session/iss`,
method: 'POST'
},
DuplicateSearch: {
// eslint-disable-next-line max-len
- url: (accountNumber, policyNumber, dateOfLoss) => `/order/api/v1/order/duplicate-check/${accountNumber}/${policyNumber}/${dateOfLoss}`,
+ url: (accountNumber, policyNumber, dateOfLoss) => `${ORDER_BASE_URL}/duplicate-check/${accountNumber}/${policyNumber}/${dateOfLoss}`,
method: 'GET'
},
FinalDeductible: {
- url: '/coverage/api/v1/coverage/final-deductible',
+ url: `${COVERAGE_BASE_URL}/final-deductible`,
method: 'POST'
},
GetPaymentSignature: {
- url: '/order/api/v1/order/sign',
+ url: `${ORDER_BASE_URL}/sign`,
method: 'POST'
}
});
diff --git a/src/helpers/date-helper.js b/src/helpers/date-helper.js
index 1b062c85..be8161e8 100644
--- a/src/helpers/date-helper.js
+++ b/src/helpers/date-helper.js
@@ -72,3 +72,35 @@ export function sumDateString(dateString, daysToAdd) {
date.setDate(date.getDate() + daysToAdd);
return convertDateToDateString(date);
}
+
+export function get12HourTimeMobileFormat(time) {
+ // Check correct time format and split into components
+ let timeString = time.toString().match(/^([01]\d|2[0-3])(:)([0-5]\d)?$/) || [time];
+
+ if (timeString.length > 1) {
+ // If time format correct
+ const min = timeString[3];
+ timeString = timeString.slice(1); // Remove full string match value
+ if (Number(min) === 0) {
+ timeString = timeString.slice(0, 1); // Remove minute value
+ timeString[1] = +timeString[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
+ } else {
+ timeString[5] = +timeString[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
+ }
+ timeString[0] = +timeString[0] % 12 || 12; // Adjust hours
+ }
+ return timeString.join(''); // return adjusted time or original string
+}
+
+export function get12HourTimeFormat(time) {
+ // Check correct time format and split into components
+ let timeString = time.toString().match(/^([01]\d|2[0-3])(:)([0-5]\d)?$/) || [time];
+
+ if (timeString.length > 1) {
+ // If time format correct
+ timeString = timeString.slice(1); // Remove full string match value
+ timeString[5] = +timeString[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
+ timeString[0] = +timeString[0] % 12 || 12; // Adjust hours
+ }
+ return timeString.join(''); // return adjusted time or original string
+}
diff --git a/src/helpers/order-helper.js b/src/helpers/order-helper.js
index 0b89d8e5..85d0bec2 100644
--- a/src/helpers/order-helper.js
+++ b/src/helpers/order-helper.js
@@ -24,6 +24,8 @@ export async function saveSession({ shouldAwaitSaveSessionQueue = false }) {
*/
async function saveSessionHelper(store) {
const savedSessionInfo = await store.saveSession();
- store.setSaveSessionInfo(savedSessionInfo.data);
+ if (savedSessionInfo) {
+ store.setSaveSessionInfo(savedSessionInfo.data);
+ }
updateOrCreateISSCookie();
}
\ No newline at end of file
diff --git a/src/helpers/policy-vehicle-helper.js b/src/helpers/policy-vehicle-helper.js
new file mode 100644
index 00000000..69a80e74
--- /dev/null
+++ b/src/helpers/policy-vehicle-helper.js
@@ -0,0 +1,23 @@
+import endorsementOptions from '@/constants/endorsement-options';
+
+export function noCoverageForSelectedVehicle(vehicle) {
+ return (vehicle?.coverages?.length ?? 0) === 0;
+}
+export function deductibleForSelectedVehicle(vehicle) {
+ if (!vehicle) {
+ return undefined;
+ }
+
+ return vehicle.coverages?.length ?? false
+ ? vehicle?.coverages[0].deductible
+ : 0;
+}
+export function endorsementsForSelectedVehicle(vehicle) {
+ if (vehicle?.endorsements?.length > 0) {
+ return vehicle.endorsements;
+ }
+ return [];
+}
+export function repairWaivedForSelectedVehicle(vehicle) {
+ return vehicle?.endorsements?.includes(endorsementOptions.REPAIR_WAIVED) ?? false;
+}
diff --git a/src/helpers/policy-vehicle-helper.spec.js b/src/helpers/policy-vehicle-helper.spec.js
new file mode 100644
index 00000000..be3411b3
--- /dev/null
+++ b/src/helpers/policy-vehicle-helper.spec.js
@@ -0,0 +1,205 @@
+import {
+ deductibleForSelectedVehicle,
+ endorsementsForSelectedVehicle,
+ noCoverageForSelectedVehicle,
+ repairWaivedForSelectedVehicle
+} from '@/helpers/policy-vehicle-helper';
+import { getRandomInt, getRandomString } from '@/helpers/data-generation';
+import endorsementOptions from '@/constants/endorsement-options';
+
+describe('policy vehicle helper', () => {
+ describe('noCoverageForSelectedVehicle function', () => {
+ it('Null vehicle => returns true', async () => {
+ // Arrange
+ const vehicle = null;
+
+ // Act
+ const result = noCoverageForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeTruthy();
+ });
+
+ it('Empty vehicle coverages list => returns true', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ coverages: []
+ };
+
+ // Act
+ const result = noCoverageForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeTruthy();
+ });
+
+ it('Non-empty vehicle coverages list => returns false', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ coverages: [
+ {
+ deductible: 0
+ }
+ ]
+ };
+
+ // Act
+ const result = deductibleForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeFalsy();
+ });
+ });
+
+ describe('deductibleForSelectedVehicle function', () => {
+ it('Null vehicle => returns undefined', async () => {
+ // Arrange
+ const vehicle = null;
+
+ // Act
+ const result = deductibleForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBe(undefined);
+ });
+
+ it('Vehicle match with empty coverages list => 0 returned', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ coverages: []
+ };
+
+ // Act
+ const result = deductibleForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBe(0);
+ });
+
+ it('Coverages list non empty => deductible from first coverage returned', async () => {
+ // Arrange
+ const firstDeductible = getRandomInt(1, 1000);
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ coverages: [
+ {
+ deductible: firstDeductible
+ },
+ {
+ deductible: getRandomInt(1, 1000)
+ }
+ ]
+ };
+
+ // Act
+ const result = deductibleForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBe(firstDeductible);
+ });
+ });
+
+ describe('repairWaivedForSelectedVehicle function', () => {
+ it('Null vehicle => returns false', async () => {
+ // Arrange
+ const vehicle = null;
+
+ // Act
+ const result = repairWaivedForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeFalsy();
+ });
+
+ it('Endorsements list empty => false returned', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ endorsements: []
+ };
+
+ // Act
+ const result = repairWaivedForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeFalsy();
+ });
+
+ it('Endorsements list non-empty, not containing repair waived => false returned', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ endorsements: [endorsementOptions.EDUCATOR, endorsementOptions.PARKING_GUARD]
+ };
+
+ // Act
+ const result = repairWaivedForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeFalsy();
+ });
+
+ it('Endorsements list contains repair waived => true returned', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ endorsements: [
+ endorsementOptions.EDUCATOR,
+ endorsementOptions.REPAIR_WAIVED,
+ endorsementOptions.PARKING_GUARD
+ ]
+ };
+
+ // Act
+ const result = repairWaivedForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toBeTruthy();
+ });
+ });
+
+ describe('endorsementsForSelectedVehicle function', () => {
+ it('Null vehicle => returns empty array', async () => {
+ // Arrange
+ const vehicle = null;
+
+ // Act
+ const result = endorsementsForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toStrictEqual([]);
+ });
+
+ it('Null endorsements => returns empty array', async () => {
+ // Arrange
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ endorsements: null
+ };
+
+ // Act
+ const result = endorsementsForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toStrictEqual([]);
+ });
+
+ it('Endorsements list non-empty, not containing repair waived => false returned', async () => {
+ // Arrange
+ const endorsements = [endorsementOptions.EDUCATOR, endorsementOptions.PARKING_GUARD];
+ const vehicle = {
+ vin: getRandomString(17, 17),
+ endorsements
+ };
+
+ // Act
+ const result = endorsementsForSelectedVehicle(vehicle);
+
+ // Assert
+ expect(result).toStrictEqual(endorsements);
+ });
+ });
+});
diff --git a/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap b/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap
new file mode 100644
index 00000000..f0fe9808
--- /dev/null
+++ b/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap
@@ -0,0 +1,11 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`cart-dropdown component initial data rendered as expected 1`] = `
+Object {
+ "currencyFormatter": NumberFormat {},
+ "isExpanded": false,
+ "widget": Object {
+ "amountDue": "AmountDueTextWidget",
+ },
+}
+`;
diff --git a/src/iss-components/cart-dropdown/cart-dropdown.spec.js b/src/iss-components/cart-dropdown/cart-dropdown.spec.js
new file mode 100644
index 00000000..e55bdc36
--- /dev/null
+++ b/src/iss-components/cart-dropdown/cart-dropdown.spec.js
@@ -0,0 +1,159 @@
+import { shallowMount } from '@vue/test-utils';
+import { createTestingPinia } from '@pinia/testing';
+import cartDropdown from '@/iss-components/cart-dropdown/cart-dropdown.vue';
+
+// Supporting Files
+import { getMountOptions } from '@/helpers/unit-test-helper.js';
+import { useMainStore } from '@/store';
+
+function getMountedComponent(mainInitialState = {}, initialData = {}, propsData = {}) {
+ const mountOptions = getMountOptions({
+ router: {
+ navigate: jest.fn()
+ }
+ });
+
+ const testingPinia = createTestingPinia({
+ initialState: {
+ main: mainInitialState
+ }
+ });
+ useMainStore(testingPinia);
+
+ mountOptions.global.plugins = [testingPinia];
+ mountOptions.data = () => (initialData);
+ mountOptions.propsData = propsData;
+
+ const wrapper = shallowMount(cartDropdown, mountOptions);
+ wrapper.vm.getCmsContent = jest.fn().mockImplementation(() => {});
+ wrapper.vm.setCmsContent = jest.fn();
+ return { wrapper };
+}
+
+describe('cart-dropdown component', () => {
+ test('initial data rendered as expected', () => {
+ // Arrange
+ const { wrapper } = getMountedComponent();
+
+ // Assert
+ expect(wrapper.vm.$data).toMatchSnapshot();
+ });
+ describe('displays', () => {
+ test('cart dropdown head', () => {
+ // Arrange
+ const reference = '#cart-dropdown-head';
+ const { wrapper } = getMountedComponent(cartDropdown);
+
+ // Act
+ const head = wrapper.find(reference);
+
+ // Assert
+ expect(head.exists()).toBeTruthy();
+ });
+ test('cart table', () => {
+ // Arrange
+ const reference = '#cart-table';
+ const isExpanded = true;
+ const initialData = { isExpanded };
+ const { wrapper } = getMountedComponent(cartDropdown, {}, initialData);
+
+ // Act
+ const cartTable = wrapper.find(reference);
+
+ // Assert
+ expect(cartTable.exists()).toBeTruthy();
+ });
+ });
+ describe('computed', () => {
+ test.each([
+ [true, true],
+ [false, false],
+ [false, null]
+ ])('isVerified returns %p when isVerified store value is %p', (expected, isVerified) => {
+ // Arrange
+ const storeData = {
+ order: {
+ payment: {
+ insuranceCoverage: { isVerified }
+ }
+ }
+ };
+ const { wrapper } = getMountedComponent(storeData);
+
+ // Act
+ const result = wrapper.vm.isVerified;
+
+ // Assert
+ expect(result).toBe(expected);
+ });
+ describe('amountDueDisplayed', () => {
+ test('returns verifying coverage text when isVerified false', () => {
+ // Arrange
+ const VERIFYING_COVERAGE = 'Verifying coverage';
+ const storeData = {
+ order: {
+ payment: {
+ insuranceCoverage: {
+ isVerified: false
+ }
+ }
+ }
+ };
+ const { wrapper } = getMountedComponent(storeData);
+
+ // Act
+ const result = wrapper.vm.amountDueDisplayed;
+
+ // Assert
+ expect(result).toBe(VERIFYING_COVERAGE);
+ });
+ test('returns formatted amount due when isVerified false', () => {
+ // TODO finish when methods done
+ });
+ });
+ describe('amountDue', () => {
+ test('returns 0 when showAsPaid is true', () => {
+ // Arrange
+ const propsData = {
+ showAsPaid: true
+ };
+ const { wrapper } = getMountedComponent({}, {}, propsData);
+
+ // Act
+ const result = wrapper.vm.amountDue;
+
+ // Assert
+ expect(result).toBe(0);
+ });
+ test('returns sum of subTotal and salesTax when showAsPaid is false', () => {
+ // TODO when subTotal and salesTax are finished
+ });
+ });
+ describe('subTotal', () => {
+ // TODO when method implemented
+ });
+ describe('salesTax', () => {
+ // TODO when method implemented
+ });
+ });
+ describe('method', () => {
+ test.each([
+ ['$0.00', 0],
+ ['$12.00', 12],
+ ['$12.30', 12.3],
+ ['$12.34', 12.34],
+ ['$12.35', 12.345],
+ ['$12.34', 12.344],
+ ['-$1.00', -1]
+ ])('get FormattedAmount returns `%` when amount %', (expected, amount) => {
+ // Arrange
+ const { wrapper } = getMountedComponent();
+
+ // Act
+ const result = wrapper.vm.getFormattedAmount(amount);
+
+ // Assert
+ expect(result).toBe(expected);
+ });
+ });
+});
diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue
new file mode 100644
index 00000000..9ebfa58d
--- /dev/null
+++ b/src/iss-components/cart-dropdown/cart-dropdown.vue
@@ -0,0 +1,131 @@
+
+
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'
+ },
+ serviceLocation: {
+ provider: {
+ address: {
+ streetAddress: '123 Safelite Street',
+ city: 'Mesa',
+ state: 'AZ',
+ zipCode: '12345'
+ }
+ },
+ appointmentType: 'Drop Off'
+ }
+ }
+ };
+ const { wrapper } = getMountedComponent(testStore);
+
+ // Act
+ const testValue = wrapper.vm.appointmentWordingText;
+
+ // Assert
+ 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);
+
+ // Act
+ const testValue = wrapper.vm.appointmentWordingText;
+
+ // Assert
+ expect(testValue).toEqual('wording Text
123 Safelite Street,
Mesa, AZ 12345
');
+ });
+ test('serviceLocationFullAddress should return text in expected format', () => {
+ // Arrange
+ const { wrapper } = getMountedComponent(initialStore);
+
+ // Act
+ const testValue = wrapper.vm.serviceLocationFullAddress;
+
+ // Assert
+ expect(testValue).toEqual('
123 Test Way, #1,
Mesa, AZ 12345
');
+ });
+ test('providerFullAddress should return text in expected format', () => {
+ // Arrange
+ const { wrapper } = getMountedComponent(initialStore);
+
+ // Act
+ const testValue = wrapper.vm.providerFullAddress;
+
+ // Assert
+ expect(testValue).toEqual('
123 Safelite Street,
Mesa, AZ 12345
');
+ });
+ });
});
diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue
index cd06c4f1..38f2dc9e 100644
--- a/src/layouts/order-confirmation/order-confirmation.vue
+++ b/src/layouts/order-confirmation/order-confirmation.vue
@@ -6,15 +6,35 @@
@invalidSubmit="onInvalidSubmit">
Placeholder for order confirmation page
+{{ appointmentDateFormatted }}
+{{ appointmentTimeFormatted }}
+