diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js index b23f5c101..bf5751637 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js +++ b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js @@ -525,7 +525,6 @@ describe("license-plate-lookup.vue", () => { }); const registrationZip = "12345"; const serviceZip = "12345"; - console.log("this is the test I care about"); wrapper.vm.navigateForward = jest.fn(); const vinLookup = { data: { vehicle: { carId: "TESTID1" } } }; diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 5fdf261f8..db8f0ab30 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -75,7 +75,6 @@ v-model="providerNumber" :serviceZipCode="zipCode" :selectedAppointmentType="selectedAppointmentType" - :shopQuestionData="shopQuestionInitialData" cmsWidgetName="ShopQuestionWidget" /> @@ -296,12 +295,6 @@ export default { displayNoShopsAlert() { return !this.isServiceableInshop && !this.isServiceableMobile; }, - isDropoff() { - return this.selectedAppointmentType === "Dropoff"; - }, - isMobile() { - return this.selectedAppointmentType === "Mobile"; - }, }, methods: { arePagePrerequisitesValid() { diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 7f67737fa..8b26dfee6 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -12,6 +12,7 @@ jest.mock("@/mixins/base-mixin", () => ({ }); } }, + scrollToPageBottom() {}, }, })); diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 2610fd787..cbe022d5e 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -59,7 +59,6 @@ export default { return { shops: [], shopListButton: shopListButton, - availability: "high", answers: [], shopIndex: 0, displaySeeMoreLocationsLink: false, @@ -102,10 +101,10 @@ export default { }, async getNextShopsFromList(numberToGet = 3) { const shopIterator = (array, n) => { - let l = array.length; + const l = array.length; return () => { - var end = this.shopIndex + n; - var part = array.slice(this.shopIndex, end); + const end = this.shopIndex + n; + const part = array.slice(this.shopIndex, end); this.shopIndex = end < l ? end : this.shops.length; return part; }; @@ -120,7 +119,6 @@ export default { buttonLabel: shop.city, buttonLabelSubCopy: `${shop.distance} mi`, buttonBodyCopy: `${shop.streetAddress}, ${shop.city}, ${shop.state} ${shop.zipCode}`, - //buttonAuxillaryCopy: `foo`, }; }); @@ -142,7 +140,7 @@ export default { await this.$nextTick(); - this.scrollToBottom(); + this.scrollToPageBottom(); }, resetShopList() { this.answers = []; @@ -150,10 +148,6 @@ export default { this.selectedValue = ""; this.$refs.buttonQuestion.resetField(); }, - scrollToBottom() { - const container = document.getElementsByClassName("page-container-grouped-styles")[0]; - container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); - }, async reloadShopData(serviceZipCode) { const result = await this.loadInitialData(serviceZipCode); this.initializeComponent(result.data); @@ -176,7 +170,7 @@ export default { await this.$nextTick(); - this.scrollToBottom(); + this.scrollToPageBottom(); }, }, shops: { diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 43ce4c132..488500639 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -99,6 +99,14 @@ export default { getTotalLineItemPrice(lineItem) { return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice; }, + scrollToPageTop() { + const container = document.getElementsByClassName("page-container-grouped-styles")[0]; + container.scrollTo({ top: 0, left: 0, behavior: "smooth" }); + }, + scrollToPageBottom() { + const container = document.getElementsByClassName("page-container-grouped-styles")[0]; + container.scrollTo({ top: container.scrollHeight, left: 0, behavior: "smooth" }); + }, }, computed: { storeActions() {