【发布时间】:2018-01-08 04:40:02
【问题描述】:
我在一个运行良好的 centos 虚拟机上运行了一个非常简单的 e2e 测试。我收到以下错误 -
webpack: Compiled successfully.
[15:22:42] I/launcher - Running 1 instances of WebDriver
[15:22:42] I/direct - Using ChromeDriver directly...
Jasmine started
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
my-app App
✗ Should default to login screen
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
起初我认为这是由于 .waitForAngular() 的问题,但在退回提交后,似乎在添加自定义字体(在我们的公司网络之外拨打电话)后出现了问题 - @import url('https://fonts.googleapis.com/css?family=Raleway:400,500,700'); 并删除了这个一行确认问题
我可以在这个 github 问题之后为量角器配置代理 - https://github.com/angular/protractor/issues/124
然而,似乎每次调用都是通过代理进行的,包括到本地主机,现在它无法在本地主机上找到 Angular 应用程序。
如何告诉量角器通过代理获取外部资源,本地主机上的任何内容都应该忽略代理?
【问题讨论】:
标签: angular proxy protractor angular-cli