change page name
This commit is contained in:
parent
020bb84704
commit
ddb394e0b5
4 changed files with 15 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
// Components
|
// Components
|
||||||
import endorsementsPage from '@/layouts/endorsements-page/endorsements-page.vue';
|
import policyEndorsements from '@/layouts/policy-endorsements/policy-endorsements.vue';
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import { shallowMount } from '@vue/test-utils';
|
import { shallowMount } from '@vue/test-utils';
|
||||||
|
|
@ -8,13 +8,11 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios'
|
||||||
import { createTestingPinia } from '@pinia/testing';
|
import { createTestingPinia } from '@pinia/testing';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
// import { useMainStore } from '@/store/index.js';
|
describe('policyEndorsements.vue', () => {
|
||||||
|
|
||||||
describe('endorsementsPage.vue', () => {
|
|
||||||
describe('Rendering', () => {
|
describe('Rendering', () => {
|
||||||
test('Should render site header', () => {
|
test('Should render site header', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions());
|
const wrapper = shallowMount(policyEndorsements, getMountOptions());
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const siteHeader = wrapper.findComponent({ ref: 'siteHeader' });
|
const siteHeader = wrapper.findComponent({ ref: 'siteHeader' });
|
||||||
|
|
@ -24,7 +22,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
});
|
});
|
||||||
test('Should render site subheader', () => {
|
test('Should render site subheader', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions());
|
const wrapper = shallowMount(policyEndorsements, getMountOptions());
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const siteSubHeader = wrapper.findComponent({ ref: 'siteSubHeader' });
|
const siteSubHeader = wrapper.findComponent({ ref: 'siteSubHeader' });
|
||||||
|
|
@ -34,7 +32,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
});
|
});
|
||||||
test('Should render buttonQuestion component', () => {
|
test('Should render buttonQuestion component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions());
|
const wrapper = shallowMount(policyEndorsements, getMountOptions());
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const buttonQuestion = wrapper.findComponent({ ref: 'endorsementQuestion' });
|
const buttonQuestion = wrapper.findComponent({ ref: 'endorsementQuestion' });
|
||||||
|
|
@ -44,7 +42,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
});
|
});
|
||||||
test('Should render site footer', () => {
|
test('Should render site footer', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions());
|
const wrapper = shallowMount(policyEndorsements, getMountOptions());
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const siteFooter = wrapper.findComponent({ ref: 'siteFooter' });
|
const siteFooter = wrapper.findComponent({ ref: 'siteFooter' });
|
||||||
|
|
@ -56,7 +54,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
describe('Navigation', () => {
|
describe('Navigation', () => {
|
||||||
test('Back button clicked triggers navigation', () => {
|
test('Back button clicked triggers navigation', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions({
|
const wrapper = shallowMount(policyEndorsements, getMountOptions({
|
||||||
router: {
|
router: {
|
||||||
navigate: jest.fn()
|
navigate: jest.fn()
|
||||||
}
|
}
|
||||||
|
|
@ -72,7 +70,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
});
|
});
|
||||||
test('Forward button clicked triggers navigation', () => {
|
test('Forward button clicked triggers navigation', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const wrapper = shallowMount(endorsementsPage, getMountOptions({
|
const wrapper = shallowMount(policyEndorsements, getMountOptions({
|
||||||
router: {
|
router: {
|
||||||
navigate: jest.fn()
|
navigate: jest.fn()
|
||||||
}
|
}
|
||||||
|
|
@ -98,7 +96,7 @@ describe('endorsementsPage.vue', () => {
|
||||||
plugins: [createTestingPinia()]
|
plugins: [createTestingPinia()]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const wrapper = shallowMount(endorsementsPage, mountOptions);
|
const wrapper = shallowMount(policyEndorsements, mountOptions);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
wrapper.vm.forwardButtonAction();
|
wrapper.vm.forwardButtonAction();
|
||||||
|
|
@ -67,7 +67,7 @@ import globalRules from '@/constants/global-rules.js';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'endorsements-page',
|
name: 'policy-endorsements',
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
|
|
@ -9,7 +9,7 @@ const issPageValues = Object.freeze({
|
||||||
CAPABILITY_QUESTIONS: 'capability-questions',
|
CAPABILITY_QUESTIONS: 'capability-questions',
|
||||||
CONTACT_CONFIRMATION: 'contact-confirmation',
|
CONTACT_CONFIRMATION: 'contact-confirmation',
|
||||||
CONTACT_DETAILS: 'contact-details',
|
CONTACT_DETAILS: 'contact-details',
|
||||||
ENDORSEMENTS_PAGE: 'endorsements-page',
|
POLICY_ENDORSEMENTS: 'policy-endorsements',
|
||||||
ESTIMATE: 'estimate',
|
ESTIMATE: 'estimate',
|
||||||
COVERAGE_STATEMENT: 'coverage-statement',
|
COVERAGE_STATEMENT: 'coverage-statement',
|
||||||
LICENSE_PLATE_LOOKUP: 'license-plate-lookup',
|
LICENSE_PLATE_LOOKUP: 'license-plate-lookup',
|
||||||
|
|
|
||||||
|
|
@ -408,8 +408,8 @@ const routingTable = () => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS,
|
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: [
|
maps: [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_BACK,
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
|
|
@ -634,7 +634,7 @@ const routingTable = () => [
|
||||||
destinationIssPageValue: issPageValues.VEHICLE_DAMAGE
|
destinationIssPageValue: issPageValues.VEHICLE_DAMAGE
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue