commit
This commit is contained in:
parent
403b0e5807
commit
4784112577
2 changed files with 6 additions and 5 deletions
|
|
@ -234,6 +234,6 @@ function setupMocks({ glassNameProp, glassLocationProp, colorAnswersProp, modelV
|
||||||
const partsOrQuestions = pageData ?? { partsOrQuestions: [{ glassName: "Stationary", glassLocation: "Rear", parts: [] }] };
|
const partsOrQuestions = pageData ?? { partsOrQuestions: [{ glassName: "Stationary", glassLocation: "Rear", parts: [] }] };
|
||||||
useMainStore().pageData = jest.fn();
|
useMainStore().pageData = jest.fn();
|
||||||
useMainStore().pageData.mockReturnValue(partsOrQuestions);
|
useMainStore().pageData.mockReturnValue(partsOrQuestions);
|
||||||
document.querySelector = jest.fn().mockReturnValue({checked: false});
|
document.querySelector = jest.fn().mockReturnValue({clicked: false});
|
||||||
return { wrapper };
|
return { wrapper };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@
|
||||||
isRequired
|
isRequired
|
||||||
isSmallQuestionText
|
isSmallQuestionText
|
||||||
:groupName="`${glassLocation}-${glassName}-${selectedTint}`"
|
:groupName="`${glassLocation}-${glassName}-${selectedTint}`"
|
||||||
:validationRules="partValidationRules"
|
:validationRules="partValidationRules" />
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</buttonQuestion>
|
</buttonQuestion>
|
||||||
|
|
@ -196,10 +195,12 @@ export default {
|
||||||
if (this.partsForSelectedTint?.length == 1) {
|
if (this.partsForSelectedTint?.length == 1) {
|
||||||
this.selectedPartNumber = { value: this.partsForSelectedTint[0].partNumber };
|
this.selectedPartNumber = { value: this.partsForSelectedTint[0].partNumber };
|
||||||
|
|
||||||
//select element with matching partNumber
|
// //select element with matching partNumber
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
document.querySelector('input[value=' + this.selectedPartNumber + ']').click();
|
document.querySelector('input[value=' + this.selectedPartNumber + ']').checked = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue