This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 3 files changed +39
-0
lines changed
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ var passingTests = [
26
26
'node lib/cli.js spec/directConnectConf.js' ,
27
27
'node lib/cli.js spec/restartBrowserBetweenTestsConf.js' ,
28
28
'node lib/cli.js spec/getCapabilitiesConf.js' ,
29
+ 'node lib/cli.js spec/controlLockConf.js' ,
29
30
'node node_modules/.bin/jasmine JASMINE_CONFIG_PATH=scripts/unit_test.json'
30
31
] ;
31
32
Original file line number Diff line number Diff line change
1
+ describe ( 'protractor control flow' , function ( ) {
2
+ it ( 'should not deadlock' , function ( ) {
3
+ browser . driver . wait ( function ( ) {
4
+ return true ;
5
+ } , 1000 ) ;
6
+ expect ( true ) . toEqual ( true ) ;
7
+ } ) ;
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ var env = require ( './environment.js' ) ;
2
+ var webdriver = require ( 'selenium-webdriver' ) ;
3
+
4
+ // Tests for cases that have caused WebDriver promise locks in
5
+ // the past.
6
+ exports . config = {
7
+ seleniumAddress : env . seleniumAddress ,
8
+
9
+ framework : 'jasmine2' ,
10
+
11
+ specs : [
12
+ 'control/spec.js' ,
13
+ ] ,
14
+
15
+ capabilities : env . capabilities ,
16
+
17
+ baseUrl : env . baseUrl ,
18
+
19
+ onPrepare : function ( ) {
20
+
21
+ // This is a reasonable use case - do some promise that takes some time,
22
+ // and then do a wait until something is set up correctly.
23
+ return webdriver . promise . delayed ( 100 ) . then ( function ( ) {
24
+ // This could also be replaced by an 'execute' to see the same behavior.
25
+ return browser . driver . wait ( function ( ) {
26
+ return true ;
27
+ } , 10000 , 'onPrepare wait' ) ;
28
+ } ) ;
29
+ }
30
+ } ;
You can’t perform that action at this time.
0 commit comments