From 5cbba40bb173f49aa136bbb13a2d946344447a51 Mon Sep 17 00:00:00 2001 From: DavidAtSafelite Date: Thu, 24 Aug 2023 07:43:10 -0400 Subject: [PATCH] Linting for the last of the layout pages, mixins and prefer default for navigation-scenarios. --- src/helpers/unit-test-helper.js | 2 +- .../address-lookup/address-lookup.spec.js | 2 +- .../contact-details/contact-details.spec.js | 2 +- .../coverage-statement.spec.js | 2 +- .../coverage-statement/coverage-statement.vue | 2 +- .../license-plate-lookup.spec.js | 2 +- .../policy-holder-details.spec.js | 2 +- .../policy-vehicles/policy-vehicles.spec.js | 2 +- .../provider-preference.spec.js | 2 +- .../tpa-confirmation/tpa-confirmation.vue | 9 +- src/layouts/tpa-search/tpa-search.vue | 8 +- src/layouts/tpa-submit/tpa-submit.vue | 9 +- .../damage-location-question.spec.js | 71 +++---- .../damage-location-question.vue | 2 +- .../replace-options-question.spec.js | 130 ++++++------- .../replace-options-question.vue | 2 +- .../side-door-options.spec.js | 174 +++++++++--------- .../side-door-options/side-door-options.vue | 4 +- .../vehicle-damage/vehicle-damage.spec.js | 2 +- src/layouts/vehicle-damage/vehicle-damage.vue | 29 ++- .../windshield-chip-count-question.spec.js | 46 ++--- .../windshield-chip-count-question.vue | 2 +- .../windshield-damage-type-question.spec.js | 36 ++-- .../windshield-damage-type-question.vue | 2 +- .../windshield-options/windshield-options.vue | 12 +- .../vehicle-lookup/vehicle-lookup.spec.js | 4 +- src/layouts/vehicle-lookup/vehicle-lookup.vue | 39 ++-- .../vin-lookup-methods/vin-lookup-methods.vue | 2 +- .../glass-part-question.spec.js | 59 +++--- .../glass-part-question.vue | 5 +- .../vehicle-parts/vehicle-parts.spec.js | 106 ++++++----- src/layouts/vehicle-parts/vehicle-parts.vue | 11 +- .../vehicle-question/vehicle-question.vue | 2 +- .../vehicle-selection/vehicle-selection.vue | 22 +-- .../vin-location-information.vue | 2 +- .../perfect-match-alert.vue | 2 +- .../two-identical-ymm-vehicle-alert.vue | 2 +- .../vehicle-not-found-alert.vue | 2 +- .../vehicle-not-matched-alert.vue | 2 +- .../vin-lookup-alerts.spec.js | 2 +- .../vin-lookup-alerts/vin-lookup-alerts.vue | 8 +- src/layouts/vin-lookup/vin-lookup.spec.js | 52 +++--- src/layouts/vin-lookup/vin-lookup.vue | 5 +- .../vin-lookup/vin-question/vin-question.vue | 2 +- src/layouts/welcome-page/welcome-page.spec.js | 2 +- src/layouts/welcome-page/welcome-page.vue | 59 +++--- src/mixins/analytics-mixin.js | 29 ++- src/mixins/analytics-mixin.spec.js | 3 +- src/mixins/base-form-mixin.js | 17 +- src/mixins/base-mixin.js | 2 +- src/mixins/experiment-mixin.spec.js | 67 +++---- src/mixins/vehicle-questions-mixin.js | 15 +- src/mixins/vehicle-questions-mixin.spec.js | 89 ++++----- src/mixins/vin-pages-mixin.spec.js | 1 + .../dynamic-routing/component-loader.js | 2 +- src/router/index.js | 4 +- .../router-constants/navigation-scenarios.js | 6 +- src/router/router-constants/routing-table.js | 2 +- src/router/router.spec.js | 2 +- 59 files changed, 602 insertions(+), 583 deletions(-) diff --git a/src/helpers/unit-test-helper.js b/src/helpers/unit-test-helper.js index 76029faa..2bcfc8af 100644 --- a/src/helpers/unit-test-helper.js +++ b/src/helpers/unit-test-helper.js @@ -1,6 +1,6 @@ import { RouterLinkStub } from '@vue/test-utils'; import { createTestingPinia } from '@pinia/testing'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios.js'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; import vehicleCategories from '@/constants/vehicle-categories.js'; import issPageValues from '@/router/router-constants/issPage-values'; import cookieNames from '@/constants/cookie-names'; diff --git a/src/layouts/address-lookup/address-lookup.spec.js b/src/layouts/address-lookup/address-lookup.spec.js index 0aef1ab5..a891af3e 100644 --- a/src/layouts/address-lookup/address-lookup.spec.js +++ b/src/layouts/address-lookup/address-lookup.spec.js @@ -6,7 +6,7 @@ import { settleAllPromises } from '@/helpers/layout-helper.js'; import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { useMainStore } from '@/store'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios'; jest.mock('@/helpers/damage-helper', () => ({ isGlassAvailableForCarId: jest.fn().mockImplementation(() => true), diff --git a/src/layouts/contact-details/contact-details.spec.js b/src/layouts/contact-details/contact-details.spec.js index 5f6440fc..c6938e58 100644 --- a/src/layouts/contact-details/contact-details.spec.js +++ b/src/layouts/contact-details/contact-details.spec.js @@ -6,7 +6,7 @@ import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { getRandomString, getRandomInt, getRandomBoolean } from '@/helpers/data-generation.js'; import { createTestingPinia } from '@pinia/testing'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios.js'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; import { useMainStore } from '@/store/index.js'; describe('contactDetails.vue', () => { diff --git a/src/layouts/coverage-statement/coverage-statement.spec.js b/src/layouts/coverage-statement/coverage-statement.spec.js index ba1a6dd1..fea224c5 100644 --- a/src/layouts/coverage-statement/coverage-statement.spec.js +++ b/src/layouts/coverage-statement/coverage-statement.spec.js @@ -5,7 +5,7 @@ import coverageStatement from '@/layouts/coverage-statement/coverage-statement.v import { mount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { createTestingPinia } from '@pinia/testing'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios.js'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; import { getRandomString, getRandomInt } from '@/helpers/data-generation.js'; import { settleAllPromises } from '@/helpers/layout-helper.js'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 08647f77..c1c6cb3b 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -119,7 +119,7 @@ import { useMainStore } from '@/store/index.js'; import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin.js'; import globalRules from '@/constants/global-rules.js'; import baseFormMixin from '@/mixins/base-form-mixin.js'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios.js'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; export default { name: 'coverage-statement', 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 35e57491..8705494c 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js +++ b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js @@ -6,7 +6,7 @@ import { settleAllPromises } from '@/helpers/layout-helper.js'; import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { useMainStore } from '@/store'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios'; jest.mock('@/helpers/damage-helper', () => ({ isGlassAvailableForCarId: jest.fn().mockImplementation(() => true), diff --git a/src/layouts/policy-holder-details/policy-holder-details.spec.js b/src/layouts/policy-holder-details/policy-holder-details.spec.js index ffcd9931..e36b99a5 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.spec.js +++ b/src/layouts/policy-holder-details/policy-holder-details.spec.js @@ -6,7 +6,7 @@ import { shallowMount } from '@vue/test-utils'; import { settleAllPromises } from '@/helpers/layout-helper.js'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { useMainStore } from '@/store'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios'; // Mock our module for promises. jest.mock('@/helpers/layout-helper.js', () => ({ diff --git a/src/layouts/policy-vehicles/policy-vehicles.spec.js b/src/layouts/policy-vehicles/policy-vehicles.spec.js index 4e15c74c..993071aa 100644 --- a/src/layouts/policy-vehicles/policy-vehicles.spec.js +++ b/src/layouts/policy-vehicles/policy-vehicles.spec.js @@ -4,7 +4,7 @@ import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper'; import { useMainStore } from '@/store'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios'; import baseMixin from '@/mixins/base-mixin'; import { getRandomString, getRandomInt } from '@/helpers/data-generation'; import endorsementOptions from '@/constants/endorsement-options'; diff --git a/src/layouts/provider-preference/provider-preference.spec.js b/src/layouts/provider-preference/provider-preference.spec.js index e4cce112..1857b749 100644 --- a/src/layouts/provider-preference/provider-preference.spec.js +++ b/src/layouts/provider-preference/provider-preference.spec.js @@ -5,7 +5,7 @@ import { settleAllPromises } from '@/helpers/layout-helper.js'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { useMainStore } from '@/store'; -import { navigationScenarios } from '@/router/router-constants/navigation-scenarios'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios'; // Mock our module for promises. jest.mock('@/helpers/layout-helper.js', () => ({ diff --git a/src/layouts/tpa-confirmation/tpa-confirmation.vue b/src/layouts/tpa-confirmation/tpa-confirmation.vue index a59222eb..0fde2bcc 100644 --- a/src/layouts/tpa-confirmation/tpa-confirmation.vue +++ b/src/layouts/tpa-confirmation/tpa-confirmation.vue @@ -3,7 +3,7 @@ ref="theForm" v-slot="{ meta }" @submit="onSubmit" - @invalid-submit="onInvalidSubmit"> + @invalidSubmit="onInvalidSubmit">
@@ -14,7 +14,7 @@ cmsWidgetName="SiteFooterWidget" :isForwardActionDisabled="!meta.valid" @ForwardClicked="forwardButtonAction" - @back-clicked="backButtonAction" /> + @backClicked="backButtonAction" />
@@ -22,8 +22,8 @@