Skip to content

Commit 79bfee6

Browse files
author
Lionel Bijaoui
committed
fix: re-added placeholder in field password and number (and corresponding test)
1 parent c645cea commit 79bfee6

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/fields/fieldNumber.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="jade">
2-
input.form-control(type="number", v-model="value", number, :autocomplete="schema.autocomplete", :disabled="disabled", :max="schema.max", :min="schema.min", :readonly="schema.readonly")
2+
input.form-control(type="number", v-model="value", number, :autocomplete="schema.autocomplete", :disabled="disabled", :max="schema.max", :min="schema.min", :placeholder="schema.placeholder", :readonly="schema.readonly")
33
</template>
44

55
<script>

src/fields/fieldPassword.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang="jade">
2-
input.form-control(type="password", v-model="value", :autocomplete="schema.autocomplete", :disabled="disabled", :readonly="schema.readonly")
2+
input.form-control(type="password", v-model="value", :autocomplete="schema.autocomplete", :disabled="disabled", :placeholder="schema.placeholder", :readonly="schema.readonly")
33
</template>
44

55
<script>

test/unit/specs/fields/fieldNumber.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ describe("fieldNumber.vue", function() {
3939
expect(input).to.be.defined;
4040
expect(input.type).to.be.equal("number");
4141
expect(input.classList.contains("form-control")).to.be.true;
42+
expect(input.placeholder).to.be.equal(schema.placeholder);
4243
expect(input.readOnly).to.be.false;
4344
expect(input.min).to.be.equal("18");
4445
expect(input.max).to.be.equal("100");

test/unit/specs/fields/fieldPassword.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe("fieldPassword.vue", function() {
3838
expect(input).to.be.defined;
3939
expect(input.type).to.be.equal("password");
4040
expect(input.classList.contains("form-control")).to.be.true;
41+
expect(input.placeholder).to.be.equal(schema.placeholder);
4142
expect(input.readOnly).to.be.false;
4243
expect(input.disabled).to.be.false;
4344
});

0 commit comments

Comments
 (0)