From 75fe094b6fb378b4b6015d7f45bdf9727e7a8f97 Mon Sep 17 00:00:00 2001 From: CrispusDH Date: Fri, 9 Nov 2018 12:12:13 +0200 Subject: [PATCH] chore(test): move noGlobals/noGlobals_spec off of the control flow --- scripts/test.js | 2 +- spec/noGlobals/noGlobals_spec.js | 18 +++++++++--------- spec/noGlobalsConf.js | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/test.js b/scripts/test.js index 8e87c5cf4..4e5ed42cc 100755 --- a/scripts/test.js +++ b/scripts/test.js @@ -36,7 +36,7 @@ var passingTests = [ // 'node built/cli.js spec/getCapabilitiesConf.js', // 'node built/cli.js spec/controlLockConf.js', // 'node built/cli.js spec/customFramework.js', - // 'node built/cli.js spec/noGlobalsConf.js', + 'node built/cli.js spec/noGlobalsConf.js', // 'node built/cli.js spec/angular2Conf.js', // 'node built/cli.js spec/hybridConf.js', // 'node built/cli.js spec/built/noCFBasicConf.js', diff --git a/spec/noGlobals/noGlobals_spec.js b/spec/noGlobals/noGlobals_spec.js index 56051b99a..adde7ebdd 100644 --- a/spec/noGlobals/noGlobals_spec.js +++ b/spec/noGlobals/noGlobals_spec.js @@ -1,7 +1,7 @@ -describe('configuration with no globals', function() { - var URL = '/ng2/#/async'; +describe('configuration with no globals', () => { + const URL = '/ng2/#/async'; - it('should have objects belonging to protractor namespace', function() { + it('should have objects belonging to protractor namespace', () => { expect(typeof protractor).toEqual('object'); expect(typeof protractor.browser).toEqual('object'); expect(typeof protractor.$).toEqual('function'); @@ -11,7 +11,7 @@ describe('configuration with no globals', function() { expect(typeof protractor.By).toEqual('object'); }); - it('should not have other globals', function() { + it('should not have other globals', () => { expect(typeof browser).toEqual('undefined'); expect(typeof $).toEqual('undefined'); expect(typeof $$).toEqual('undefined'); @@ -20,11 +20,11 @@ describe('configuration with no globals', function() { expect(typeof By).toEqual('undefined'); }); - it('should be able to use methods under the protractor namespace', function() { - protractor.browser.get(URL); - var increment = protractor.$('#increment'); + it('should be able to use methods under the protractor namespace', async () => { + await protractor.browser.get(URL); + const increment = protractor.$('#increment'); expect(typeof increment).toEqual('object'); - increment.$('.action').click(); - expect(increment.$('.val').getText()).toEqual('1'); + await increment.$('.action').click(); + expect(await increment.$('.val').getText()).toEqual('1'); }); }); diff --git a/spec/noGlobalsConf.js b/spec/noGlobalsConf.js index 6b00ddac8..e93bd8cbc 100644 --- a/spec/noGlobalsConf.js +++ b/spec/noGlobalsConf.js @@ -1,9 +1,9 @@ -var env = require('./environment'); +const env = require('./environment'); // This is the configuration for a smoke test for an Angular2 application. exports.config = { - seleniumAddress: env.seleniumAddress, + SELENIUM_PROMISE_MANAGER: false, framework: 'jasmine',