mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
feat(testability): add $$testability service
The $$testability service is a collection of methods for use when debugging or by automated testing tools. It is available globally through the function `angular.getTestability`. For reference, see the Angular.Dart version at https://github.com/angular/angular.dart/pull/1191
This commit is contained in:
@@ -38,7 +38,9 @@ the method from your view. If you want to `eval()` an Angular expression yoursel
|
||||
## Example
|
||||
<example>
|
||||
<file name="index.html">
|
||||
1+2={{1+2}}
|
||||
<span>
|
||||
1+2={{1+2}}
|
||||
</span>
|
||||
</file>
|
||||
|
||||
<file name="protractor.js" type="protractor">
|
||||
|
||||
@@ -50,7 +50,7 @@ I'm in a hurry. How do I get a Hello World module working?
|
||||
|
||||
<file name="protractor.js" type="protractor">
|
||||
it('should add Hello to the name', function() {
|
||||
expect(element(by.binding(" 'World' | greet ")).getText()).toEqual('Hello, World!');
|
||||
expect(element(by.binding("'World' | greet")).getText()).toEqual('Hello, World!');
|
||||
});
|
||||
</file>
|
||||
</example>
|
||||
@@ -128,7 +128,7 @@ The above is a suggestion. Tailor it to your needs.
|
||||
|
||||
<file name="protractor.js" type="protractor">
|
||||
it('should add Hello to the name', function() {
|
||||
expect(element(by.binding(" greeting ")).getText()).toEqual('Bonjour World!');
|
||||
expect(element(by.binding("greeting")).getText()).toEqual('Bonjour World!');
|
||||
});
|
||||
</file>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user