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

Commit df59f29

Browse files
committed
chore(tests): update restart spec specs and plugin specs (#5058)
- update specs to ES6 - fix the expected conditions to await when the browser is ready after being forked - enable more tests in test.js
1 parent 8f55234 commit df59f29

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

scripts/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const Executor = require('./test/test_util').Executor;
55

66
const passingTests = [
77
'node built/cli.js spec/basicConf.js',
8-
// 'node built/cli.js spec/basicConf.js --useBlockingProxy',
8+
'node built/cli.js spec/basicConf.js --useBlockingProxy',
99
'node built/cli.js spec/multiConf.js',
1010
'node built/cli.js spec/altRootConf.js',
1111
'node built/cli.js spec/inferRootConf.js',
@@ -21,7 +21,7 @@ const passingTests = [
2121
'node built/cli.js spec/suitesConf.js --suite okmany',
2222
'node built/cli.js spec/suitesConf.js --suite okspec',
2323
'node built/cli.js spec/suitesConf.js --suite okmany,okspec',
24-
// 'node built/cli.js spec/plugins/smokeConf.js',
24+
'node built/cli.js spec/plugins/smokeConf.js',
2525
'node built/cli.js spec/plugins/multiPluginConf.js',
2626
'node built/cli.js spec/plugins/jasminePostTestConf.js',
2727
'node built/cli.js spec/plugins/mochaPostTestConf.js',
@@ -37,7 +37,7 @@ const passingTests = [
3737
'node built/cli.js spec/controlLockConf.js',
3838
'node built/cli.js spec/customFramework.js',
3939
'node built/cli.js spec/noGlobalsConf.js',
40-
// 'node built/cli.js spec/angular2Conf.js',
40+
'node built/cli.js spec/angular2Conf.js',
4141
'node built/cli.js spec/hybridConf.js',
4242
'node built/cli.js spec/built/noCFBasicConf.js',
4343
'node built/cli.js spec/built/noCFBasicConf.js --useBlockingProxy',

spec/basic/expected_conditions_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ describe('expected conditions', () => {
177177
describe('for forked browsers', () => {
178178
// ensure that we can run EC on forked browser instances
179179
it('should have alertIsPresent', async () => {
180-
const browser2 = browser.forkNewDriverInstance();
180+
const browser2 = await browser.forkNewDriverInstance().ready;
181181
await browser2.get('index.html#/form');
182182
const EC2 = browser2.ExpectedConditions;
183183
const alertIsPresent = EC2.alertIsPresent();

spec/plugins/skipStabilityConf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var env = require('../environment.js');
33
// Verifies that plugins can change skipAngularStability on the fly.
44
exports.config = {
55
seleniumAddress: env.seleniumAddress,
6+
SELENIUM_PROMISE_MANAGER: false,
67

78
framework: 'jasmine',
89

spec/plugins/smokeConf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var env = require('../environment.js');
44
// Tests the (potential) edge case of exactly one plugin being used
55
exports.config = {
66
mockSelenium: true,
7+
SELENIUM_PROMISE_MANAGER: false,
78

89
framework: 'jasmine',
910

spec/plugins/specs/smoke_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
describe('check if plugin setup ran', function() {
2-
it('should have set protractor.__BASIC_PLUGIN_RAN_*', function() {
1+
describe('check if plugin setup ran', () => {
2+
it('should have set protractor.__BASIC_PLUGIN_RAN_*', () => {
33
expect(protractor.__BASIC_PLUGIN_RAN_SETUP).toBe(true);
44
expect(protractor.__BASIC_PLUGIN_RAN_ON_PREPARE).toBe(true);
55
});

0 commit comments

Comments
 (0)