From 4ff3b4c606b2bc028ca51e5a1b4ccb7fc52f60f0 Mon Sep 17 00:00:00 2001 From: Leo Gallucci Date: Mon, 29 Sep 2014 17:35:30 -0300 Subject: [PATCH] docs(guide/directives): improve Protractor test for bindings This needs Protractor >= 1.3.0 to work. Closes #9330 --- docs/content/guide/directive.ngdoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 6b6d3031efcf..2217337b05e5 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -99,8 +99,13 @@ For example, the following forms are all equivalent and match the {@link ngBind} 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)'); + }); });