2

I have a frustrating problem: I want to write end to end tests for a complex angular app. The problem is that the login screen is a separate app. The initial idea was that it would branch out to separate other angular apps in our ecosystem based on the login credentials. It works like a charm. For the tests it is a nightmare though.

The tests work as expected but as soon as correct credentials are entered and the main angular app is loaded the tests just time out. No error message or debug output whatsoever, its just waiting. I can see the page is loading correctly.

Now I thought I would skip this part and test right on the target app but thats not working either since I need to initialize the server with the right credentials first (= go through the login screen).

I tried this with the karma scenario runner and protractor, both show the exact same behavior. Can I tell them to reinitialize after the target page is loaded?

4

1 回答 1

1

因此,当量角器超时时,错误消息会显示指向faq的链接。就在上面有这个问题的解释。显然,该应用程序发送连续请求(可能是因为我使用的是 socket.io),所以 Angular 永远不会完成。

此问题与单独的应用程序无关。

问题链接非常有帮助。因为我不愿意接触任何我解决的页面代码

browser.ignoreSynchronization = true;

browser.sleep( ... );

测试现在按预期工作。

于 2014-03-21T03:30:42.227 回答