Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit adcfa74

Browse files
elgaluNarretz
authored andcommitted
docs(guide/directives): improve Protractor test for bindings
This needs Protractor >= 1.3.0 to work. Closes #9330
1 parent d641901 commit adcfa74

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/content/guide/directive.ngdoc

+7-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ For example, the following forms are all equivalent and match the {@link ngBind}
9999
</file>
100100
<file name="protractor.js" type="protractor">
101101
it('should show off bindings', function() {
102-
expect(element(by.css('div[ng-controller="Controller"] span[ng-bind]')).getText())
103-
.toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)');
102+
var containerElm = element(by.css('div[ng-controller="Controller"]'));
103+
var nameBindings = containerElm.all(by.binding('name'));
104+
105+
expect(nameBindings.count()).toBe(5);
106+
nameBindings.each(function(elem) {
107+
expect(elem.getText()).toEqual('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)');
108+
});
104109
});
105110
</file>
106111
</example>

0 commit comments

Comments
 (0)