Merge pull request #1089 from Safelite/feature/INSR-7750

Feature/insr 7750
This commit is contained in:
SujathaAnishetty 2026-02-18 10:36:02 -05:00 committed by GitHub
commit 56a59808e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 29 deletions

View file

@ -9,13 +9,12 @@
v-model="selectedAnswers"
isRequired
:isMetaValid="meta.valid"
:alertFewMoreQuestionsHeader="AlertFewMoreQuestionsHeader"
:alertFewMoreQuestionsCopy="AlertFewMoreQuestionsCopy"
:questionsData="questionsData"
:validationRules="rules.optionRequired"
:index="currentGlassIndex"
@forwardButtonAction="forwardButtonAction"
@backClick="navigateBackByVehicleQuestions" />
@backClick="navigateBackByVehicleQuestions"
@needHelpClick="requestCallbackBailout" />
</Form>
</template>
<script>
@ -31,6 +30,8 @@ import { useMainStore } from '@/store';
import globalRules from '@/constants/global-rules';
import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin';
import questionsPageLayout from '@/iss-components/questions-page-layout/questions-page-layout.vue';
import bailoutMessage from '@/constants/bailoutMessage';
import navigationScenarios from '@/router/router-constants/navigation-scenarios';
export default {
name: 'capability-questions',
@ -67,18 +68,6 @@ export default {
};
},
computed: {
AlertFewMoreQuestionsHeader() {
return this.getCmsContent(
'AdditionalPartsQuestionsAlert',
'HeadlineText'
);
},
AlertFewMoreQuestionsCopy() {
return this.getCmsContent(
'AdditionalPartsQuestionsAlert',
'BodyText'
);
},
partsOrQuestionsData() {
return useMainStore().pageData(issPageValues.CAPABILITY_QUESTIONS)
.partsOrQuestions;
@ -166,6 +155,10 @@ export default {
});
this.navigateForward(this.partsOrQuestionsData, null);
},
requestCallbackBailout() {
this.mainStore.setBailout(bailoutMessage.RequestCallback());
this.$router.navigate(navigationScenarios.CLICKED_NEED_HELP_WITH_BAILOUT, this.$route);
}
}
};

View file

@ -10,8 +10,6 @@
v-model="selectedAnswers"
isRequired
:isMetaValid="meta.valid"
:alertFewMoreQuestionsHeader="AlertFewMoreQuestionsHeader"
:alertFewMoreQuestionsCopy="AlertFewMoreQuestionsCopy"
:questionsData="questionsData"
:validationRules="rules.optionRequired"
:index="currentGlassIndex"
@ -71,18 +69,6 @@ export default {
};
},
computed: {
AlertFewMoreQuestionsHeader() {
return this.getCmsContent(
'AdditionalPartsQuestionsAlert',
'HeadlineText'
);
},
AlertFewMoreQuestionsCopy() {
return this.getCmsContent(
'AdditionalPartsQuestionsAlert',
'BodyText'
);
},
partsOrQuestionsData() {
return useMainStore().pageData(issPageValues.MOLDING_QUESTIONS).partsOrQuestions;
}

View file

@ -330,6 +330,10 @@ const routingTable = () => [
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS,
destinationIssPageValue: issPageValues.COVERAGE_STATEMENT
},
{
scenario: navigationScenarios.CLICKED_NEED_HELP_WITH_BAILOUT,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
}
]
},

View file

@ -36,4 +36,19 @@ describe('Router', () => {
// Assert
expect(router.push.mock.calls[0][0].state).toBe(parameters);
});
it('Should route from CAPABILITY_QUESTIONS to BAILOUT_PAGE on CLICKED_NEED_HELP_WITH_BAILOUT', () => {
const scenario = navigationScenarios.CLICKED_NEED_HELP_WITH_BAILOUT;
const currentRoute = { query: { issPage: issPageValues.CAPABILITY_QUESTIONS } };
router.push = jest.fn();
// Act
router.navigate(scenario, currentRoute);
// Assert
expect(router.push).toHaveBeenCalled();
expect(router.push.mock.calls[0][0].query.issPage).toBe(issPageValues.BAILOUT_PAGE);
});
});