From 78f394fd17be581c84ecd526bb786ed1681d35cb Mon Sep 17 00:00:00 2001 From: Konstantin Stepanov Date: Tue, 18 Oct 2011 02:18:00 +0300 Subject: feat(input): add ng:minlength and ng:maxlength validation notes(igor): I also e2e tests and refactorred the e2e test example to be more clear about what is a variable and what is an html/framework api. --- test/widget/inputSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/widget/inputSpec.js') diff --git a/test/widget/inputSpec.js b/test/widget/inputSpec.js index 837d8c83..6524f1e3 100644 --- a/test/widget/inputSpec.js +++ b/test/widget/inputSpec.js @@ -550,6 +550,18 @@ describe('widget: input', function() { }); + itShouldVerify('text with ng:minlength limit', + ['', 'aaa', 'aaaaa', 'aaaaaaaaa'], + ['a', 'aa'], + {'ng:minlength': 3}); + + + itShouldVerify('text with ng:maxlength limit', + ['', 'a', 'aa', 'aaa'], + ['aaaa', 'aaaaa', 'aaaaaaaaa'], + {'ng:maxlength': 3}); + + it('should throw an error when scope pattern can\'t be found', function() { var el = jqLite(''), scope = angular.compile(el)(); -- cgit v1.2.3