javascript - Protractor 中的 untrackOutstandingTimeouts 设置是什么?

标签 javascript angularjs testing automation protractor

在 Protractor 引用配置中,有 untrackOutstandingTimeouts setting提到:

// 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,

我从未见过有人更改设置。设置的实际用途是什么?我什么时候应该将其设置为 true

最佳答案

跟踪未完成的超时,以便 Protractor 错误可以报告它们。如果关闭此功能,您将不会在错误中获得超时信息。

你可能需要关闭它,但是,如果你装饰你的 $timeout 对象(无论出于什么原因你需要装饰它),因为 Protractor 也装饰同一个对象,你不会'不会在需要时看到您对其所做的更改。

这是添加的here , 应用户要求。

关于javascript - Protractor 中的 untrackOutstandingTimeouts 设置是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39473600/

相关文章:

AngularJS $http.post(..) - 错误 : $http is not defined

javascript - 是否有一种 Angular 动画方式来模拟这种 ng 类行为

ruby - ruby 中的单元测试不将结果打印到控制台

javascript - Ajax 如果不​​止一个 @mention

angularjs - 使用 angular-ui-router 时处理具有相同名称的多个 Controller

javascript - 播放音频解决方法需要用户交互吗?

reactjs - 如何使用 React 测试库粘贴剪贴板数据?

c# - SpecFlow BeforeScenario 针对每个功能文件运行

javascript - 如何用php点击按钮来增加数值?

javascript - 第一级之后无法访问 Angular CLI 中的嵌套组件