Fixing bug in implementation
This commit is contained in:
parent
b21a3d8258
commit
5d07842a6a
2 changed files with 5 additions and 3 deletions
|
|
@ -277,6 +277,7 @@ describe('capabilityQuestions.vue', () => {
|
||||||
wrapper.unmount();
|
wrapper.unmount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO add test spying on getPartFromCapQuestionAnswer
|
||||||
test('Should save to pinia store', async () => {
|
test('Should save to pinia store', async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const { wrapper } = setupMocks({});
|
const { wrapper } = setupMocks({});
|
||||||
|
|
|
||||||
|
|
@ -154,9 +154,10 @@ export default {
|
||||||
|
|
||||||
// set recalibration properties of parts based on capability question answers
|
// set recalibration properties of parts based on capability question answers
|
||||||
for (let answer of questionAnswersArray) {
|
for (let answer of questionAnswersArray) {
|
||||||
let partAssociatedWithAnswer = this.partsOrQuestionsData.find((x) => x.glassLocation === answer.glassLocation).parts[0];
|
const partData = this.partsOrQuestionsData.find((x) => x.glassLocation === answer.glassLocation);
|
||||||
partAssociatedWithAnswer = await useMainStore().getPartFromCapabilityQuestionAnswer(partAssociatedWithAnswer, answer);
|
if (partData) {
|
||||||
console.log(JSON.stringify(partAssociatedWithAnswer));
|
partData.parts[0] = await useMainStore().getPartFromCapabilityQuestionAnswer(partData.parts[0], answer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.navigateForward(this.partsOrQuestionsData, null);
|
this.navigateForward(this.partsOrQuestionsData, null);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue