From 03df6cbddbb80186caf571e29957370b2ef9881c Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Fri, 8 Oct 2010 16:43:40 -0700 Subject: New Angular Scenario runner and DSL system with redesigned HTML UI. Uses the Jasmine syntax for tests, ex: describe('widgets', function() { it('should verify that basic widgets work', function(){ navigateTo('widgets.html'); input('text.basic').enter('Carlos'); expect(binding('text.basic')).toEqual('Carlos'); input('text.basic').enter('Carlos Santana'); expect(binding('text.basic')).not().toEqual('Carlos Boozer'); input('text.password').enter('secret'); expect(binding('text.password')).toEqual('secret'); expect(binding('text.hidden')).toEqual('hiddenValue'); expect(binding('gender')).toEqual('male'); input('gender').select('female'); expect(binding('gender')).toEqual('female'); }); }); Note: To create new UI's implement the interface shown in angular.scenario.ui.Html. --- src/Angular.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Angular.js') diff --git a/src/Angular.js b/src/Angular.js index 95970850..72f341f3 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -270,11 +270,11 @@ function equals(o1, o2) { } else { keySet = {}; for(key in o1) { - if (key.charAt(0) !== '$' && !equals(o1[key], o2[key])) return false; + if (key.charAt(0) !== '$' && !isFunction(o1[key]) && !equals(o1[key], o2[key])) return false; keySet[key] = true; } for(key in o2) { - if (key.charAt(0) !== '$' && keySet[key] !== true) return false; + if (!keySet[key] && key.charAt(0) !== '$' && !isFunction(o2[key])) return false; } return true; } -- cgit v1.2.3