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: [] }] };
|
||||
useMainStore().pageData = jest.fn();
|
||||
useMainStore().pageData.mockReturnValue(partsOrQuestions);
|
||||
document.querySelector = jest.fn().mockReturnValue({checked: false});
|
||||
document.querySelector = jest.fn().mockReturnValue({clicked: false});
|
||||
return { wrapper };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
isRequired
|
||||
isSmallQuestionText
|
||||
:groupName="`${glassLocation}-${glassName}-${selectedTint}`"
|
||||
:validationRules="partValidationRules"
|
||||
/>
|
||||
:validationRules="partValidationRules" />
|
||||
</div>
|
||||
</div>
|
||||
</buttonQuestion>
|
||||
|
|
@ -196,10 +195,12 @@ export default {
|
|||
if (this.partsForSelectedTint?.length == 1) {
|
||||
this.selectedPartNumber = { value: this.partsForSelectedTint[0].partNumber };
|
||||
|
||||
//select element with matching partNumber
|
||||
// //select element with matching partNumber
|
||||
this.$nextTick(() => {
|
||||
document.querySelector('input[value=' + this.selectedPartNumber + ']').click();
|
||||
document.querySelector('input[value=' + this.selectedPartNumber + ']').checked = true;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue