lundi 23 février 2015

I can't run the test exmaple with protractor-perf

I'm trying to run the example from the readme file:



var ProtractorPerf = require('protractor-perf');
describe('angularjs homepage todo list', function () {
var perf = new ProtractorPerf(protractor, browser); // Initialize the perf runner
it('should add a todo', function () {
browser.get('http://ift.tt/Q0foJK');

perf.start(); // Start measuring the metrics
element(by.model('todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
perf.stop(); // Stop measuring the metrics

if (perf.isEnabled) { // Is perf measuring enabled ?
// Check for perf regressions, just like you check for functional regressions
expect(perf.getStats('meanFrameTime')).toBeLessThan(60);
};

var todoList = element.all(by.repeater('todo in todos'));
expect(todoList.count()).toEqual(3);
});
});


I'm using the protractor-pre instead of protractor, and what I see after:



angularjs homepage todo list
x should add a todo <36>
TypeError: undefined is not a function


What is problem with my configuration? or what is that?


Aucun commentaire:

Enregistrer un commentaire