I'm trying to incorporate the Page Object pattern in my Protractor testing but for some reason I don't know it's not working. I must say that before doing any change, everything was running perfect.
In test folder I have the file test.spec.js with this:
'use strict';
var LoginPage = require('../pages/login.page.js');
describe('Login --> ', function(){
'use strict';
var ptor;
var page;
beforeEach(function () {
page = new LoginPage();
ptor = protractor.getInstance();
ptor.waitForAngular();
});
describe('False Login --> ', function(){
it('It should be false login with PIN --> ', function(){
/* some code */
});
});
});
and in same folder I got another one called "pages" and inside of it the file login.page.js. But when I run tests it doesn't find login.page.js.
"Error: Cannot find module '../pages/login.page.js'"
Anyone knows why?
Thanks guys ;)