UNPKG

protractor-jasmine2-html-reporter

Version:

HTML reporter for Jasmine and Protractor. It will generate beautiful and useful report for your web apps.

28 lines (22 loc) 1.08 kB
describe('SPEC 1', function() { it('should add a todo', function() { browser.get('http://www.angularjs.org'); element(by.model('todoList.todoText')).sendKeys('write a protractor test'); element(by.css('[value="add"]')).click(); var todoList = element.all(by.repeater('todo in todoList.todos')); expect(todoList.count()).toEqual(3); expect(todoList.count()).toEqual(6); //Failure expect(todoList.get(2).getText()).toEqual('write a protractor test'); }); it('second it', function() { browser.get('http://www.angularjs.org'); element(by.model('todoList.todoText')).sendKeys('write a protractor test'); element(by.css('[value="add"]')).click(); var todoList = element.all(by.repeater('todo in todoList.todos')); expect(todoList.count()).toEqual(3); expect(todoList.count()).toEqual(3); expect(todoList.count()).toEqual(3); expect(todoList.count()).toEqual(3); expect(todoList.get(2).getText()).toEqual('write a protractor test'); }); });