From 1b2935ebacededcf79bf6479f9efd2c4fc0966c6 Mon Sep 17 00:00:00 2001 From: Michaela Brydon Date: Thu, 14 Mar 2024 12:56:14 -0400 Subject: [PATCH] Cleaning up styling --- .../cart-dropdown/cart-dropdown.spec.js | 52 +++++++ .../cart-dropdown/cart-dropdown.vue | 131 ++++++++++++------ src/styles/ux-variables.scss | 1 + 3 files changed, 139 insertions(+), 45 deletions(-) diff --git a/src/iss-components/cart-dropdown/cart-dropdown.spec.js b/src/iss-components/cart-dropdown/cart-dropdown.spec.js index 16a35951..8ef2cd50 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.spec.js +++ b/src/iss-components/cart-dropdown/cart-dropdown.spec.js @@ -121,6 +121,58 @@ describe('cart-dropdown component', () => { // Assert expect(cartBasePrice.exists()).toBeTruthy(); }); + test('cart footer', () => { + // Arrange + const reference = '#cart-footer'; + const isExpanded = true; + const initialData = { isExpanded }; + const { wrapper } = getMountedComponent({}, {}, initialData); + + // Act + const cartFooter = wrapper.find(reference); + + // Assert + expect(cartFooter.exists()).toBeTruthy(); + }); + test('subtotal', () => { + // Arrange + const reference = '#cart-subtotal'; + const isExpanded = true; + const initialData = { isExpanded }; + const { wrapper } = getMountedComponent({}, {}, initialData); + + // Act + const subtotal = wrapper.find(reference); + + // Assert + expect(subtotal.exists()).toBeTruthy(); + }); + test('tax', () => { + // Arrange + const reference = '#cart-sales-tax'; + const isExpanded = true; + const initialData = { isExpanded }; + const { wrapper } = getMountedComponent({}, {}, initialData); + + // Act + const salesTax = wrapper.find(reference); + + // Assert + expect(salesTax.exists()).toBeTruthy(); + }); + test('bottom amount due', () => { + // Arrange + const reference = '#bottom-amount-due'; + const isExpanded = true; + const initialData = { isExpanded }; + const { wrapper } = getMountedComponent({}, {}, initialData); + + // Act + const bottomAmountDue = wrapper.find(reference); + + // Assert + expect(bottomAmountDue.exists()).toBeTruthy(); + }); }); describe('does not display', () => { test('cart deductible when showDeductibleLineItem is false', () => { diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue index f636e511..e1a8cb59 100644 --- a/src/iss-components/cart-dropdown/cart-dropdown.vue +++ b/src/iss-components/cart-dropdown/cart-dropdown.vue @@ -1,5 +1,5 @@