prettier
This commit is contained in:
parent
bc71ee589e
commit
c6a15910c1
1 changed files with 36 additions and 36 deletions
|
|
@ -265,47 +265,47 @@ describe("cart.vue", () => {
|
||||||
|
|
||||||
// Mobile Fee Cart Item
|
// Mobile Fee Cart Item
|
||||||
test("if there is mobile fee on the order, a mobile fee cart item should be added to the cart", () => {
|
test("if there is mobile fee on the order, a mobile fee cart item should be added to the cart", () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const lineItems = {
|
const lineItems = {
|
||||||
glassParts: [],
|
glassParts: [],
|
||||||
supportingItems: [
|
supportingItems: [
|
||||||
{
|
{
|
||||||
description: null,
|
description: null,
|
||||||
id: "9ff98501-03a4-432b-884e-e4e28f884a2f",
|
id: "9ff98501-03a4-432b-884e-e4e28f884a2f",
|
||||||
kitPrice: 0,
|
kitPrice: 0,
|
||||||
laborAmount: 34.98,
|
laborAmount: 34.98,
|
||||||
partNumber: "MOBILE FEE",
|
partNumber: "MOBILE FEE",
|
||||||
partType: "MOBILE FEE",
|
partType: "MOBILE FEE",
|
||||||
salesTax: 2.62,
|
salesTax: 2.62,
|
||||||
sellingPrice: 0,
|
sellingPrice: 0,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
vaps: [],
|
||||||
|
promos: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
const availableVaps = [];
|
||||||
|
|
||||||
|
// Act
|
||||||
|
const { wrapper } = setupMocks({
|
||||||
|
props: {
|
||||||
|
modelValue: lineItems,
|
||||||
|
availableVaps: availableVaps,
|
||||||
},
|
},
|
||||||
],
|
});
|
||||||
vaps: [],
|
|
||||||
promos: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
const availableVaps = [];
|
// Assert
|
||||||
|
expect(wrapper.vm.mobileFeeCartItem).not.toBeNull();
|
||||||
|
expect(wrapper.vm.mobileFeeCartItem.subTotal).toEqual(34.98);
|
||||||
|
expect(wrapper.vm.mobileFeeCartItem.salesTax).toEqual(2.62);
|
||||||
|
|
||||||
// Act
|
const found =
|
||||||
const { wrapper } = setupMocks({
|
wrapper.vm.cartItems.findIndex(
|
||||||
props: {
|
(cartItem) => cartItem == wrapper.vm.mobileFeeCartItem
|
||||||
modelValue: lineItems,
|
) >= 0;
|
||||||
availableVaps: availableVaps,
|
expect(found).toBe(true);
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(wrapper.vm.mobileFeeCartItem).not.toBeNull();
|
|
||||||
expect(wrapper.vm.mobileFeeCartItem.subTotal).toEqual(34.98);
|
|
||||||
expect(wrapper.vm.mobileFeeCartItem.salesTax).toEqual(2.62);
|
|
||||||
|
|
||||||
const found =
|
|
||||||
wrapper.vm.cartItems.findIndex(
|
|
||||||
(cartItem) => cartItem == wrapper.vm.mobileFeeCartItem
|
|
||||||
) >= 0;
|
|
||||||
expect(found).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Service package discount Fee Cart Item
|
// Service package discount Fee Cart Item
|
||||||
test("if there is service package discount fee on the order, a service package discount cart item should be added to the cart", () => {
|
test("if there is service package discount fee on the order, a service package discount cart item should be added to the cart", () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue