From 9a532002cf490a3e26a827e2eab9c1c3d834e2b8 Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Fri, 29 Oct 2010 12:19:22 -0700 Subject: Auto generate all the jQuery get/set methods --- test/scenario/dslSpec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/scenario/dslSpec.js') diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js index 50d37961..ecb5d3e7 100644 --- a/test/scenario/dslSpec.js +++ b/test/scenario/dslSpec.js @@ -215,6 +215,17 @@ describe("angular.scenario.dsl", function() { expect(doc.find('input').val()).toEqual('baz'); }); + it('should add all jQuery property methods', function() { + var METHODS = [ + 'val', 'text', 'html', 'height', 'innerHeight', 'outerHeight', 'width', + 'innerWidth', 'outerWidth', 'position', 'scrollLeft', 'scrollTop', 'offset' + ]; + var chain = $root.dsl.element('input'); + angular.foreach(METHODS, function(name) { + expect(angular.isFunction(chain[name])).toBeTruthy(); + }); + }); + it('should execute custom query', function() { doc.append(''); $root.dsl.element('#test').query(function(elements, done) { -- cgit v1.2.3