Tuesday, September 27, 2016

What is untrackOutstandingTimeouts setting for in Protractor?

Leave a Comment

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?

3 Answers

Answers 1

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.

Answers 2

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

Simulate the passage of time in protractor?

Answers 3

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

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment