Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is untrackOutstandingTimeouts setting for in Protractor?

In the Protractor reference configuration, there is the untrackOutstandingTimeouts setting mentioned:

// Protractor will track outstanding $timeouts by default, and report them in 
// the error message if Protractor fails to synchronize with Angular in time. 
// In order to do this Protractor needs to decorate $timeout. 
// CAUTION: If your app decorates $timeout, you must turn on this flag. This 
// is false by default.
untrackOutstandingTimeouts: false,

I've never seen anyone changing the setting. What is the practical usage of the setting? When should I set it to true?

like image 902
alecxe Avatar asked Sep 13 '16 15:09

alecxe


3 Answers

The outstanding timeouts are tracked so that the Protractor errors can report them. You won't get timeout information in your errors if you turn this off.

You might need to turn it off, however, if you decorate your $timeout object (for whatever reason you need to decorate it for), since Protractor also decorates the same object and you won't see your changes to it whenever you need them.

This was added here, by user request.

like image 156
Vlad Vidac Avatar answered Oct 20 '22 18:10

Vlad Vidac


untrackOutstandingTimeouts:true is for $timeout, maybe also for $interval (there i am not sure)

Simulate the passage of time in protractor?

like image 43
Hikaryu Avatar answered Oct 20 '22 20:10

Hikaryu


Here's the official FAQ for the question. It's in the same line as @Vlad's answer.

like image 26
Shubhang Avatar answered Oct 20 '22 19:10

Shubhang