coverage-statement updates
This commit is contained in:
parent
0434edcf0f
commit
e5be857556
3 changed files with 23 additions and 19 deletions
|
|
@ -30,10 +30,11 @@ jest.mock("@/helpers/cms-content-helper", () => ({
|
|||
|
||||
describe("coverage-statement.vue...", () => {
|
||||
describe("method arePagePrerequisitesValid...", () => {
|
||||
test("Should return true for valid page requisites if vin exists", () => {
|
||||
test.only("Should return true for valid page requisites if vin exists", () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
useMainStore().order.vehicle.vin = getRandomString(5,20);
|
||||
const store = useMainStore();
|
||||
store.order.vehicle.vin = getRandomString(5,20);
|
||||
|
||||
// Act
|
||||
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||
|
|
@ -45,8 +46,8 @@ describe("coverage-statement.vue...", () => {
|
|||
test("Should return false for valid page requisites if vin is missing", () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
useMainStore().order.vehicle.vin = null;
|
||||
const store = useMainStore();
|
||||
store.order.vehicle.vin = null;
|
||||
|
||||
// Act
|
||||
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||
|
|
@ -75,8 +76,8 @@ describe("coverage-statement.vue...", () => {
|
|||
const wrapper = shallowMount(coverageStatement, {
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
|
||||
useMainStore().order.damage.isRepair = true;
|
||||
const store = useMainStore();
|
||||
store.order.damage.isRepair = true;
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.bodyText).toEqual("NonADASRepairTestReturn");
|
||||
|
|
@ -88,13 +89,14 @@ describe("coverage-statement.vue...", () => {
|
|||
mixins: [mockMixin],
|
||||
});
|
||||
|
||||
useMainStore().lineItems.glassParts =
|
||||
const store = useMainStore();
|
||||
store.lineItems.glassParts =
|
||||
[
|
||||
{
|
||||
requiresRecalibration: false,
|
||||
}
|
||||
];
|
||||
useMainStore().order.damage.isRepair = false;
|
||||
store.order.damage.isRepair = false;
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.bodyText).toEqual("NonADASReplaceTestReturn");
|
||||
|
|
@ -105,12 +107,13 @@ describe("coverage-statement.vue...", () => {
|
|||
const wrapper = shallowMount(coverageStatement, {
|
||||
mixins: [mockMixin],
|
||||
});
|
||||
useMainStore().lineItems.glassParts = [
|
||||
const store = useMainStore();
|
||||
store.lineItems.glassParts = [
|
||||
{
|
||||
requiresRecalibration: true,
|
||||
}
|
||||
];
|
||||
useMainStore().order.damage.isRepair = false;
|
||||
store.order.damage.isRepair = false;
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.bodyText).toEqual("ADASReplaceTestReturn");
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<div
|
||||
v-if="verifiedITAC"
|
||||
class="d-flex justify-content-center mb-4">
|
||||
{{ deductibleText }}
|
||||
{{ deductibleText }}
|
||||
<span class="text-success fw-bold">{{ formattedDeductible }}</span>
|
||||
</div>
|
||||
<alert
|
||||
|
|
@ -54,7 +54,6 @@
|
|||
v-html="nextStepsBody"
|
||||
class="body-text">
|
||||
</div>
|
||||
<steeringText cmsWidgetName="MASteeringText" ></steeringText>
|
||||
<buttonQuestion
|
||||
v-if="displayQuote"
|
||||
cmsWidgetName="ServiceProviderQuestion"
|
||||
|
|
@ -94,7 +93,6 @@ import siteHeader from '@/iss-components/site-header/site-header.vue';
|
|||
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
||||
import textBlock from "@/digital-components/text-block/text-block";
|
||||
import recalModal from '@/layouts/coverage-statement/recal-modal/recal-modal.vue';
|
||||
import steeringText from "@/iss-components/steering-text/steering-text.vue";
|
||||
import alert from "@/ux-components/alert/alert";
|
||||
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal';
|
||||
import buttonQuestion from "@/digital-components/button-question/button-question";
|
||||
|
|
@ -170,7 +168,6 @@ export default {
|
|||
Form,
|
||||
textBlock,
|
||||
recalModal,
|
||||
steeringText,
|
||||
alert,
|
||||
contentGroupModal,
|
||||
buttonQuestion
|
||||
|
|
@ -185,6 +182,7 @@ export default {
|
|||
pricedGlassParts: [],
|
||||
availableLineItems: [],
|
||||
selectedProvider: "",
|
||||
deductibleText: "Your deductible is:",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -331,9 +329,6 @@ export default {
|
|||
return true;
|
||||
}
|
||||
},
|
||||
deductibleText() {
|
||||
return "Your deductible is:";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
arePagePrerequisitesValid() {
|
||||
|
|
@ -367,7 +362,10 @@ export default {
|
|||
)
|
||||
}
|
||||
else {
|
||||
//display TPA bailout modal
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
this.$route
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -376,7 +374,6 @@ export default {
|
|||
},
|
||||
processIfStatements,
|
||||
getHeaderTextFromCms(cmsWidgetName) {
|
||||
console.log(this.coverageUnverified);
|
||||
const header = this.getCmsContent(cmsWidgetName, 'HeaderText');
|
||||
return this.processIfStatements(header, "custom", this.getCustomValueFromString);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -438,6 +438,10 @@ const routingTable = function(store) {
|
|||
scenario: navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY,
|
||||
destinationIssPageValue: issPageValues.TPA_SEARCH
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
|
||||
destinationIssPageValue: issPageValues.BAILOUT_PAGE
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue