Commit dbfac4f8 authored by Donald Cook's avatar Donald Cook Committed by Natalia Tepluhina

Prevent non decimal, non numerical, non negative entry of limit

parent eb25d62e
...@@ -212,6 +212,9 @@ export default { ...@@ -212,6 +212,9 @@ export default {
:disabled="updating" :disabled="updating"
:placeholder="$options.inputPlaceholderText" :placeholder="$options.inputPlaceholderText"
trim trim
number
type="number"
min="0"
@input="handleWipLimitChange" @input="handleWipLimitChange"
@keydown.enter.native="onEnter" @keydown.enter.native="onEnter"
@blur="offFocus" @blur="offFocus"
......
...@@ -501,5 +501,19 @@ describe('BoardSettingsSideBar', () => { ...@@ -501,5 +501,19 @@ describe('BoardSettingsSideBar', () => {
}); });
}); });
}); });
describe('passing of props to gl-form-input', () => {
beforeEach(() => {
createComponent({ activeListId: listId }, { updateListWipLimit: () => {} }, { edit: true });
});
it('passes `trim`', () => {
expect(wrapper.find(GlFormInput).attributes().trim).toBeDefined();
});
it('passes `number`', () => {
expect(wrapper.find(GlFormInput).attributes().number).toBeDefined();
});
});
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment