This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 5 files changed +46
-3
lines changed
5 files changed +46
-3
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,6 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
359
359
this . ignoreSynchronization = false ;
360
360
this . getPageTimeout = DEFAULT_GET_PAGE_TIMEOUT ;
361
361
this . params = { } ;
362
- this . plugins_ = new Plugins ( { } ) ;
363
362
this . resetUrl = DEFAULT_RESET_URL ;
364
363
this . debugHelper = new DebugHelper ( this ) ;
365
364
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as webdriver from 'selenium-webdriver';
4
4
import { Config } from './config' ;
5
5
import { ConfigParser } from './configParser' ;
6
6
import { Logger } from './logger' ;
7
+ import { protractor } from './ptor' ;
7
8
8
9
let logger = new Logger ( 'plugins' ) ;
9
10
@@ -457,8 +458,13 @@ export class Plugins {
457
458
logError ( e ) ;
458
459
}
459
460
} ;
460
- return promiseType == PromiseType . Q ? q . Promise ( resolver ) :
461
- new webdriver . promise . Promise ( resolver ) ;
461
+ if ( promiseType == PromiseType . Q ) {
462
+ return q . Promise ( resolver ) ;
463
+ } else if ( protractor . browser . controlFlowIsEnabled ( ) ) {
464
+ return new webdriver . promise . Promise ( resolver ) ;
465
+ } else {
466
+ return new Promise ( resolver ) ;
467
+ }
462
468
}
463
469
464
470
/**
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ var passingTests = [
39
39
'node built/cli.js spec/angular2Conf.js' ,
40
40
'node built/cli.js spec/hybridConf.js' ,
41
41
'node built/cli.js spec/built/noCFSmokeConf.js' ,
42
+ 'node built/cli.js spec/built/noCFPluginConf.js' ,
42
43
'node scripts/driverProviderAttachSession.js' ,
43
44
'node scripts/errorTest.js' ,
44
45
// Interactive Element Explorer tasks
Original file line number Diff line number Diff line change
1
+ import { browser , protractor } from '../../..' ;
2
+
3
+ describe ( 'category' , function ( ) {
4
+ it ( 'name' , async function ( ) {
5
+ await browser . get ( 'index.html' ) ;
6
+ await expect ( ( protractor as any ) . ON_PAGE_LOAD ) . toBe ( true ) ;
7
+ } ) ;
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import * as q from 'q' ;
2
+ import { Config , protractor } from '../..' ;
3
+ const env = require ( '../environment.js' ) ;
4
+
5
+ export let config : Config = {
6
+ seleniumAddress : env . seleniumAddress ,
7
+
8
+ framework : 'jasmine' ,
9
+
10
+ specs : [
11
+ 'noCF/plugin_spec.js'
12
+ ] ,
13
+
14
+ capabilities : env . capabilities ,
15
+
16
+ baseUrl : env . baseUrl + '/ng1/' ,
17
+
18
+ plugins : [ {
19
+ inline : {
20
+ onPageLoad : function ( ) {
21
+ return q . delay ( 100 ) . then ( function ( ) {
22
+ ( protractor as any ) . ON_PAGE_LOAD = true ;
23
+ } ) ;
24
+ }
25
+ }
26
+ } ] ,
27
+
28
+ SELENIUM_PROMISE_MANAGER : false
29
+ } ;
You can’t perform that action at this time.
0 commit comments