diff --git a/res/test/e2e/devices/devices-spec.js b/res/test/e2e/devices/devices-spec.js index 41162508..41bf2a40 100644 --- a/res/test/e2e/devices/devices-spec.js +++ b/res/test/e2e/devices/devices-spec.js @@ -1,7 +1,8 @@ describe('Device Page', function () { describe('Icon View', function () { - var deviceListPage = require('./') + var DeviceListPage = require('./') + var deviceListPage = new DeviceListPage() it('should go to Devices List page', function () { deviceListPage.get() diff --git a/res/test/e2e/devices/index.js b/res/test/e2e/devices/index.js index ee4db7b2..3ed274d7 100644 --- a/res/test/e2e/devices/index.js +++ b/res/test/e2e/devices/index.js @@ -1,4 +1,4 @@ -function DeviceListPage() { +module.exports = function DeviceListPage() { this.get = function () { // TODO: Let's get rid off the login first browser.get(protractor.getInstance().baseUrl + 'devices') @@ -20,5 +20,3 @@ function DeviceListPage() { return this.availableDevice().click() } } - -module.exports = new DeviceListPage() diff --git a/res/test/e2e/login/index.js b/res/test/e2e/login/index.js index 52e082c8..63016534 100644 --- a/res/test/e2e/login/index.js +++ b/res/test/e2e/login/index.js @@ -1,4 +1,4 @@ -function LoginPage() { +module.exports = function LoginPage() { this.login = protractor.getInstance().params.login this.get = function () { @@ -49,5 +49,3 @@ function LoginPage() { this.email = null } } - -module.exports = new LoginPage() diff --git a/res/test/e2e/login/login-spec.js b/res/test/e2e/login/login-spec.js index f0395f67..778022e7 100644 --- a/res/test/e2e/login/login-spec.js +++ b/res/test/e2e/login/login-spec.js @@ -1,5 +1,6 @@ describe('Login Page', function () { - var loginPage = require('./') + var LoginPage = require('./') + var loginPage = new LoginPage() it('should have an url to login', function () { expect(loginPage.login.url).toMatch('http')