Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 02b3cb9

Browse files
CrispusDHcnishina
authored andcommitted
chore(test): move noGlobals/noGlobals_spec off of the control flow (#5025)
1 parent 6b3d9c0 commit 02b3cb9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

scripts/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var passingTests = [
3636
'node built/cli.js spec/getCapabilitiesConf.js',
3737
'node built/cli.js spec/controlLockConf.js',
3838
'node built/cli.js spec/customFramework.js',
39-
// 'node built/cli.js spec/noGlobalsConf.js',
39+
'node built/cli.js spec/noGlobalsConf.js',
4040
// 'node built/cli.js spec/angular2Conf.js',
4141
'node built/cli.js spec/hybridConf.js',
4242
'node built/cli.js spec/built/noCFBasicConf.js',

spec/noGlobals/noGlobals_spec.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
describe('configuration with no globals', function() {
2-
var URL = '/ng2/#/async';
1+
describe('configuration with no globals', () => {
2+
const URL = '/ng2/#/async';
33

4-
it('should have objects belonging to protractor namespace', function() {
4+
it('should have objects belonging to protractor namespace', () => {
55
expect(typeof protractor).toEqual('object');
66
expect(typeof protractor.browser).toEqual('object');
77
expect(typeof protractor.$).toEqual('function');
@@ -11,7 +11,7 @@ describe('configuration with no globals', function() {
1111
expect(typeof protractor.By).toEqual('object');
1212
});
1313

14-
it('should not have other globals', function() {
14+
it('should not have other globals', () => {
1515
expect(typeof browser).toEqual('undefined');
1616
expect(typeof $).toEqual('undefined');
1717
expect(typeof $$).toEqual('undefined');
@@ -20,11 +20,11 @@ describe('configuration with no globals', function() {
2020
expect(typeof By).toEqual('undefined');
2121
});
2222

23-
it('should be able to use methods under the protractor namespace', function() {
24-
protractor.browser.get(URL);
25-
var increment = protractor.$('#increment');
23+
it('should be able to use methods under the protractor namespace', async () => {
24+
await protractor.browser.get(URL);
25+
const increment = protractor.$('#increment');
2626
expect(typeof increment).toEqual('object');
27-
increment.$('.action').click();
28-
expect(increment.$('.val').getText()).toEqual('1');
27+
await increment.$('.action').click();
28+
expect(await increment.$('.val').getText()).toEqual('1');
2929
});
3030
});

spec/noGlobalsConf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
var env = require('./environment');
1+
const env = require('./environment');
22

33
// This is the configuration for a smoke test for an Angular2 application.
44
exports.config = {
5-
65
seleniumAddress: env.seleniumAddress,
6+
SELENIUM_PROMISE_MANAGER: false,
77

88
framework: 'jasmine',
99

0 commit comments

Comments
 (0)