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

chore(test): move noGlobals/noGlobals_spec off of the control flow #5025

Merged
merged 2 commits into from
Nov 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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