Fix unit tests and use trueLabel not onLabel to not confuse vue mocks
This commit is contained in:
parent
0e24bb01f4
commit
58dd3f2afe
3 changed files with 9 additions and 6 deletions
|
|
@ -20,12 +20,12 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
offLabel: {
|
falseLabel: {
|
||||||
required: false,
|
required: false,
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
onLabel: {
|
trueLabel: {
|
||||||
required: false,
|
required: false,
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
|
|
@ -36,10 +36,10 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
showStateLabel() {
|
showStateLabel() {
|
||||||
return this.onLabel !== undefined && this.offLabel !== undefined;
|
return this.trueLabel !== undefined && this.falseLabel !== undefined;
|
||||||
},
|
},
|
||||||
stateLabelText() {
|
stateLabelText() {
|
||||||
return this.modelValue ? this.onLabel : this.offLabel;
|
return this.modelValue ? this.trueLabel : this.falseLabel;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
<toggle-switch
|
<toggle-switch
|
||||||
v-model="saveToGallery"
|
v-model="saveToGallery"
|
||||||
label-text="Save to Gallery?"
|
label-text="Save to Gallery?"
|
||||||
on-label="Saving"
|
true-label="Saving"
|
||||||
off-label="Downloading"
|
false-label="Downloading"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="uk-margin">
|
<div class="uk-margin">
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,9 @@ export const componentOverrides = {
|
||||||
"matrixDisplay.vue": {
|
"matrixDisplay.vue": {
|
||||||
props: { matrix: [] },
|
props: { matrix: [] },
|
||||||
},
|
},
|
||||||
|
"toggleSwitch.vue": {
|
||||||
|
props: { modelValue: true },
|
||||||
|
},
|
||||||
"actionProgressBar.vue": {
|
"actionProgressBar.vue": {
|
||||||
props: { taskStatus: "" },
|
props: { taskStatus: "" },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue