Merge branch 'feature/CSR-2185' of github.com:Safelite/DigitalConsumer.FixMyGlass into feature/CSR-2185
This commit is contained in:
commit
91998b76fa
3 changed files with 13 additions and 24 deletions
|
|
@ -48,20 +48,13 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('mounted');
|
|
||||||
// Need this here and in the watch for vehicle-parts, unless there'a better way
|
// Need this here and in the watch for vehicle-parts, unless there'a better way
|
||||||
if (this.isChecked) {
|
if (this.isChecked) {
|
||||||
console.log('I was checked');
|
|
||||||
this.handleChange(this.modelValue);
|
this.handleChange(this.modelValue);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
test() {
|
|
||||||
console.log('A');
|
|
||||||
},
|
|
||||||
handleEventAction(eventType, e) {
|
handleEventAction(eventType, e) {
|
||||||
console.log('handleEventAction');
|
|
||||||
console.log(eventType);
|
|
||||||
if (this.isMultiSelect) {
|
if (this.isMultiSelect) {
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case this.eventTypes.CHANGE:
|
case this.eventTypes.CHANGE:
|
||||||
|
|
@ -86,7 +79,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log("handleSelectionChange");
|
|
||||||
if (
|
if (
|
||||||
this.isMultiSelect &&
|
this.isMultiSelect &&
|
||||||
(this.modelValue instanceof Array || this.modelValue == null)
|
(this.modelValue instanceof Array || this.modelValue == null)
|
||||||
|
|
@ -106,7 +98,6 @@ export default {
|
||||||
this.handleChange(this.valueToEmit);
|
this.handleChange(this.valueToEmit);
|
||||||
},
|
},
|
||||||
handleClick(e) {
|
handleClick(e) {
|
||||||
console.log('handleClick');
|
|
||||||
this.handleSelectionChange(e);
|
this.handleSelectionChange(e);
|
||||||
this.$emit("update:modelValue", this.valueToEmit);
|
this.$emit("update:modelValue", this.valueToEmit);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -295,22 +295,20 @@ function setupBaseInputButtonWrapper({ mockData = {} }) {
|
||||||
parentComponentTemplate += `<baseInputButtonWrapper v-model="value" groupName="myGroupName" :isMultiSelect="${mockData.isMultiSelect}" value="value1" />`;
|
parentComponentTemplate += `<baseInputButtonWrapper v-model="value" groupName="myGroupName" :isMultiSelect="${mockData.isMultiSelect}" value="value1" />`;
|
||||||
parentComponentTemplate += `<baseInputButtonWrapper v-model="value" groupName="myGroupName" :isMultiSelect="${mockData.isMultiSelect}" value="value2" />`;
|
parentComponentTemplate += `<baseInputButtonWrapper v-model="value" groupName="myGroupName" :isMultiSelect="${mockData.isMultiSelect}" value="value2" />`;
|
||||||
parentComponentTemplate += `</div>`;
|
parentComponentTemplate += `</div>`;
|
||||||
const wrapper = mount(
|
const wrapper = mount({
|
||||||
{
|
data() {
|
||||||
data() {
|
return {
|
||||||
return {
|
value: mockData.initialValue ?? (mockData.isMultiSelect ? [] : ""),
|
||||||
value: mockData.initialValue ?? (mockData.isMultiSelect ? [] : ""),
|
$route: {
|
||||||
$route: {
|
query: {
|
||||||
query: {
|
fmgPage: "myPage",
|
||||||
fmgPage: "myPage",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
},
|
};
|
||||||
template: parentComponentTemplate,
|
|
||||||
components: { baseInputButtonWrapper },
|
|
||||||
},
|
},
|
||||||
);
|
template: parentComponentTemplate,
|
||||||
|
components: { baseInputButtonWrapper },
|
||||||
|
});
|
||||||
|
|
||||||
return { wrapper };
|
return { wrapper };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue