Prettified
This commit is contained in:
parent
49d6eb3a72
commit
192db1177b
4 changed files with 19 additions and 25 deletions
|
|
@ -51,7 +51,7 @@ describe("object-cloning-helper.js", () => {
|
|||
|
||||
const array = [9, 8, 7, 6, 5, 4, 3, 2, 1];
|
||||
|
||||
const expected = [9, 8, 7, 6, 5, 4, 3, 2, 1];;
|
||||
const expected = [9, 8, 7, 6, 5, 4, 3, 2, 1];
|
||||
|
||||
// Act
|
||||
const result = deepClone(array);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ import { storeActions } from "@/constants/store-actions";
|
|||
const mockStoreActionGetMobileFeePart = storeActions.GET_MOBILE_FEE_PART;
|
||||
const mockStoreActionPriceOrderItemsAndSaveServerData =
|
||||
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA;
|
||||
const mockStoreActionGetServiceabilityDetails =
|
||||
storeActions.GET_SERVICEABILITY_DETAILS;
|
||||
const mockStoreActionGetServiceabilityDetails = storeActions.GET_SERVICEABILITY_DETAILS;
|
||||
|
||||
jest.mock("@/mixins/base-mixin.js", () => ({
|
||||
methods: {
|
||||
|
|
@ -44,14 +43,12 @@ jest.mock("@/mixins/base-mixin.js", () => ({
|
|||
}
|
||||
|
||||
if (actionName === mockStoreActionGetServiceabilityDetails) {
|
||||
return Promise.resolve(
|
||||
{
|
||||
isGlassServiceableInshop: true,
|
||||
isRecalibrationServiceableInshop: true,
|
||||
isGlassServiceableMobile: true,
|
||||
isRecalibrationServiceableMobile: true
|
||||
},
|
||||
);
|
||||
return Promise.resolve({
|
||||
isGlassServiceableInshop: true,
|
||||
isRecalibrationServiceableInshop: true,
|
||||
isGlassServiceableMobile: true,
|
||||
isRecalibrationServiceableMobile: true,
|
||||
});
|
||||
}
|
||||
}),
|
||||
},
|
||||
|
|
@ -66,7 +63,7 @@ describe("service-location-helper.js", () => {
|
|||
const parentAccountNumber = 167132;
|
||||
const billToAccountNumber = 1234;
|
||||
const expected = null;
|
||||
|
||||
|
||||
// Act
|
||||
const result = await getPricedMobileFeePart(
|
||||
serviceZipCode,
|
||||
|
|
@ -74,18 +71,18 @@ describe("service-location-helper.js", () => {
|
|||
parentAccountNumber,
|
||||
billToAccountNumber
|
||||
);
|
||||
|
||||
|
||||
// Assert
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
||||
|
||||
it("Should return the priced mobile fee part", async () => {
|
||||
// Arrange
|
||||
const serviceZipCode = "43235";
|
||||
const damageType = "Replace";
|
||||
const parentAccountNumber = 167132;
|
||||
const billToAccountNumber = 1234;
|
||||
|
||||
|
||||
const expected = {
|
||||
partNumber: "MOBILE FEE",
|
||||
description: "MOBILE FEE",
|
||||
|
|
@ -94,7 +91,7 @@ describe("service-location-helper.js", () => {
|
|||
sellingPrice: 0,
|
||||
kitPrice: 0,
|
||||
};
|
||||
|
||||
|
||||
// Act
|
||||
const result = await getPricedMobileFeePart(
|
||||
serviceZipCode,
|
||||
|
|
@ -102,7 +99,7 @@ describe("service-location-helper.js", () => {
|
|||
parentAccountNumber,
|
||||
billToAccountNumber
|
||||
);
|
||||
|
||||
|
||||
// Assert
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
|
|
@ -112,20 +109,19 @@ describe("service-location-helper.js", () => {
|
|||
it("Should return the serviceability details", async () => {
|
||||
// Arrange
|
||||
const serviceZipCode = "43235";
|
||||
|
||||
|
||||
const expected = {
|
||||
isGlassServiceableInshop: true,
|
||||
isRecalibrationServiceableInshop: true,
|
||||
isGlassServiceableMobile: true,
|
||||
isRecalibrationServiceableMobile: true
|
||||
isRecalibrationServiceableMobile: true,
|
||||
};
|
||||
|
||||
|
||||
// Act
|
||||
const result = await getServiceabilityDetails(serviceZipCode);
|
||||
|
||||
|
||||
// Assert
|
||||
expect(result).toEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -540,7 +540,6 @@ describe("service-location.vue", () => {
|
|||
// Assert
|
||||
expect(wrapper.vm.selectedAppointmentType).toStrictEqual("Mobile");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe("serviceability logic", () => {
|
||||
|
|
|
|||
|
|
@ -486,7 +486,6 @@ describe("shop-question.vue", () => {
|
|||
// Assert
|
||||
expect(wrapper.vm.answers.length).toEqual(3);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue