Let's try the notify service, that is implicitly injected into the controller...
diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc
index 040d9e76..704dd483 100644
--- a/docs/content/guide/directive.ngdoc
+++ b/docs/content/guide/directive.ngdoc
@@ -84,10 +84,10 @@ Here are some equivalent examples of elements that match `ngBind`:
-
+
it('should show off bindings', function() {
- expect(element('div[ng-controller="Ctrl1"] span[ng-bind]').text())
- .toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)');
+ expect(element(by.css('div[ng-controller="Ctrl1"] span[ng-bind]')).getText())
+ .toBe('Max Karl Ernst Ludwig Planck (April 23, 1858 – October 4, 1947)');
});
diff --git a/docs/content/guide/expression.ngdoc b/docs/content/guide/expression.ngdoc
index b884dd45..f1e2735b 100644
--- a/docs/content/guide/expression.ngdoc
+++ b/docs/content/guide/expression.ngdoc
@@ -37,11 +37,11 @@ JavaScript, use the {@link api/ng.$rootScope.Scope#methods_$eval `$eval()`} meth
1+2={{1+2}}
-
+
it('should calculate expression in binding', function() {
- expect(binding('1+2')).toEqual('3');
+ expect(element(by.binding('1+2')).getText()).toEqual('1+2=3');
});
-
+
You can try evaluating different expressions here:
@@ -73,14 +73,14 @@ You can try evaluating different expressions here:
-
+
it('should allow user expression testing', function() {
- element('.expressions :button').click();
- var li = using('.expressions ul').repeater('li');
- expect(li.count()).toBe(1);
- expect(li.row(0)).toEqual(["3*10|currency", "$30.00"]);
+ element(by.css('.expressions button')).click();
+ var lis = element(by.css('.expressions ul')).element.all(by.repeater('expr in exprs'));
+ expect(lis.count()).toBe(1);
+ expect(lis.get(0).getText()).toEqual('[ X ] 3*10|currency => $30.00');
});
-
+
@@ -99,7 +99,7 @@ prevent accidental access to the global state (a common source of subtle bugs).
$scope.name = 'World';
$scope.greet = function() {
- ($window.mockWindow || $window).alert('Hello ' + $scope.name);
+ $window.alert('Hello ' + $scope.name);
}
}
@@ -108,21 +108,17 @@ prevent accidental access to the global state (a common source of subtle bugs).