I am writing a test case for adding store information in the page for Angular app using Protractor, where initially I am counting the number of stores I already have and aft
I got the same issue and solved it by creating a promise for the expected item count:
it('should accept valid data for adding new store', function() {
// Given
let expectedCountAfterNewRow = items.count().then((cnt)=>{return cnt+1});
// Note: items.count() is a promise so the expected count should a promise too
// When
/* Code for adding test fields in store page */
// Then
expect(items.count()).toEqual(expectedCountAfterNewRow);
});