Skip to content

Instantly share code, notes, and snippets.

@radjivF
Last active February 16, 2016 00:34
Show Gist options
  • Save radjivF/6be6a4ac5bd1206b7dfd to your computer and use it in GitHub Desktop.
Save radjivF/6be6a4ac5bd1206b7dfd to your computer and use it in GitHub Desktop.
delete in an Array with protractor
it "delete in an Array" , ->
element.all(By.repeater('a in Array.list')).count()
.then (@number_of_rows_before) ->
element.all(By.css('i.fa.fa-chevron-up')).last().click()
element.all(By.css('a.glyphicon.glyphicon-trash')).last().click()
.then () ->
waitForAlert()
.then () ->
browser.switchTo().alert().accept()
.then ()->
expect(element.all(By.repeater('a in claim_attachments.activities')).count()).toEqual(@number_of_rows_before - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment