Skip to content

Commit

Permalink
chore(test): move noGlobals/noGlobals_spec off of the control flow (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
CrispusDH authored and cnishina committed Mar 23, 2019
1 parent 114c93b commit 69791ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
18 changes: 9 additions & 9 deletions spec/noGlobals/noGlobals_spec.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -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');
Expand All @@ -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');
});
});
4 changes: 2 additions & 2 deletions spec/noGlobalsConf.js
Original file line number Diff line number Diff line change
@@ -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',

Expand Down

0 comments on commit 69791ad

Please sign in to comment.