Commit b71d3493 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '199182-form-validation-for-wip-limits' into 'master'

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

See merge request gitlab-org/gitlab!26179
parents 2f177c1b dbfac4f8
...@@ -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