1

I've just been handed an app that uses ngBoilerplate, ui-router and astrolabe (the protractor plugin). I'm in charge of setting up the testing suite and have been working on getting Protractor up and running.

Every time I run the protractor tests, I'm finding that while the address bar does navigate to the correct address (i.e. http://localhost:9000/#/nodes/215), the ui-view does NOT load the contents of the page!

I've tried putting in browser.wait and browser.sleep to see if it was an issue of speed, but even with 10 second waits/sleeps and waits until the an item is present, the contents do not load, and all tests fail automatically. I have tried the tests in both normal protractor and astrolabe with the same results.

When I run the app in grunt, all of the routing works perfectly, and the pages load!

I've looked everywhere for a solution, but I am stumped. Any ideas? Is this a routing issue or a protractor issue?

This is my spec file:

describe('This Page', function(){
    console.log('starting test suite This Page');

    beforeEach(function() {
         browser.get('http://localhost:9000/#/nodes/215');
         browser.sleep(10000);
    });

    it('loads element 1', function(){
         var element1 = element(by.id('picture-tile'));  
         expect(element1.isDisplayed()).toBeTruthy();
    });
});
angryrobot
  • 11
  • 3
  • Press F12 in browser and then on the console tab. Do you see any errors? – JWP Nov 09 '15 at 21:19
  • @JohnPeters I am getting a couple of errors, but they're unrelated to whatever should be loading on the page. – angryrobot Nov 09 '15 at 21:38
  • Ok just curious, put in a debugger statement. in "loads element 1" when it hits, open a second tab in browser and navigate manually to that same page. What do you see? – JWP Nov 09 '15 at 22:28

0 Answers0