Commit bc7f8568 bc7f856881a383a8342406b56b7c1ad0e5da4d4e by Dharrya

refs #637 - fix navigationRequested when navigationLocked

1 parent 0dcd7fb5
......@@ -2435,11 +2435,12 @@ function createPage(casper) {
newUrl = newUrl.substring(0, pos);
}
// for URLs that are only different by their hash part
// or if navigation locked (willNavigate == false)
// don't turn navigationRequested to true, because
// there will not be loadStarted, loadFinished events
// so it could cause issues (for exemple, checkStep that
// do no execute the next step -> infinite loop on checkStep)
if (currentUrl !== newUrl)
if (willNavigate && currentUrl !== newUrl)
casper.navigationRequested = true;
if (willNavigate) {
......