-
-
Save ackuser/3942852129b244a692c5cdf7b0de4174 to your computer and use it in GitHub Desktop.
Sample protractor test for todo list in angularjs.org
This file contains 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
describe('angularjs homepage todo list', function() { | |
it('should add a todo', function() { | |
browser.get('http://www.angularjs.org'); | |
element(by.model('todoText')).sendKeys('write a protractor test'); | |
element(by.css('[value="add"]')).click(); | |
var todoList = element.all(by.repeater('todo in todos')); | |
expect(todoList.count()).toEqual(3); | |
expect(todoList.get(2).getText()).toEqual('write a protractor test'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment