aboutsummaryrefslogtreecommitdiffstats
path: root/scenario/widgets-scenario.js
diff options
context:
space:
mode:
authorVojta Jina2011-06-17 19:06:27 +0200
committerVojta Jina2011-06-17 19:13:49 +0200
commit92ebf11b2aaaa357b7d3d91c297b747ae4b8fdf0 (patch)
tree43ea80bb929140512a189636493a47117d63aaa6 /scenario/widgets-scenario.js
parente6ee9947645c5cca9cf6efd902cae1a4a31ea13c (diff)
downloadangular.js-92ebf11b2aaaa357b7d3d91c297b747ae4b8fdf0.tar.bz2
Remove obsolete scenario folder
* moved scenario e2e tests in test/scenario/e2e folder * remove $location test
Diffstat (limited to 'scenario/widgets-scenario.js')
-rw-r--r--scenario/widgets-scenario.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/scenario/widgets-scenario.js b/scenario/widgets-scenario.js
deleted file mode 100644
index f5b923c3..00000000
--- a/scenario/widgets-scenario.js
+++ /dev/null
@@ -1,69 +0,0 @@
-describe('widgets', function() {
- it('should verify that basic widgets work', function(){
- browser().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');
-
- 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']);
-
- expect(binding('button').fromJson()).toEqual({'count': 0});
- expect(binding('form').fromJson()).toEqual({'count': 0});
-
- element('form a', "'action' link").click();
- expect(binding('button').fromJson()).toEqual({'count': 1});
-
- element('input[value="submit input"]', "'submit input' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 2});
- expect(binding('form').fromJson()).toEqual({'count': 1});
-
- element('button:contains("submit button")', "'submit button' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 2});
- expect(binding('form').fromJson()).toEqual({'count': 2});
-
- element('input[value="button"]', "'button' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 3});
-
- element('input[type="image"]', 'form image').click();
- expect(binding('button').fromJson()).toEqual({'count': 4});
-
- element('#navigate a', "'Go to #route' link").click();
- expect(binding('$location.hash')).toEqual('route');
- expect(browser().location().hash()).toEqual('route');
-
- /**
- * 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();
- expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: false});
- input('checkbox.tea').check();
- input('checkbox.tea').check();
- input('checkbox.tea').check();
- expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: true});
- });
-});