CSR-803: remaining questions pages
This commit is contained in:
parent
d73ddf0b46
commit
c30bd8877c
4 changed files with 14 additions and 6 deletions
|
|
@ -84,12 +84,14 @@ const baseStoreGettersDamage = () => {
|
|||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
||||
selectedAnswer: "1|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 1,
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
||||
selectedAnswer: "2|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 2,
|
||||
},
|
||||
|
|
@ -166,10 +168,10 @@ describe("capabilityQuestions.vue", () => {
|
|||
});
|
||||
|
||||
describe("watch on selectedAnswers should be set up...", () => {
|
||||
test("Should trigger handleAnswerUpdates if watched data changes", async () => {
|
||||
test("Should trigger handleCompletedQuestionChainAnswers if watched data changes", async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
const spy = jest.spyOn(wrapper.vm, "handleAnswerUpdates");
|
||||
const spy = jest.spyOn(wrapper.vm, "handleCompletedQuestionChainAnswers");
|
||||
|
||||
// Act
|
||||
wrapper.setData({
|
||||
|
|
@ -180,12 +182,14 @@ describe("capabilityQuestions.vue", () => {
|
|||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
||||
selectedAnswer: "1|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 1,
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
||||
selectedAnswer: "2|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 2,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ export default {
|
|||
"selectedAnswers." + glass.answerKey,
|
||||
(newValue) => {
|
||||
if (newValue && Object.keys(newValue).length > 0) {
|
||||
this.handleAnswerUpdates(newValue, glass.answerKey);
|
||||
this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
|
|
|
|||
|
|
@ -88,12 +88,14 @@ const baseStoreGettersDamage = () => {
|
|||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
||||
selectedAnswer: "1|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 1,
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
||||
selectedAnswer: "2|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 2,
|
||||
},
|
||||
|
|
@ -170,10 +172,10 @@ describe("moldingQuestions.vue", () => {
|
|||
});
|
||||
|
||||
describe("watch on selectedAnswers should be set up...", () => {
|
||||
test("Should trigger handleAnswerUpdates if watched data changes", async () => {
|
||||
test("Should trigger handleCompletedQuestionChainAnswers if watched data changes", async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
const spy = jest.spyOn(wrapper.vm, "handleAnswerUpdates");
|
||||
const spy = jest.spyOn(wrapper.vm, "handleCompletedQuestionChainAnswers");
|
||||
|
||||
// Act
|
||||
wrapper.setData({
|
||||
|
|
@ -184,12 +186,14 @@ describe("moldingQuestions.vue", () => {
|
|||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
||||
selectedAnswer: "1|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 1,
|
||||
},
|
||||
{
|
||||
questionText:
|
||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
||||
selectedAnswer: "2|nextQuestion|3|Yes",
|
||||
selectedAnswerText: "Yes",
|
||||
questionNum: 2,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export default {
|
|||
"selectedAnswers." + glass.answerKey,
|
||||
(newValue) => {
|
||||
if (newValue && Object.keys(newValue).length > 0) {
|
||||
this.handleAnswerUpdates(newValue, glass.answerKey);
|
||||
this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
|
|
|
|||
Loading…
Reference in a new issue