Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can do i use testacular to test web pages that are not not on my localhost?

Can do i use testacular to test web pages that are not not on my localhost? The external app was developed using angularJs

In my test i tried doing

browser().navigateTo('<test app which is not on localhost>');

I cannot verify the url in my test. I get this error :

$location.url()

TypeError: Object [object Object] has no method 'injector'
    at Object.<anonymous> (<localhost path>/angular-scenario.js:25407:30)
like image 475
Prateek Avatar asked Mar 27 '13 17:03

Prateek


1 Answers

I encountered the same problem and solved it by adding the following two lines to karma-e2e.conf:

proxies = {'/': 'http://localhost:9000/'}; // assume your app is running on port 9000

urlRoot = '/_karma_/';  // important, could be any non-trivial path
like image 89
Hui Zheng Avatar answered Oct 21 '22 23:10

Hui Zheng