From ddb394e0b5a8e6724c86336adc21141d8525ce01 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Wed, 13 Sep 2023 15:18:03 -0400 Subject: [PATCH] change page name --- .../policy-endorsements.spec.js} | 20 +++++++++---------- .../policy-endorsements.vue} | 2 +- src/router/router-constants/issPage-values.js | 2 +- src/router/router-constants/routing-table.js | 8 ++++---- 4 files changed, 15 insertions(+), 17 deletions(-) rename src/layouts/{endorsements-page/endorsements-page.spec.js => policy-endorsements/policy-endorsements.spec.js} (81%) rename src/layouts/{endorsements-page/endorsements-page.vue => policy-endorsements/policy-endorsements.vue} (99%) diff --git a/src/layouts/endorsements-page/endorsements-page.spec.js b/src/layouts/policy-endorsements/policy-endorsements.spec.js similarity index 81% rename from src/layouts/endorsements-page/endorsements-page.spec.js rename to src/layouts/policy-endorsements/policy-endorsements.spec.js index a7eaa593..ca26edb1 100644 --- a/src/layouts/endorsements-page/endorsements-page.spec.js +++ b/src/layouts/policy-endorsements/policy-endorsements.spec.js @@ -1,5 +1,5 @@ // Components -import endorsementsPage from '@/layouts/endorsements-page/endorsements-page.vue'; +import policyEndorsements from '@/layouts/policy-endorsements/policy-endorsements.vue'; // Supporting Files import { shallowMount } from '@vue/test-utils'; @@ -8,13 +8,11 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios' import { createTestingPinia } from '@pinia/testing'; import { useMainStore } from '@/store'; -// import { useMainStore } from '@/store/index.js'; - -describe('endorsementsPage.vue', () => { +describe('policyEndorsements.vue', () => { describe('Rendering', () => { test('Should render site header', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions()); + const wrapper = shallowMount(policyEndorsements, getMountOptions()); // Act const siteHeader = wrapper.findComponent({ ref: 'siteHeader' }); @@ -24,7 +22,7 @@ describe('endorsementsPage.vue', () => { }); test('Should render site subheader', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions()); + const wrapper = shallowMount(policyEndorsements, getMountOptions()); // Act const siteSubHeader = wrapper.findComponent({ ref: 'siteSubHeader' }); @@ -34,7 +32,7 @@ describe('endorsementsPage.vue', () => { }); test('Should render buttonQuestion component', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions()); + const wrapper = shallowMount(policyEndorsements, getMountOptions()); // Act const buttonQuestion = wrapper.findComponent({ ref: 'endorsementQuestion' }); @@ -44,7 +42,7 @@ describe('endorsementsPage.vue', () => { }); test('Should render site footer', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions()); + const wrapper = shallowMount(policyEndorsements, getMountOptions()); // Act const siteFooter = wrapper.findComponent({ ref: 'siteFooter' }); @@ -56,7 +54,7 @@ describe('endorsementsPage.vue', () => { describe('Navigation', () => { test('Back button clicked triggers navigation', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions({ + const wrapper = shallowMount(policyEndorsements, getMountOptions({ router: { navigate: jest.fn() } @@ -72,7 +70,7 @@ describe('endorsementsPage.vue', () => { }); test('Forward button clicked triggers navigation', () => { // Arrange - const wrapper = shallowMount(endorsementsPage, getMountOptions({ + const wrapper = shallowMount(policyEndorsements, getMountOptions({ router: { navigate: jest.fn() } @@ -98,7 +96,7 @@ describe('endorsementsPage.vue', () => { plugins: [createTestingPinia()] } }); - const wrapper = shallowMount(endorsementsPage, mountOptions); + const wrapper = shallowMount(policyEndorsements, mountOptions); // Act wrapper.vm.forwardButtonAction(); diff --git a/src/layouts/endorsements-page/endorsements-page.vue b/src/layouts/policy-endorsements/policy-endorsements.vue similarity index 99% rename from src/layouts/endorsements-page/endorsements-page.vue rename to src/layouts/policy-endorsements/policy-endorsements.vue index b01a15f2..70b77298 100644 --- a/src/layouts/endorsements-page/endorsements-page.vue +++ b/src/layouts/policy-endorsements/policy-endorsements.vue @@ -67,7 +67,7 @@ import globalRules from '@/constants/global-rules.js'; import { useMainStore } from '@/store'; export default { - name: 'endorsements-page', + name: 'policy-endorsements', components: { siteHeader, siteSubHeader, diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index 36a3df39..db5b783f 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -9,7 +9,7 @@ const issPageValues = Object.freeze({ CAPABILITY_QUESTIONS: 'capability-questions', CONTACT_CONFIRMATION: 'contact-confirmation', CONTACT_DETAILS: 'contact-details', - ENDORSEMENTS_PAGE: 'endorsements-page', + POLICY_ENDORSEMENTS: 'policy-endorsements', ESTIMATE: 'estimate', COVERAGE_STATEMENT: 'coverage-statement', LICENSE_PLATE_LOOKUP: 'license-plate-lookup', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 13593453..bc5d762c 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -408,8 +408,8 @@ const routingTable = () => [ }, { scenario: navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS, - destinationIssPageValue: issPageValues.ENDORSEMENTS_PAGE - }, + destinationIssPageValue: issPageValues.POLICY_ENDORSEMENTS + } ] }, @@ -623,7 +623,7 @@ const routingTable = () => [ ] }, { - issPageValue: issPageValues.ENDORSEMENTS_PAGE, + issPageValue: issPageValues.POLICY_ENDORSEMENTS, maps: [ { scenario: navigationScenarios.CLICKED_BACK, @@ -634,7 +634,7 @@ const routingTable = () => [ destinationIssPageValue: issPageValues.VEHICLE_DAMAGE } ] - }, + } ];