diff options
Diffstat (limited to 'scenario')
| -rw-r--r-- | scenario/Runner-compiled.html | 9 | ||||
| -rw-r--r-- | scenario/Runner.html | 9 | ||||
| -rw-r--r-- | scenario/application-account.html | 6 | ||||
| -rw-r--r-- | scenario/application.html | 34 | ||||
| -rw-r--r-- | scenario/browser.html | 22 | ||||
| -rw-r--r-- | scenario/datastore-scenarios.js | 19 | ||||
| -rw-r--r-- | scenario/datastore.html | 17 | ||||
| -rw-r--r-- | scenario/location.html | 19 | ||||
| -rw-r--r-- | scenario/perf.html | 33 | ||||
| -rw-r--r-- | scenario/style.css | 11 | ||||
| -rw-r--r-- | scenario/widgets-scenario.js | 69 | ||||
| -rw-r--r-- | scenario/widgets.html | 104 |
12 files changed, 0 insertions, 352 deletions
diff --git a/scenario/Runner-compiled.html b/scenario/Runner-compiled.html deleted file mode 100644 index 78cd7e57..00000000 --- a/scenario/Runner-compiled.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <script type="text/javascript" src="../build/angular-scenario.js" ng:autotest></script> - <script type="text/javascript" src="widgets-scenario.js"></script> - </head> - <body> - </body> -</html> diff --git a/scenario/Runner.html b/scenario/Runner.html deleted file mode 100644 index fa3ccf23..00000000 --- a/scenario/Runner.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <script type="text/javascript" src="../src/scenario/angular-bootstrap.js" ng:autotest></script> - <script type="text/javascript" src="widgets-scenario.js"></script> - </head> - <body> - </body> -</html> diff --git a/scenario/application-account.html b/scenario/application-account.html deleted file mode 100644 index 81176df7..00000000 --- a/scenario/application-account.html +++ /dev/null @@ -1,6 +0,0 @@ -<div ng:controller="AccountController"> -account page goes here! - <input type="text" name="name" value="misko"/> - <button ng:click="hello()">hello</button> -</div> - diff --git a/scenario/application.html b/scenario/application.html deleted file mode 100644 index 5d5bb809..00000000 --- a/scenario/application.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <link rel="stylesheet" type="text/css" href="style.css"></link> - <script type="text/javascript" src="../src/angular-bootstrap.js#autobind"></script> - <script> - function AccountController(){ - } - - AccountController.prototype = { - hello: function(){ - alert(this.name); - } - - }; - - </script> - </head> - <body ng:init="$window.$scope = this"> - [ <a href="#login">login</a> - | <a href="#account">account</a> - ] - - <ng:switch on="$location.hashPath"> - <div ng:switch-when="login">login screen</div> - <ng:include ng:switch-when="account" src="'application-account.html'"></ng:include> - </ng:switch> - - - (( input name )) - - <pre>$location={{$location}}</pre> - </body> - </html> diff --git a/scenario/browser.html b/scenario/browser.html deleted file mode 100644 index eac43692..00000000 --- a/scenario/browser.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html xmlns:ng="http://angularjs.org"> - <head> - <script type="text/javascript" src="../src/angular-bootstrap.js" ng:autobind></script> - </head> - <body ng:init="$window.$scope = this"> - - <h1>Should mark input field red and create hover</h1> - <input type="text" name="name" ng:required/> - - <h1>Should reflect changes in URL</h1> - <pre>$location={{$location}}</pre> - hash: <input type="text" name="$location.hash"/> <br/> - hashPath: <input type="text" name="$location.hashPath"/> <br/> - hashSearch: <input type="text" name="$location.hashSearch" ng:format="json"/> <br/> - - <h1>Should reflect changes in Cookie</h1> - <pre>$cookies={{$cookies}}</pre> - $cookies: <input type="text" name="$cookies" ng:format="json"/> <br/> - - </body> - </html> diff --git a/scenario/datastore-scenarios.js b/scenario/datastore-scenarios.js deleted file mode 100644 index a844ac53..00000000 --- a/scenario/datastore-scenarios.js +++ /dev/null @@ -1,19 +0,0 @@ -angular.scenarioDef.datastore = { - $before:[ - {Given:"dataset", - dataset:{ - Book:[{$id:'moby', name:"Moby Dick"}, - {$id:'gadsby', name:'Great Gadsby'}] - } - }, - {Given:"browser", at:"datastore.html#book=moby"}, - ], - checkLoadBook:[ - {Then:"drainRequestQueue"}, - - {Then:"text", at:"{{book.$id}}", should_be:"moby"}, - {Then:"text", at:"li[$index=0] {{book.name}}", should_be:"Great Gahdsby"}, - {Then:"text", at:"li[$index=0] {{book.name}}", should_be:"Moby Dick"}, - - ] -}; diff --git a/scenario/datastore.html b/scenario/datastore.html deleted file mode 100644 index 1720b3bc..00000000 --- a/scenario/datastore.html +++ /dev/null @@ -1,17 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <script type="text/javascript" src="../lib/underscore/underscore.js"></script> - <script type="text/javascript" src="../lib/jquery/jquery-1.3.2.js"></script> - <script type="text/javascript" src="../src/angular-bootstrap.js"></script> - <script type="text/javascript"> - $(document).ready(function(){angular.compile(document).init();}); - </script> - </head> - <body ng-entity="book=Book" ng:init="books=Book.all()"> - <p>{{book.$id}}</p> - <li ng:repeat="book in books.$orderBy('name')"> - <li>{{book.name}}</li> - </li> - </body> - </html> diff --git a/scenario/location.html b/scenario/location.html deleted file mode 100644 index 75041615..00000000 --- a/scenario/location.html +++ /dev/null @@ -1,19 +0,0 @@ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <link rel="stylesheet" type="text/css" href="style.css"/> - <script type="text/javascript" src="../src/angular-bootstrap.js#autobind"></script> - </head> - <body ng:init="$window.$scope = this"> - <pre>$location={{$location}}</pre> - Hash Search: - <ul> - <li ng:repeat="(key, value) in $location.hashSearch"><tt>{{key}}={{value}}</tt></li> - </ul> - <hr/> - href: <input type="text" name="$location.href" size="120"/> <br/> - hash: <input type="text" name="$location.hash" size="120"/> <br/> - hashPath: <input type="text" name="$location.hashPath" size="120"/> <br/> - hashSearch: <input type="text" name="$location.hashSearch" size="120" ng:format="json"/> <br/> - </body> - </html> diff --git a/scenario/perf.html b/scenario/perf.html deleted file mode 100644 index 94af8b69..00000000 --- a/scenario/perf.html +++ /dev/null @@ -1,33 +0,0 @@ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> - <link rel="stylesheet" type="text/css" href="style.css"/> - <script type="text/javascript" src="../src/angular-bootstrap.js#autobind"></script> - <script type="text/javascript"> - function PerfCntl(){} - PerfCntl.prototype = { - createItems: function(){ - var items = []; - for ( var i = 0; i < 100; i++) { - var item = { - name: "" + Math.random(), - parts: [Math.random(), Math.random()] - }; - items.push(item); - } - return items; - } - }; - </script> - </head> - <body ng:init="$window.$scope = this; items = createItems()" ng:controller="PerfCntl"> - <input type="text" name="text"/> - <hr/> - <ul> - <li Xng:repeat="item in items.$filter('').$orderBy('name')" - ng:repeat="item in items"> - {{item.name}} <a href="#{{item.name}}">{{item.parts.join(', ')}}</a> - </li> - </ul> - </body> - </html> diff --git a/scenario/style.css b/scenario/style.css deleted file mode 100644 index 43690e2c..00000000 --- a/scenario/style.css +++ /dev/null @@ -1,11 +0,0 @@ -th { - text-align: left; -} - -tr { - border: 1px solid black; -} - -.redbox { - background-color: red; -}
\ No newline at end of file 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}); - }); -}); diff --git a/scenario/widgets.html b/scenario/widgets.html deleted file mode 100644 index adf2fa27..00000000 --- a/scenario/widgets.html +++ /dev/null @@ -1,104 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns:ng="http://angularjs.org"> - <head> - <link rel="stylesheet" type="text/css" href="style.css"/> - <script type="text/javascript" src="../src/angular-bootstrap.js" ng:autobind></script> - </head> - <body ng:init="$window.$scope = this"> - <table> - <tr> - <th width="330">Description</th> - <th>Test</th> - <th>Result</th> - </tr> - <tr><th colspan="3">Input text field</th></tr> - <tr> - <td>basic</td> - <td id="text-basic-box"> - <input type="text" name="text.basic"/> - </td> - <td>text.basic={{text.basic}}</td> - </tr> - <tr> - <td>password</td> - <td><input type="password" name="text.password" /></td> - <td>text.password={{text.password}}</td> - </tr> - <tr> - <td>hidden</td> - <td><input type="hidden" name="text.hidden" value="hiddenValue" /></td> - <td>text.hidden={{text.hidden}}</td> - </tr> - <tr><th colspan="3">Input selection field</th></tr> - <tr id="gender-box"> - <td>radio</td> - <td> - <input type="radio" name="gender" value="female"/> Female <br/> - <input type="radio" name="gender" value="male" checked="checked"/> Male - </td> - <td>gender={{gender}}</td> - </tr> - <tr> - <td>checkbox</td> - <td> - <input type="checkbox" name="checkbox.tea" checked value="on"/> Tea<br/> - <input type="checkbox" name="checkbox.coffee" value="on"/> Coffe - </td> - <td> - <pre>checkbox={{checkbox}}</pre> - </td> - </tr> - <tr> - <td>select</td> - <td> - <select name="select"> - <option>A</option> - <option>B</option> - <option>C</option> - </select> - </td> - <td>select={{select}}</td> - </tr> - <tr> - <td>multiselect</td> - <td> - <select name="multiselect" multiple> - <option>A</option> - <option>B</option> - <option>C</option> - </select> - </td> - <td>multiselect={{multiselect}}</td> - </tr> - <tr><th colspan="3">Buttons</th></tr> - <tr> - <td>ng:change<br/>ng:click</td> - <td ng:init="button.count = 0; form.count = 0;"> - <form ng:submit="form.count = form.count + 1"> - <input type="button" value="button" ng:change="button.count = button.count + 1"/> <br/> - <input type="submit" value="submit input" ng:change="button.count = button.count + 1"/><br/> - <button type="submit">submit button</button> - <input type="image" src="" ng:change="button.count = button.count + 1"/><br/> - <a href="" ng:click="button.count = button.count + 1">action</a> - </form> - </td> - <td>button={{button}} form={{form}}</td> - </tr> - <tr><th colspan="3">Repeaters</th></tr> - <tr id="repeater-row"> - <td>ng:repeat</td> - <td> - <ul> - <li ng:repeat="name in ['misko', 'adam']">{{name}}</li> - </ul> - </td> - <td></td> - </tr> - <tr id="navigate"> - <td>navigate</td> - <td><a href="#route">Go to #route</td> - <td>{{$location.hash}}</td> - </tr> - </table> - </body> - </html> |
