Due to some changes in the infrastructure (namely servers and virtual private networks) there is a time when I want to run our application offline. I was able to implement this with ngMockE2E , but it seems to be all or nothing, which means that you must explicitly specify each HTTP request from the application.
Is there any way to suggest that if you have not explicitly set a route / url for processing, it will automatically invoke the general operation passThrough()?
I am currently doing this:
noSrvc = $location.search().hasOwnProperty 'nosrvc'
$httpBackend.whenGET /(\.htm|\.html)$/
.passThrough();
rqst = $httpBackend.whenGET /(api\/users\/current)$/
if !noSrvc then rqst.passThrough() else rqst.respond {"user":{
Most of everything I've read about this is about unit testing and does not really affect the implied end-to-end pass unless otherwise stated.