Skip to content

Commit 2009272

Browse files
author
Kabelo
committed
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit. # On branch show-label-for-image-input # Changes to be committed: # modified: dist/vfg-core.js # modified: dist/vfg.js # modified: src/formGenerator.vue # modified: test/unit/specs/VueFormGenerator.spec.js # Fix to show label for image input src/formGenerator.vue - removed 'case "image":' in line 215, fieldTypeHasLabel method. test/unit/specs/VueFormGenerator.spec.js - made the test pass for image with a label.
1 parent fc2983b commit 2009272

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

dist/vfg-core.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vfg.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/formGenerator.vue

-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ div.vue-form-generator(v-if='schema != null')
212212
213213
switch (relevantType) {
214214
case "button":
215-
case "image":
216215
case "submit":
217216
case "reset":
218217
return false;

test/unit/specs/VueFormGenerator.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,11 @@ describe("VueFormGenerator.vue", () => {
10321032
expect(form.fieldTypeHasLabel({ type: "input", inputType: "checkbox"})).to.be.true;
10331033
expect(form.fieldTypeHasLabel({ type: "input", inputType: "text"})).to.be.true;
10341034
expect(form.fieldTypeHasLabel({ type: "checklist" })).to.be.true;
1035+
expect(form.fieldTypeHasLabel({ type: "input", inputType: "image"})).to.be.true;
10351036
});
10361037

10371038
it("should return false", () => {
10381039
expect(form.fieldTypeHasLabel({ type: "input", inputType: "button"})).to.be.false;
1039-
expect(form.fieldTypeHasLabel({ type: "input", inputType: "image"})).to.be.false;
10401040
expect(form.fieldTypeHasLabel({ type: "input", inputType: "submit"})).to.be.false;
10411041
expect(form.fieldTypeHasLabel({ type: "input", inputType: "reset"})).to.be.false;
10421042
});

0 commit comments

Comments
 (0)