0

Ok, So I'm testing a web app with an angularjs front end and an asp.net mvc backend server and I'm having some issues when browsing to an asp.net controller action with my tests.

sample test code

it('clicking this anchor button should direct the user to an mvc action powered view', function() {
    browser().navigateTo('http:localhost:22222//angularpoweredindexview/');
    element('a').click();
    expect(browser().location().url()).toBe('/Controller/Action');
});

The scenario test runner just hangs at browser navigate to browser navigate to 'http://localhost:22222/Controller/Action'

I'm stumped on this at the moment, does anyone have any ideas.

tereško
  • 58,060
  • 25
  • 98
  • 150
Ian Richards
  • 1,618
  • 4
  • 17
  • 36
  • Is your MVC app being actively hosted via IIS @ localhost:22222 when you try this? Set a breakpoint and try to navigate to that URL yourself in a browser and see what the response looks like. – Mike Pugh Aug 13 '13 at 15:44
  • Running via Postman in the browser returns the expected view result. The app is actively running via VS2012 in debug mode on the url shown above. – Ian Richards Aug 14 '13 at 07:53
  • Tested further and I can now get the view result back in the test runner however the test runner now hangs at the click element. I can only assume that the returned result is running slower than the test. I have set sleep to 3 but this does not help the result is still the same. – Ian Richards Aug 14 '13 at 08:21

0 Answers0