aboutsummaryrefslogtreecommitdiffstats
path: root/scenario/widgets-scenario.js
diff options
context:
space:
mode:
authorMisko Hevery2010-10-19 15:34:58 -0700
committerMisko Hevery2010-10-19 15:56:53 -0700
commit01c7abab35dbdee711c54875424b388f8631a3c0 (patch)
tree00a4adee508a9e854881f7ecea5e779fb6d48a80 /scenario/widgets-scenario.js
parente7e894a2e36e042be6d62af56b0f3126f4e4fc77 (diff)
downloadangular.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/widgets-scenario.js')
-rw-r--r--scenario/widgets-scenario.js17
1 files changed, 9 insertions, 8 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();