Permalink
Browse files
docs(guide/directives): improve Protractor test for bindings
This needs Protractor >= 1.3.0 to work.
Closes #9330
- Loading branch information
Showing
with
7 additions
and
2 deletions.
-
+7
−2
docs/content/guide/directive.ngdoc
|
|
@@ -99,8 +99,13 @@ For example, the following forms are all equivalent and match the {@link ngBind} |
|
|
</file> |
|
|
<file name="protractor.js" type="protractor"> |
|
|
it('should show off bindings', function() { |
|
|
expect(element(by.css('div[ng-controller="Controller"] span[ng-bind]')).getText()) |
|
|
.toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); |
|
|
var containerElm = element(by.css('div[ng-controller="Controller"]')); |
|
|
var nameBindings = containerElm.all(by.binding('name')); |
|
|
|
|
|
expect(nameBindings.count()).toBe(5); |
|
|
nameBindings.each(function(elem) { |
|
|
expect(elem.getText()).toEqual('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)'); |
|
|
}); |
|
|
}); |
|
|
</file> |
|
|
</example> |
|
|
|