Created
December 23, 2017 22:37
-
-
Save DavertMik/f8391402372d5095dbf428aa5da717f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should create todo item', (I) => { | |
browser.get("http://todomvc.com/examples/angularjs/#/"); | |
expect(element(by.css("#todo-count")).isPresent()).toBeFalsy(); | |
var inputField = element(by.model("newTodo")); | |
inputField.sendKeys("Write a guide"); | |
inputField.sendKeys(protractor.Key.ENTER); | |
var todos = element.all(by.repeater("todo in todos")); | |
expect(todos.last().getText()).toEqual("Write a guide")); | |
element(by.css("#todo-count")).getText()).toContain('1 items left'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment