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

Commit a69fe83

Browse files
committed
test(count): test that element.all.count returns 0 if no elements are found
1 parent a43f983 commit a69fe83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: spec/basic/elements_spec.js

+6
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ describe('ElementFinder', function() {
133133
expect(element.all(by.model('color')).count()).toEqual(3);
134134
});
135135

136+
it('should return 0 when counting no elements', function() {
137+
browser.get('index.html#/form');
138+
139+
expect(element.all(by.binding('doesnotexist')).count()).toEqual(0);
140+
});
141+
136142
it('should get an element from an array', function() {
137143
var colorList = element.all(by.model('color'));
138144

0 commit comments

Comments
 (0)