PR changes

This commit is contained in:
Katie Kroell 2023-10-20 15:16:10 -04:00
parent beeeed8778
commit 63c5999261
3 changed files with 9 additions and 5 deletions

View file

@ -144,7 +144,7 @@ export default {
if (this.educatorEndorsement) {
this.questionAnswersArray.push({
questionNum: 1,
endorsement: endorsementOptions.EDUCATOR,
endorsementName: endorsementOptions.EDUCATOR,
questionText: this.schoolPropertyQuestionText,
selectedAnswer: this.schoolPropertyAnswer
});
@ -152,7 +152,7 @@ export default {
if (this.parkingGuardEndorsement) {
this.questionAnswersArray.push({
questionNum: 2,
endorsement: endorsementOptions.PARKING_GUARD,
endorsementName: endorsementOptions.PARKING_GUARD,
questionText: this.parkingLotQuestionText,
selectedAnswer: this.parkingLotAnswer
});

View file

@ -510,8 +510,12 @@ export const useMainStore = defineStore({
getFinalDeductible() {
const endorsementAnswersForPayload = [];
const endorsementAnswers = this.order.policy.endorsementQuestionAnswers;
if (endorsementAnswers && endorsementAnswers[0]?.selectedAnswer === 'Yes') {
endorsementAnswersForPayload.push(this.order.policy.endorsementQuestionAnswers[0].endorsement);
if (endorsementAnswers) {
endorsementAnswers.forEach((endorsement) => {
if (endorsement.selectedAnswer === 'Yes') {
endorsementAnswersForPayload.push(endorsement.endorsementName);
}
});
}
return new Promise((resolve, reject) => {

View file

@ -1759,7 +1759,7 @@ describe('Store', () => {
});
});
describe('unsuccessful api call', () => {
it.only('api call throws exception', async () => {
it('api call throws exception', async () => {
// Arrange
expect.assertions(2);
const error = 'final deductible error';