coverage-statement updates

This commit is contained in:
Katie Kroell 2023-07-17 16:19:34 -04:00
parent 0434edcf0f
commit e5be857556
3 changed files with 23 additions and 19 deletions

View file

@ -30,10 +30,11 @@ jest.mock("@/helpers/cms-content-helper", () => ({
describe("coverage-statement.vue...", () => { describe("coverage-statement.vue...", () => {
describe("method arePagePrerequisitesValid...", () => { 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 // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
useMainStore().order.vehicle.vin = getRandomString(5,20); const store = useMainStore();
store.order.vehicle.vin = getRandomString(5,20);
// Act // Act
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); 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", () => { test("Should return false for valid page requisites if vin is missing", () => {
// Arrange // Arrange
const { wrapper } = setupMocks({}); const { wrapper } = setupMocks({});
const store = useMainStore();
useMainStore().order.vehicle.vin = null; store.order.vehicle.vin = null;
// Act // Act
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid(); let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
@ -75,8 +76,8 @@ describe("coverage-statement.vue...", () => {
const wrapper = shallowMount(coverageStatement, { const wrapper = shallowMount(coverageStatement, {
mixins: [mockMixin], mixins: [mockMixin],
}); });
const store = useMainStore();
useMainStore().order.damage.isRepair = true; store.order.damage.isRepair = true;
// Assert // Assert
expect(wrapper.vm.bodyText).toEqual("NonADASRepairTestReturn"); expect(wrapper.vm.bodyText).toEqual("NonADASRepairTestReturn");
@ -88,13 +89,14 @@ describe("coverage-statement.vue...", () => {
mixins: [mockMixin], mixins: [mockMixin],
}); });
useMainStore().lineItems.glassParts = const store = useMainStore();
store.lineItems.glassParts =
[ [
{ {
requiresRecalibration: false, requiresRecalibration: false,
} }
]; ];
useMainStore().order.damage.isRepair = false; store.order.damage.isRepair = false;
// Assert // Assert
expect(wrapper.vm.bodyText).toEqual("NonADASReplaceTestReturn"); expect(wrapper.vm.bodyText).toEqual("NonADASReplaceTestReturn");
@ -105,12 +107,13 @@ describe("coverage-statement.vue...", () => {
const wrapper = shallowMount(coverageStatement, { const wrapper = shallowMount(coverageStatement, {
mixins: [mockMixin], mixins: [mockMixin],
}); });
useMainStore().lineItems.glassParts = [ const store = useMainStore();
store.lineItems.glassParts = [
{ {
requiresRecalibration: true, requiresRecalibration: true,
} }
]; ];
useMainStore().order.damage.isRepair = false; store.order.damage.isRepair = false;
// Assert // Assert
expect(wrapper.vm.bodyText).toEqual("ADASReplaceTestReturn"); expect(wrapper.vm.bodyText).toEqual("ADASReplaceTestReturn");

View file

@ -33,7 +33,7 @@
<div <div
v-if="verifiedITAC" v-if="verifiedITAC"
class="d-flex justify-content-center mb-4"> class="d-flex justify-content-center mb-4">
{{ deductibleText }} {{ deductibleText }}&nbsp;
<span class="text-success fw-bold">{{ formattedDeductible }}</span> <span class="text-success fw-bold">{{ formattedDeductible }}</span>
</div> </div>
<alert <alert
@ -54,7 +54,6 @@
v-html="nextStepsBody" v-html="nextStepsBody"
class="body-text"> class="body-text">
</div> </div>
<steeringText cmsWidgetName="MASteeringText" ></steeringText>
<buttonQuestion <buttonQuestion
v-if="displayQuote" v-if="displayQuote"
cmsWidgetName="ServiceProviderQuestion" 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 siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
import textBlock from "@/digital-components/text-block/text-block"; import textBlock from "@/digital-components/text-block/text-block";
import recalModal from '@/layouts/coverage-statement/recal-modal/recal-modal.vue'; 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 alert from "@/ux-components/alert/alert";
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal'; import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal';
import buttonQuestion from "@/digital-components/button-question/button-question"; import buttonQuestion from "@/digital-components/button-question/button-question";
@ -170,7 +168,6 @@ export default {
Form, Form,
textBlock, textBlock,
recalModal, recalModal,
steeringText,
alert, alert,
contentGroupModal, contentGroupModal,
buttonQuestion buttonQuestion
@ -185,6 +182,7 @@ export default {
pricedGlassParts: [], pricedGlassParts: [],
availableLineItems: [], availableLineItems: [],
selectedProvider: "", selectedProvider: "",
deductibleText: "Your deductible is:",
} }
}, },
computed: { computed: {
@ -331,9 +329,6 @@ export default {
return true; return true;
} }
}, },
deductibleText() {
return "Your deductible is:";
}
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
@ -367,7 +362,10 @@ export default {
) )
} }
else { else {
//display TPA bailout modal this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
this.$route
)
} }
} }
}, },
@ -376,7 +374,6 @@ export default {
}, },
processIfStatements, processIfStatements,
getHeaderTextFromCms(cmsWidgetName) { getHeaderTextFromCms(cmsWidgetName) {
console.log(this.coverageUnverified);
const header = this.getCmsContent(cmsWidgetName, 'HeaderText'); const header = this.getCmsContent(cmsWidgetName, 'HeaderText');
return this.processIfStatements(header, "custom", this.getCustomValueFromString); return this.processIfStatements(header, "custom", this.getCustomValueFromString);
}, },

View file

@ -438,6 +438,10 @@ const routingTable = function(store) {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY, scenario: navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY,
destinationIssPageValue: issPageValues.TPA_SEARCH destinationIssPageValue: issPageValues.TPA_SEARCH
}, },
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
}
] ]
}, },
{ {