aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario
diff options
context:
space:
mode:
authorIgor Minar2012-03-09 00:00:05 -0800
committerIgor Minar2012-03-09 16:14:26 -0800
commitf4d338d393dabb49182d40b4fe90c4d1b51621c0 (patch)
tree6c20fbef9865869e9db44f27c53aec11f1e30d5e /test/scenario
parent0bfaa579c04d1b7cd21fbe16bfbc47a684f223b3 (diff)
downloadangular.js-f4d338d393dabb49182d40b4fe90c4d1b51621c0.tar.bz2
chore(*): refactor all ng: to ng-
Diffstat (limited to 'test/scenario')
-rw-r--r--test/scenario/dslSpec.js48
-rw-r--r--test/scenario/e2e/Runner-compiled.html2
-rw-r--r--test/scenario/e2e/Runner.html2
-rw-r--r--test/scenario/e2e/widgets.html40
4 files changed, 46 insertions, 46 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index d085256c..0a8ab762 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -215,40 +215,40 @@ describe("angular.scenario.dsl", function() {
describe('Select', function() {
it('should select single option', function() {
doc.append(
- '<select ng:model="test">' +
+ '<select ng-model="test">' +
' <option value=A>one</option>' +
' <option value=B selected>two</option>' +
'</select>'
);
$root.dsl.select('test').option('A');
- expect(doc.find('[ng\\:model="test"]').val()).toEqual('A');
+ expect(doc.find('[ng-model="test"]').val()).toEqual('A');
});
it('should select option by name', function() {
doc.append(
- '<select ng:model="test">' +
+ '<select ng-model="test">' +
' <option value=A>one</option>' +
' <option value=B selected>two</option>' +
'</select>'
);
$root.dsl.select('test').option('one');
- expect(doc.find('[ng\\:model="test"]').val()).toEqual('A');
+ expect(doc.find('[ng-model="test"]').val()).toEqual('A');
});
it('should select multiple options', function() {
doc.append(
- '<select ng:model="test" multiple>' +
+ '<select ng-model="test" multiple>' +
' <option>A</option>' +
' <option selected>B</option>' +
' <option>C</option>' +
'</select>'
);
$root.dsl.select('test').options('A', 'B');
- expect(doc.find('[ng\\:model="test"]').val()).toEqual(['A','B']);
+ expect(doc.find('[ng-model="test"]').val()).toEqual(['A','B']);
});
it('should fail to select multiple options on non-multiple select', function() {
- doc.append('<select ng:model="test"></select>');
+ doc.append('<select ng-model="test"></select>');
$root.dsl.select('test').options('A', 'B');
expect($root.futureError).toMatch(/did not match/);
});
@@ -468,13 +468,13 @@ describe("angular.scenario.dsl", function() {
});
it('should select binding by name', function() {
- compile('<span ng:bind=" foo.bar "></span>');
+ compile('<span ng-bind=" foo.bar "></span>');
$root.dsl.binding('foo.bar');
expect($root.futureResult).toEqual('some value');
});
it('should select binding by regexp', function() {
- compile('<span ng:bind="foo.bar">some value</span>');
+ compile('<span ng-bind="foo.bar">some value</span>');
$root.dsl.binding(/^foo\..+/);
expect($root.futureResult).toEqual('some value');
});
@@ -486,13 +486,13 @@ describe("angular.scenario.dsl", function() {
});
it('should select binding in template by name', function() {
- compile('<pre ng:bind-template="foo {{foo.bar}} baz"></pre>', 'bar');
+ compile('<pre ng-bind-template="foo {{foo.bar}} baz"></pre>', 'bar');
$root.dsl.binding('foo.bar');
expect($root.futureResult).toEqual('bar');
});
it('should match bindings by substring match', function() {
- compile('<pre ng:bind="foo.bar | filter"></pre>', 'binding value');
+ compile('<pre ng-bind="foo.bar | filter"></pre>', 'binding value');
$root.dsl.binding('foo . bar');
expect($root.futureResult).toEqual('binding value');
});
@@ -503,7 +503,7 @@ describe("angular.scenario.dsl", function() {
});
it('should return error if no binding matches', function() {
- compile('<span ng:bind="foo">some value</span>');
+ compile('<span ng-bind="foo">some value</span>');
$root.dsl.binding('foo.bar');
expect($root.futureError).toMatch(/did not match/);
});
@@ -513,12 +513,12 @@ describe("angular.scenario.dsl", function() {
it('should prefix selector in $document.elements()', function() {
var chain;
doc.append(
- '<div id="test1"><input ng:model="test.input" value="something"></div>' +
- '<div id="test2"><input ng:model="test.input" value="something"></div>'
+ '<div id="test1"><input ng-model="test.input" value="something"></div>' +
+ '<div id="test2"><input ng-model="test.input" value="something"></div>'
);
chain = $root.dsl.using('div#test2');
chain.input('test.input').enter('foo');
- var inputs = _jQuery('input[ng\\:model="test.input"]');
+ var inputs = _jQuery('input[ng-model="test.input"]');
expect(inputs.first().val()).toEqual('something');
expect(inputs.last().val()).toEqual('foo');
});
@@ -537,10 +537,10 @@ describe("angular.scenario.dsl", function() {
describe('Input', function() {
it('should change value in text input', function() {
- doc.append('<input ng:model="test.input" value="something">');
+ doc.append('<input ng-model="test.input" value="something">');
var chain = $root.dsl.input('test.input');
chain.enter('foo');
- expect(_jQuery('input[ng\\:model="test.input"]').val()).toEqual('foo');
+ expect(_jQuery('input[ng-model="test.input"]').val()).toEqual('foo');
});
it('should change value in text input in dash form', function() {
@@ -557,16 +557,16 @@ describe("angular.scenario.dsl", function() {
});
it('should toggle checkbox state', function() {
- doc.append('<input type="checkbox" ng:model="test.input" checked>');
- expect(_jQuery('input[ng\\:model="test.input"]').
+ doc.append('<input type="checkbox" ng-model="test.input" checked>');
+ expect(_jQuery('input[ng-model="test.input"]').
prop('checked')).toBe(true);
var chain = $root.dsl.input('test.input');
chain.check();
- expect(_jQuery('input[ng\\:model="test.input"]').
+ expect(_jQuery('input[ng-model="test.input"]').
prop('checked')).toBe(false);
$window.angular.reset();
chain.check();
- expect(_jQuery('input[ng\\:model="test.input"]').
+ expect(_jQuery('input[ng-model="test.input"]').
prop('checked')).toBe(true);
});
@@ -603,7 +603,7 @@ describe("angular.scenario.dsl", function() {
describe('val', function() {
it('should return value in text input', function() {
- doc.append('<input ng:model="test.input" value="something">');
+ doc.append('<input ng-model="test.input" value="something">');
$root.dsl.input('test.input').val();
expect($root.futureResult).toEqual("something");
});
@@ -613,10 +613,10 @@ describe("angular.scenario.dsl", function() {
describe('Textarea', function() {
it('should change value in textarea', function() {
- doc.append('<textarea ng:model="test.textarea">something</textarea>');
+ doc.append('<textarea ng-model="test.textarea">something</textarea>');
var chain = $root.dsl.input('test.textarea');
chain.enter('foo');
- expect(_jQuery('textarea[ng\\:model="test.textarea"]').val()).toEqual('foo');
+ expect(_jQuery('textarea[ng-model="test.textarea"]').val()).toEqual('foo');
});
it('should return error if no textarea exists', function() {
diff --git a/test/scenario/e2e/Runner-compiled.html b/test/scenario/e2e/Runner-compiled.html
index c3a55f4d..530fef96 100644
--- a/test/scenario/e2e/Runner-compiled.html
+++ b/test/scenario/e2e/Runner-compiled.html
@@ -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>
diff --git a/test/scenario/e2e/Runner.html b/test/scenario/e2e/Runner.html
index 387973db..1191dc86 100644
--- a/test/scenario/e2e/Runner.html
+++ b/test/scenario/e2e/Runner.html
@@ -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>
diff --git a/test/scenario/e2e/widgets.html b/test/scenario/e2e/widgets.html
index 40ba0a3a..f986144e 100644
--- a/test/scenario/e2e/widgets.html
+++ b/test/scenario/e2e/widgets.html
@@ -1,10 +1,10 @@
<!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 ng:app>
+ <head ng-app>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script type="text/javascript" src="../../../src/angular-bootstrap.js"></script>
</head>
- <body ng:init="$window.$scope = this">
+ <body ng-init="$window.$scope = this">
<table>
<tr>
<th width="330">Description</th>
@@ -15,34 +15,34 @@
<tr>
<td>basic</td>
<td id="text-basic-box">
- <input type="text" ng:model="text.basic"/>
+ <input type="text" ng-model="text.basic"/>
</td>
<td>text.basic={{text.basic}}</td>
</tr>
<tr>
<td>password</td>
- <td><input type="password" ng:model="text.password" /></td>
+ <td><input type="password" ng-model="text.password" /></td>
<td>text.password={{text.password}}</td>
</tr>
<tr>
<td>hidden</td>
- <td><input type="hidden" ng:model="text.hidden" value="hiddenValue" /></td>
+ <td><input type="hidden" ng-model="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" ng:model="gender" value="female"/> Female <br/>
- <input type="radio" ng:model="gender" value="male" checked="checked"/> Male
+ <input type="radio" ng-model="gender" value="female"/> Female <br/>
+ <input type="radio" ng-model="gender" value="male" checked="checked"/> Male
</td>
<td>gender={{gender}}</td>
</tr>
<tr>
<td>checkbox</td>
<td>
- <input type="checkbox" ng:model="checkbox.tea" checked value="on"/> Tea<br/>
- <input type="checkbox" ng:model="checkbox.coffee" value="on"/> Coffe
+ <input type="checkbox" ng-model="checkbox.tea" checked value="on"/> Tea<br/>
+ <input type="checkbox" ng-model="checkbox.coffee" value="on"/> Coffe
</td>
<td>
<pre>checkbox={{checkbox}}</pre>
@@ -51,7 +51,7 @@
<tr>
<td>select</td>
<td>
- <select ng:model="select">
+ <select ng-model="select">
<option>A</option>
<option>B</option>
<option>C</option>
@@ -62,7 +62,7 @@
<tr>
<td>multiselect</td>
<td>
- <select ng:model="multiselect" multiple>
+ <select ng-model="multiselect" multiple>
<option>A</option>
<option>B</option>
<option>C</option>
@@ -72,24 +72,24 @@
</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/>
+ <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>
+ <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>ng-repeat</td>
<td>
<ul>
- <li ng:repeat="name in ['misko', 'adam']">{{name}}</li>
+ <li ng-repeat="name in ['misko', 'adam']">{{name}}</li>
</ul>
</td>
<td></td>