I'm using protractor to do e2e testing on an angular web-app. We are splitting the specs from "pages files" describing the pages where action / DOM selction are described as functions (for example clickOnRedButton() {return element.(by.css('.redButton')).click(); }
)
We have to load these "page files" on our spec files with the require js of protractor, relativly to the position of the spec file, like this :
var LaunchFunnelPage = require('../../pages/launchFunnelPage');
describe('Add New Account Modal:', function () {
var launchFunnelPage = new LaunchFunnelPage();
beforeEach(function () {
promise = launchFunnelPage.go();
});
it("Close popup", function () {
promise
.then(function () {
//...
Is there a way to load the files absolutly, which will gives something like : var LaunchFunnelPage = require('./pages/launchFunnelPage');
I was thinking of writing a require.config but I didn't manage to access it.