diff --git a/src/common-components/vehicle-banner/vehicle-banner.spec.js b/src/common-components/vehicle-banner/vehicle-banner.spec.js
index 316c9225d..aab2aa3e0 100644
--- a/src/common-components/vehicle-banner/vehicle-banner.spec.js
+++ b/src/common-components/vehicle-banner/vehicle-banner.spec.js
@@ -1,144 +1,21 @@
import { shallowMount } from '@vue/test-utils';
import vehicleBanner from './vehicle-banner';
-import { getMountOptions } from "@/helpers/unit-test-helper.js";
-import { storeActions } from "@/constants/store-actions";
-import { nextTick } from 'vue';
describe('vehicleBanner', () => {
- const $store = {
- state: {
- order: {
- vehicle: {
- vin: null,
- year: null,
- make: null,
- model: null,
- style: null
- }
- }
- }
- };
- const actionList = {
- actionList: [
- {
- actionName: storeActions.LOOKUP_VEHICLE_BY_YMMS,
- data: [
- {
- CarId: "CR00068434"
- }
- ]
- },
- {
- actionName: storeActions.LOOKUP_VEHICLE_BY_VIN,
- data: [
- {
- CarId: "CR00068434"
- }
- ]
- },
- {
- actionName: storeActions.GET_EVOX_IMAGE,
- data: {
- imgSrc: "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg"
- }
- }
- ]
- };
- test('renders the blurrycar image when vehicleImageSrc is not present', () => {
+ test('renders the blurrycar image', () => {
// Arrange
- const mountOptions = getMountOptions(actionList);
- mountOptions.global.mocks = {
- ...mountOptions.global.mocks,
- $store
- }
+
// Act
const wrapper = shallowMount(vehicleBanner, {
- ...mountOptions
+ propsData: {
+ vehicleImageSrc: "image_url",
+ },
});
+
// Assert
expect(wrapper.find('img').attributes('class')).toContain('blurrycar');
wrapper.unmount();
});
- test('does not render the blurrycar image when vehicleImageSrc exists', () => {
- // Arrange
- const mountOptions = getMountOptions(actionList);
- mountOptions.global.mocks = {
- ...mountOptions.global.mocks,
- $store
- }
- // Act
- const wrapper = shallowMount(vehicleBanner, {
- ...mountOptions,
- data() {
- return {
- vehicleImageSrc: "https://s3.amazonaws.com/safelite-lab-vehicle-images/Evox/8963_cc0320_032_UG_white_2014_Ford_Focus_18029225538399034889.jpg"
- }
- }
- });
- // Assert
- expect(wrapper.find('img').attributes('class')).not.toContain('blurrycar');
- wrapper.unmount();
- });
-
- test('does not render the blurrycar image when passedCarId is set', async () => {
- // Arrange
- const mountOptions = getMountOptions(actionList);
- mountOptions.global.mocks = {
- ...mountOptions.global.mocks,
- $store,
- }
- // Act
- const wrapper = shallowMount(vehicleBanner, {
- ...mountOptions,
- props: {
- passedCarId: "CR00068434"
- }
- });
- // Assert
- await nextTick();
- expect(wrapper.find('img').attributes('class')).not.toContain('blurrycar');
- wrapper.unmount();
- });
-
- test('receives a carId when a YMMS object is found', async () => {
- // Arrange
- $store.state.order.vehicle.year = "2019"
- $store.state.order.vehicle.make = "acura"
- $store.state.order.vehicle.model = "rdx"
- $store.state.order.vehicle.style = "4 door utility"
- const mountOptions = getMountOptions(actionList);
- mountOptions.global.mocks = {
- ...mountOptions.global.mocks,
- $store
- }
- // Act
- const wrapper = shallowMount(vehicleBanner, {
- ...mountOptions
- });
- // Assert
- await nextTick();
- expect(wrapper.vm.$data.carId.length).toBeGreaterThan(0);
- wrapper.unmount();
- });
-
- test('receives a carId when a VIN is found', async () => {
- // Arrange
- $store.state.order.vehicle.vin = "1J4GW58S4XC541166";
- const mountOptions = getMountOptions(actionList);
- mountOptions.global.mocks = {
- ...mountOptions.global.mocks,
- $store
- }
- // Act
- const wrapper = shallowMount(vehicleBanner, {
- ...mountOptions
- });
- // Assert
- await nextTick();
- expect(wrapper.vm.$data.carId.length).toBeGreaterThan(0);
- wrapper.unmount();
- });
-
});
diff --git a/src/common-components/vehicle-banner/vehicle-banner.vue b/src/common-components/vehicle-banner/vehicle-banner.vue
index 36642288d..f259390ee 100644
--- a/src/common-components/vehicle-banner/vehicle-banner.vue
+++ b/src/common-components/vehicle-banner/vehicle-banner.vue
@@ -1,16 +1,9 @@
-
@@ -18,60 +11,12 @@
diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue
index 45768db57..b99b23d81 100644
--- a/src/layouts/component-test/component-test.vue
+++ b/src/layouts/component-test/component-test.vue
@@ -155,11 +155,11 @@
-
+
-
Multi-Line Centered
+
Multi-Line Centered
diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue
index 8c775e843..51d1ee98d 100644
--- a/src/layouts/vehicle-year/vehicle-year.vue
+++ b/src/layouts/vehicle-year/vehicle-year.vue
@@ -1,7 +1,7 @@
-
+
diff --git a/src/ux-components/button-primary/button-primary.vue b/src/ux-components/button-primary/button-primary.vue
index 7da10a107..e2aaea4b3 100644
--- a/src/ux-components/button-primary/button-primary.vue
+++ b/src/ux-components/button-primary/button-primary.vue
@@ -24,7 +24,7 @@ export default {
isDisabled: Boolean,
loaderColor: String,
loaderPosition: String,
- sizeInRem: Number
+ sizeInRem: [Number,String]
},
data() {
return {
diff --git a/src/ux-components/button-secondary/button-secondary.vue b/src/ux-components/button-secondary/button-secondary.vue
index ddbde2a7d..f6dd62631 100644
--- a/src/ux-components/button-secondary/button-secondary.vue
+++ b/src/ux-components/button-secondary/button-secondary.vue
@@ -24,7 +24,7 @@ export default {
isDisabled: Boolean,
loaderColor: String,
loaderPosition: String,
- sizeInRem: Number
+ sizeInRem: [Number,String]
},
data() {
return {
diff --git a/src/ux-components/list-button/list-button.vue b/src/ux-components/list-button/list-button.vue
index 6937ea93c..303ccdf2a 100644
--- a/src/ux-components/list-button/list-button.vue
+++ b/src/ux-components/list-button/list-button.vue
@@ -4,7 +4,6 @@
class="btn list-button d-flex align-items-center justify-content-between py-3 px-4"
@click='displayComponent'
v-bind:class="[
- this.isLoading ? 'button-loader' : 'not-loading',
this.isError ? 'error' : '',
]"
>
@@ -28,7 +27,7 @@ export default {
errorText: String,
loaderColor: String,
loaderPosition: String,
- sizeInRem: Number
+ sizeInRem: [Number,String]
},
data() {
return {
diff --git a/src/ux-components/radio-horizontal/radio-horizontal.spec.js b/src/ux-components/radio-horizontal/radio-horizontal.spec.js
index ec12ce7ea..0a926c912 100644
--- a/src/ux-components/radio-horizontal/radio-horizontal.spec.js
+++ b/src/ux-components/radio-horizontal/radio-horizontal.spec.js
@@ -27,6 +27,7 @@ describe("radio.vue", () => {
type: "radio",
value: "2023",
name: "TestGroup",
+ "aria-required": "true"
});
expect(label.attributes()).toEqual({
diff --git a/src/ux-components/radio-horizontal/radio-horizontal.vue b/src/ux-components/radio-horizontal/radio-horizontal.vue
index 41fea15b3..d1c95a440 100644
--- a/src/ux-components/radio-horizontal/radio-horizontal.vue
+++ b/src/ux-components/radio-horizontal/radio-horizontal.vue
@@ -1,7 +1,15 @@
+
+
+
+
+
+
+
+
-
-