Remove obsolete scenario folder

* moved scenario e2e tests in test/scenario/e2e folder
* remove $location test
This commit is contained in:
Vojta Jina 2011-06-17 19:06:27 +02:00
parent e6ee994764
commit 92ebf11b2a
12 changed files with 4 additions and 163 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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"},
]
};

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -1,7 +1,7 @@
<!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="../../../build/angular-scenario.js" ng:autotest></script>
<script type="text/javascript" src="widgets-scenario.js"></script>
</head>
<body>

View file

@ -1,7 +1,7 @@
<!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="../../../src/scenario/angular-bootstrap.js" ng:autotest></script>
<script type="text/javascript" src="widgets-scenario.js"></script>
</head>
<body>

View file

@ -8,4 +8,4 @@ tr {
.redbox {
background-color: red;
}
}

View file

@ -46,10 +46,6 @@ describe('widgets', function() {
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.
*/

View file

@ -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="../src/angular-bootstrap.js" ng:autobind></script>
<script type="text/javascript" src="../../../src/angular-bootstrap.js" ng:autobind></script>
</head>
<body ng:init="$window.$scope = this">
<table>
@ -94,11 +94,6 @@
</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>