How do I test an externally served app using Testacular + AngularJS

房东的猫 提交于 2019-12-03 21:33:13

Instead of having

beforeEach(function() {
    browser().navigateTo('http://localhost:6543/');
});

change this to

beforeEach(function() {
    browser().navigateTo('/');
});

and then in your testacular-e2e.conf.js file add:

proxies = {
    '/': 'http://localhost:6543/'
};

You might still have other issues, but I can reproduce the "Sandbox Error: Application document not accessible." message with just the Pyramid Hello World App and this configuration problem.

We had a similar problem, and had already proxies and navigateTo('/'). We needed to add some urlRoot to avoid conflicts when loading socket.io. We simply added '/e2e' and that was enough to solve the conflict. Actually, there was a warning message when running testacular for this issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!