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:
|
questionText:
|
||||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 1,
|
questionNum: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 2,
|
questionNum: 2,
|
||||||
},
|
},
|
||||||
|
|
@ -166,10 +168,10 @@ describe("capabilityQuestions.vue", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("watch on selectedAnswers should be set up...", () => {
|
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
|
// Arrange
|
||||||
const { wrapper } = setupMocks({});
|
const { wrapper } = setupMocks({});
|
||||||
const spy = jest.spyOn(wrapper.vm, "handleAnswerUpdates");
|
const spy = jest.spyOn(wrapper.vm, "handleCompletedQuestionChainAnswers");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
wrapper.setData({
|
wrapper.setData({
|
||||||
|
|
@ -180,12 +182,14 @@ describe("capabilityQuestions.vue", () => {
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 1,
|
questionNum: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 2,
|
questionNum: 2,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ export default {
|
||||||
"selectedAnswers." + glass.answerKey,
|
"selectedAnswers." + glass.answerKey,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
if (newValue && Object.keys(newValue).length > 0) {
|
if (newValue && Object.keys(newValue).length > 0) {
|
||||||
this.handleAnswerUpdates(newValue, glass.answerKey);
|
this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,14 @@ const baseStoreGettersDamage = () => {
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 1,
|
questionNum: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 2,
|
questionNum: 2,
|
||||||
},
|
},
|
||||||
|
|
@ -170,10 +172,10 @@ describe("moldingQuestions.vue", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("watch on selectedAnswers should be set up...", () => {
|
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
|
// Arrange
|
||||||
const { wrapper } = setupMocks({});
|
const { wrapper } = setupMocks({});
|
||||||
const spy = jest.spyOn(wrapper.vm, "handleAnswerUpdates");
|
const spy = jest.spyOn(wrapper.vm, "handleCompletedQuestionChainAnswers");
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
wrapper.setData({
|
wrapper.setData({
|
||||||
|
|
@ -184,12 +186,14 @@ describe("moldingQuestions.vue", () => {
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 1,
|
questionNum: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
questionText:
|
questionText:
|
||||||
"Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?",
|
"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",
|
selectedAnswerText: "Yes",
|
||||||
questionNum: 2,
|
questionNum: 2,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export default {
|
||||||
"selectedAnswers." + glass.answerKey,
|
"selectedAnswers." + glass.answerKey,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
if (newValue && Object.keys(newValue).length > 0) {
|
if (newValue && Object.keys(newValue).length > 0) {
|
||||||
this.handleAnswerUpdates(newValue, glass.answerKey);
|
this.handleCompletedQuestionChainAnswers(newValue, glass.answerKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue