From 703fabf586fa7ed76ef8feb64336cf862fd1dd44 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Fri, 13 Oct 2017 21:06:56 -0300 Subject: [PATCH] Adding globals --- nightwatch-local.conf.js | 4 +--- test/e2e/globals.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/e2e/globals.js diff --git a/nightwatch-local.conf.js b/nightwatch-local.conf.js index f116fcecc..6c9fb1172 100644 --- a/nightwatch-local.conf.js +++ b/nightwatch-local.conf.js @@ -2,6 +2,7 @@ module.exports = { 'src_folders': './test/e2e/specs/', 'output_folder': './test/e2e/tests_output', 'page_objects_path': './test/e2e/page_objects', + 'globals_path': './test/e2e/globals', 'selenium': { 'start_process': true, 'server_path': 'node_modules/selenium-standalone/.selenium/selenium-server/3.5.3-server.jar', @@ -27,9 +28,6 @@ module.exports = { 'applicationCacheEnabled': false, 'nativeEvents': true }, - 'globals': { - 'waitForConditionTimeout': 5000, - }, 'screenshots' : { 'enabled': true, 'on_failure': true, diff --git a/test/e2e/globals.js b/test/e2e/globals.js new file mode 100644 index 000000000..4e8bbe698 --- /dev/null +++ b/test/e2e/globals.js @@ -0,0 +1,14 @@ +const uuid = require('uuid'); +const {murmur3} = require('murmurhash-js'); +const rHash = murmur3(uuid.v4()); + +module.exports = { + waitForConditionTimeout: 5000, + testData: { + organizationName: 'Coral', + email: `test_${rHash}@test.test`, + username: `test${rHash}`, + password: `testpassword${rHash}`, + domain: 'http://localhost:3000' + } +};