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,
|
||||
default: undefined,
|
||||
},
|
||||
offLabel: {
|
||||
falseLabel: {
|
||||
required: false,
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
onLabel: {
|
||||
trueLabel: {
|
||||
required: false,
|
||||
type: String,
|
||||
default: undefined,
|
||||
|
|
@ -36,10 +36,10 @@ export default {
|
|||
|
||||
computed: {
|
||||
showStateLabel() {
|
||||
return this.onLabel !== undefined && this.offLabel !== undefined;
|
||||
return this.trueLabel !== undefined && this.falseLabel !== undefined;
|
||||
},
|
||||
stateLabelText() {
|
||||
return this.modelValue ? this.onLabel : this.offLabel;
|
||||
return this.modelValue ? this.trueLabel : this.falseLabel;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<toggle-switch
|
||||
v-model="saveToGallery"
|
||||
label-text="Save to Gallery?"
|
||||
on-label="Saving"
|
||||
off-label="Downloading"
|
||||
true-label="Saving"
|
||||
false-label="Downloading"
|
||||
/>
|
||||
|
||||
<div class="uk-margin">
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ export const componentOverrides = {
|
|||
"matrixDisplay.vue": {
|
||||
props: { matrix: [] },
|
||||
},
|
||||
"toggleSwitch.vue": {
|
||||
props: { modelValue: true },
|
||||
},
|
||||
"actionProgressBar.vue": {
|
||||
props: { taskStatus: "" },
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue