I am looking for an easy way to return an array of values ββfrom the protractor all.(by.repeater)
Basically, I just need an easy way to make a usernames array for the relay, like user in users .
Now I create it like this:
allUsers = element.all(by.repeater('user in users').column('user.username')).then(function(array){ var results = [] var elemLength = array.length for(var n = 0; n < elemLength; n++){ array[n].getText().then(function(username){ results.push(username) }) } return results }); expect(allUsers).toContain(newUser)
Is there a shorter, reusable way to do this built into the transporter / jasmine that I just can't find?
source share