Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I had this problem running my dev site in IIS where it would redirect all HTTP requests to HTTPS</p> <p>I still haven't go it working, but I can now get it to at least load the site inside the iframe in the Karma runner</p> <p>I had to specify the <strong>hostname</strong> and also allow invalid SSL certificates <strong>proxyValidateSSL</strong></p> <p>This is my config (GruntJS) formatted.</p> <pre><code>config.set({ frameworks: [], files: [ 'assets/angular-scenario.js', 'node_modules/karma-ng-scenario/lib/adapter.js', 'tests/e2e/**/*Spec.js'], urlRoot: '/__e2e/', hostname: '10.0.0.3', proxyValidateSSL: false, proxies: { '/': 'https://10.0.0.3/' }, browsers: ['Chrome'] }); </code></pre> <p>The next problem I ran into was I use the <strong>X-Frame-Options:Deny</strong> HTTP Header to stop external sites injecting mysite into their site inside iframes</p> <p>I had to change this to <strong>X-Frame-Options:SameOrigin</strong> and then my dev site would load inside Karma runner within Chrome.</p> <p><strong>My Problem</strong> </p> <p>I then have the following Jasmine spec, the navigateTo works fine, but it then hangs on the expect() line and never returns. </p> <pre><code>describe('My App', function () { beforeEach(function () { browser().navigateTo('/'); }); it('should redirect to Login', function () { expect(browser().location().url()).toBe('/Login'); // &lt;- Hangs here }); }); </code></pre> <p><strong>Update (6th Sep 2013)</strong></p> <p>I did some playing around to see if I could get it working. My app uses routes, and after removing the <strong>otherwise</strong> route config it worked. I still need the otherwise route so I am still not happy yet. But there must me something in there that is stopping it from loading</p> <p><strong>Fails with</strong></p> <pre><code> app.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/Foo', { templateUrl: 'foo.tpl.html', controller: 'FooCtrl', controllerAs: 'ctrl' }).otherwise({ redirectTo: '/Foo' }); }]); </code></pre> <p><strong>Works with</strong> </p> <pre><code>app.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/Foo', { templateUrl: 'foo.tpl.html', controller: 'FooCtrl', controllerAs: 'ctrl' }); }]); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload