PR changes
This commit is contained in:
parent
beeeed8778
commit
63c5999261
3 changed files with 9 additions and 5 deletions
|
|
@ -144,7 +144,7 @@ export default {
|
||||||
if (this.educatorEndorsement) {
|
if (this.educatorEndorsement) {
|
||||||
this.questionAnswersArray.push({
|
this.questionAnswersArray.push({
|
||||||
questionNum: 1,
|
questionNum: 1,
|
||||||
endorsement: endorsementOptions.EDUCATOR,
|
endorsementName: endorsementOptions.EDUCATOR,
|
||||||
questionText: this.schoolPropertyQuestionText,
|
questionText: this.schoolPropertyQuestionText,
|
||||||
selectedAnswer: this.schoolPropertyAnswer
|
selectedAnswer: this.schoolPropertyAnswer
|
||||||
});
|
});
|
||||||
|
|
@ -152,7 +152,7 @@ export default {
|
||||||
if (this.parkingGuardEndorsement) {
|
if (this.parkingGuardEndorsement) {
|
||||||
this.questionAnswersArray.push({
|
this.questionAnswersArray.push({
|
||||||
questionNum: 2,
|
questionNum: 2,
|
||||||
endorsement: endorsementOptions.PARKING_GUARD,
|
endorsementName: endorsementOptions.PARKING_GUARD,
|
||||||
questionText: this.parkingLotQuestionText,
|
questionText: this.parkingLotQuestionText,
|
||||||
selectedAnswer: this.parkingLotAnswer
|
selectedAnswer: this.parkingLotAnswer
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -510,8 +510,12 @@ export const useMainStore = defineStore({
|
||||||
getFinalDeductible() {
|
getFinalDeductible() {
|
||||||
const endorsementAnswersForPayload = [];
|
const endorsementAnswersForPayload = [];
|
||||||
const endorsementAnswers = this.order.policy.endorsementQuestionAnswers;
|
const endorsementAnswers = this.order.policy.endorsementQuestionAnswers;
|
||||||
if (endorsementAnswers && endorsementAnswers[0]?.selectedAnswer === 'Yes') {
|
if (endorsementAnswers) {
|
||||||
endorsementAnswersForPayload.push(this.order.policy.endorsementQuestionAnswers[0].endorsement);
|
endorsementAnswers.forEach((endorsement) => {
|
||||||
|
if (endorsement.selectedAnswer === 'Yes') {
|
||||||
|
endorsementAnswersForPayload.push(endorsement.endorsementName);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
|
|
@ -1759,7 +1759,7 @@ describe('Store', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('unsuccessful api call', () => {
|
describe('unsuccessful api call', () => {
|
||||||
it.only('api call throws exception', async () => {
|
it('api call throws exception', async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
expect.assertions(2);
|
expect.assertions(2);
|
||||||
const error = 'final deductible error';
|
const error = 'final deductible error';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue