diff --git a/config.js b/config.js index 9637611fc..47b232c3f 100644 --- a/config.js +++ b/config.js @@ -11,6 +11,8 @@ const uniq = require('lodash/uniq'); const ms = require('ms'); const debug = require('debug')('talk:config'); +const localAddress = require('ip').address('private'); + //============================================================================== // CONFIG INITIALIZATION //============================================================================== @@ -204,10 +206,10 @@ const CONFIG = { if (process.env.NODE_ENV === 'test') { if (!CONFIG.ROOT_URL) { - CONFIG.ROOT_URL = 'http://localhost:3001'; + CONFIG.ROOT_URL = `http://${localAddress}:3001`; } if (!CONFIG.STATIC_URL) { - CONFIG.STATIC_URI = 'http://localhost:3001'; + CONFIG.STATIC_URI = `http://${localAddress}:3001`; } } else if (!CONFIG.ROOT_URL) { throw new Error('TALK_ROOT_URL must be provided'); diff --git a/nightwatch-browserstack.conf.js b/nightwatch-browserstack.conf.js index f31580988..567d5e1f4 100644 --- a/nightwatch-browserstack.conf.js +++ b/nightwatch-browserstack.conf.js @@ -54,23 +54,19 @@ const nightwatch_config = { }, safari: { desiredCapabilities: { - - // Safari since 8 seems to have troubles with the browserstack-local tunnel (10.18.17) browser: 'safari', - browser_version: '10', + browser_version: '11', }, }, + + // The x64 bit IEDriver that is used by IE 11 has a known issue with sendKeys where + // it may enter incorrect keys (shift + key). ie: { desiredCapabilities: { browser: 'internet explorer', os: 'Windows', os_version: '10', browser_version: '11', - - // The x64 bit IEDriver that is used by IE 11 has a known issue with sendKeys where - // it may enter incorrect keys (shift + key). - // This adds a delay for each character as temporary fix as advised from the browserstack support. - 'browserstack.customSendKeys': 800, }, }, edge: { diff --git a/package.json b/package.json index 568db2577..b499c99ea 100644 --- a/package.json +++ b/package.json @@ -205,6 +205,7 @@ "eslint": "^4.5.0", "eslint-plugin-mocha": "^4.11.0", "identity-obj-proxy": "^3.0.0", + "ip": "^1.1.5", "jest": "^21.2.1", "mocha": "^3.1.2", "mocha-junit-reporter": "^1.12.1", diff --git a/test/e2e/specs/01_install.js b/test/e2e/specs/01_install.js index 078a22e50..e0734a2a6 100644 --- a/test/e2e/specs/01_install.js +++ b/test/e2e/specs/01_install.js @@ -1,7 +1,8 @@ module.exports = { '@tags': ['install'], - before: (client) => { + before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1600, 1200); }, diff --git a/test/e2e/specs/02_admin.js b/test/e2e/specs/02_admin.js index 29957e487..d04f918bd 100644 --- a/test/e2e/specs/02_admin.js +++ b/test/e2e/specs/02_admin.js @@ -1,7 +1,8 @@ module.exports = { '@tags': ['admin', 'login'], - before: (client) => { + before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1024, 800); }, diff --git a/test/e2e/specs/03_embedStream.js b/test/e2e/specs/03_embedStream.js index 567596dd2..56f267375 100644 --- a/test/e2e/specs/03_embedStream.js +++ b/test/e2e/specs/03_embedStream.js @@ -1,7 +1,8 @@ module.exports = { '@tags': ['embedStream', 'login'], - before: (client) => { + before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1600, 1200); }, diff --git a/test/e2e/specs/04_userStatus.js b/test/e2e/specs/04_userStatus.js index 011f59056..74f7e07b6 100644 --- a/test/e2e/specs/04_userStatus.js +++ b/test/e2e/specs/04_userStatus.js @@ -1,6 +1,7 @@ module.exports = { - before: (client) => { + before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1600, 1200); }, diff --git a/test/e2e/specs/05_banUser.js b/test/e2e/specs/05_banUser.js index da0d11e7a..41a0784ae 100644 --- a/test/e2e/specs/05_banUser.js +++ b/test/e2e/specs/05_banUser.js @@ -1,6 +1,7 @@ module.exports = { - before: (client) => { + before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1600, 1200); }, diff --git a/test/e2e/specs/06_suspendUser.js b/test/e2e/specs/06_suspendUser.js index 20f38c2c2..7da11d0dd 100644 --- a/test/e2e/specs/06_suspendUser.js +++ b/test/e2e/specs/06_suspendUser.js @@ -1,6 +1,7 @@ module.exports = { before: (client) => { + client.setWindowPosition(0, 0); client.resizeWindow(1600, 1200); }, @@ -83,7 +84,7 @@ module.exports = { 'admin suspends user': (client) => { const adminPage = client.page.admin(); const moderate = adminPage.section.moderate; - + adminPage .navigate() .ready() @@ -97,7 +98,7 @@ module.exports = { .waitForElementVisible('@actionItemSuspendUser') .click('@actionItemSuspendUser'); - adminPage + adminPage .waitForElementVisible('@suspendUserDialog') .waitForElementVisible('@suspendUserConfirmButton') .click('@suspendUserConfirmButton') diff --git a/yarn.lock b/yarn.lock index c380bcd3a..b9ef3f31e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4186,7 +4186,7 @@ ip@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ip/-/ip-1.0.1.tgz#c7e356cdea225ae71b36d70f2e71a92ba4e42590" -ip@^1.1.2, ip@^1.1.4: +ip@^1.1.2, ip@^1.1.4, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"