diff options
| author | Andres Ornelas | 2010-10-27 11:29:51 -0700 |
|---|---|---|
| committer | Elliott Sprehn | 2010-10-28 15:21:02 -0700 |
| commit | 34909520ae4b20ddf455adf72de8473e43cac1c6 (patch) | |
| tree | a574e06d513f341e93551d52f0010e60adb0143a /scenario/widgets-scenario.js | |
| parent | 92e31b556fcaeea7e7078c63729287dbdfcf09ff (diff) | |
| download | angular.js-34909520ae4b20ddf455adf72de8473e43cac1c6.tar.bz2 | |
add optional label to dsl with selectors to improve test and output readability
e.g.
Before:
code: element('.actions ul li a').click();
output: element .actions ul li a click
After
code: element('.actions ul li a', "'Configuration' link").click();
output: element 'Configuration' link ( .actions ul li a ) click
Diffstat (limited to 'scenario/widgets-scenario.js')
| -rw-r--r-- | scenario/widgets-scenario.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scenario/widgets-scenario.js b/scenario/widgets-scenario.js index 7e8b8ade..cf482d46 100644 --- a/scenario/widgets-scenario.js +++ b/scenario/widgets-scenario.js @@ -29,24 +29,24 @@ describe('widgets', function() { expect(binding('button').fromJson()).toEqual({'count': 0}); expect(binding('form').fromJson()).toEqual({'count': 0}); - element('form a').click(); + element('form a', "'action' link").click(); expect(binding('button').fromJson()).toEqual({'count': 1}); - element('input[value="submit input"]').click(); + 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")').click(); + 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"]').click(); + element('input[value="button"]', "'button' button").click(); expect(binding('button').fromJson()).toEqual({'count': 3}); - element('input[type="image"]').click(); + element('input[type="image"]', 'form image').click(); expect(binding('button').fromJson()).toEqual({'count': 4}); - element('#navigate a').click(); + element('#navigate a', "'Go to #route' link").click(); expect(binding('$location.hash')).toEqual('route'); /** |
