diff options
| author | Misko Hevery | 2010-10-19 15:34:58 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-10-19 15:56:53 -0700 |
| commit | 01c7abab35dbdee711c54875424b388f8631a3c0 (patch) | |
| tree | 00a4adee508a9e854881f7ecea5e779fb6d48a80 /scenario | |
| parent | e7e894a2e36e042be6d62af56b0f3126f4e4fc77 (diff) | |
| download | angular.js-01c7abab35dbdee711c54875424b388f8631a3c0.tar.bz2 | |
Fix browser triggering in scenario to always do native events.
- Also fixed angular.suffix for scenarios
- refactored click() to browserTrigger()
- Fixed Rakefile with CSS and jQuery
Diffstat (limited to 'scenario')
| -rw-r--r-- | scenario/widgets-scenario.js | 17 | ||||
| -rw-r--r-- | scenario/widgets.html | 2 |
2 files changed, 10 insertions, 9 deletions
diff --git a/scenario/widgets-scenario.js b/scenario/widgets-scenario.js index befc481c..0cb189f7 100644 --- a/scenario/widgets-scenario.js +++ b/scenario/widgets-scenario.js @@ -1,17 +1,17 @@ describe('widgets', function() { it('should verify that basic widgets work', function(){ navigateTo('widgets.html'); - + using('#text-basic-box').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(using('#gender-box').binding('gender')).toEqual('female'); @@ -19,10 +19,11 @@ describe('widgets', function() { expect(repeater('#repeater-row ul li').count()).toEqual(2); expect(repeater('#repeater-row ul li').row(1)).toEqual(['adam']); expect(repeater('#repeater-row ul li').column('name')).toEqual(['misko', 'adam']); - + select('select').option('B'); expect(binding('select')).toEqual('B'); - + + select('multiselect').options('A', 'C'); expect(binding('multiselect').fromJson()).toEqual(['A', 'C']); @@ -35,14 +36,14 @@ describe('widgets', function() { expect(binding('button').fromJson()).toEqual({'count': 3}); element('input[type="image"]').click(); expect(binding('button').fromJson()).toEqual({'count': 4}); - + /** * Custom value parser for futures. */ function checkboxParser(value) { return angular.fromJson(value.substring(value.indexOf('=')+1)); } - + input('checkbox.tea').check(); expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: false, tea: false}); input('checkbox.coffee').check(); diff --git a/scenario/widgets.html b/scenario/widgets.html index 80a0a22f..8960f5f4 100644 --- a/scenario/widgets.html +++ b/scenario/widgets.html @@ -2,7 +2,7 @@ <html xmlns:ng="http://angularjs.org"> <head> <link rel="stylesheet" type="text/css" href="style.css"/> - <script type="text/javascript" src="../lib/jquery/jquery-1.4.2.js"></script> + <script type="text/javascript" src="../libs/jquery/jquery-1.4.2.js"></script> <script type="text/javascript" src="../src/angular-bootstrap.js" ng:autobind></script> </head> <body ng:init="$window.$scope = this"> |
