aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/dslSpec.js
diff options
context:
space:
mode:
authorElliott Sprehn2010-10-29 12:19:22 -0700
committerElliott Sprehn2010-10-29 12:19:22 -0700
commit9a532002cf490a3e26a827e2eab9c1c3d834e2b8 (patch)
treeb399736d322dc40523b64d56d6b4b9f9bcb9a867 /test/scenario/dslSpec.js
parent5524d2b0fb9b87ef0d1beec092337f836a1043a8 (diff)
downloadangular.js-9a532002cf490a3e26a827e2eab9c1c3d834e2b8.tar.bz2
Auto generate all the jQuery get/set methods
Diffstat (limited to 'test/scenario/dslSpec.js')
-rw-r--r--test/scenario/dslSpec.js11
1 files changed, 11 insertions, 0 deletions
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('<a id="test" href="http://example.com/myUrl"></a>');
$root.dsl.element('#test').query(function(elements, done) {