From c4c96c5c69846fb8eccc278c1eb20f94d69a2b99 Mon Sep 17 00:00:00 2001 From: Shyam Seshadri Date: Tue, 10 Aug 2010 13:42:50 -0700 Subject: Fix test breakage in Chrome. Chrome JQuery doesn't like malformed table html apparently --- src/scenario/DSL.js | 10 +++++----- test/scenario/DSLSpec.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scenario/DSL.js b/src/scenario/DSL.js index d57a61df..96447aaf 100644 --- a/src/scenario/DSL.js +++ b/src/scenario/DSL.js @@ -56,12 +56,12 @@ angular.scenario.dsl.repeater = function(selector) { var self = this; var doCollect = bind(this, function() { var repeaterArray = []; - this.testDocument.find(selector).each(function(index) { + this.testDocument.find(selector).each(function() { var element = angular.extend(self.jQuery(this), {bindings: [], boundTo: function(name) { return this.bindings[name]; }} ); - element.find('*').each(function(index) { + element.find('*').each(function() { var bindName = self.jQuery(this).attr('ng:bind'); if (bindName) { element.bindings[bindName] = self.jQuery(this).text(); @@ -85,10 +85,10 @@ angular.scenario.dsl.element = function(selector) { bindings: [], boundTo: function(name) { return this.bindings[name]; } }); - element.find('*').each(function(index) { - var bindName = self.jQuery(this).attr('ng:bind'); + element.find('*').each(function() { + var bindName = self.jQuery(elem).attr('ng:bind'); if (bindName) { - element.bindings[bindName] = self.jQuery(this).text(); + element.bindings[bindName] = self.jQuery(elem).text(); } }); done(element); diff --git a/test/scenario/DSLSpec.js b/test/scenario/DSLSpec.js index 374f49c8..62de9d6c 100644 --- a/test/scenario/DSLSpec.js +++ b/test/scenario/DSLSpec.js @@ -85,14 +85,14 @@ describe("DSL", function() { var html; beforeEach(function() { html = '
' + - '' + + '
' + 'Description : ' + 'Details...' + '' + 'Date created: ' + '01/01/01' + '' + - '
' + + '
' + ''; }); it('should find elements on the page and provide jquery api', function() { -- cgit v1.2.3