I'm trying to write a protractor test with some mocked backend calls. I have one test which is working up to a point and then failing and I just can't seem to inspect it to find out why.
I really want to stop the browser closing so that I can inspect the page, ideally the network tools but at least the html. The browser closes at the end of the test though so I just can't get a look at it. So for sake of argument my test might be like this
describe('a new set of tests', function () {
beforeEach(function () {
browser.clearMockModules();
});
it('lets do a test, function () {
browser.addMockModule('accountMockModule', mockInjector.injectAccount,
dataMocks.mockedAccount,
dataMocks.mockedAccountDetails);
login();
expect(browser.getCurrentUrl()).toMatch('/account');
//works
someDetails.isDisplayed();
expect(someDetails.isDisplayed()).toBeTruthy();
accountPage.clickAccountDetails(dataMocks.mockedAccount.id);
//works
someDetails.isDisplayed();
expect(someDetails.isDisplayed()).toBeTruthy();
expect(browser.getCurrentUrl()).toMatch('/accountDetails');
accountPage.addressDetailsLink.click();
//fails
expect(browser.getCurrentUrl()).toMatch('/accountAddressDetails');
});
});
I want to stop the browser closing either before the fails (and comment out where it fails) or after. I tried adding a wait loop but it seems to process it before the test runs and then run the test. Is there a way to leave the browser up & available to inspect for a while ?