Commit 3b8bd527 3b8bd527612fce6760f17ad8bb2bff285e588793 by Nicolas Perriault

Merge pull request #637 from dharrya/fix-navigation

ref #637: checkStep turns into an infinite loop when navigationLocked == true
2 parents f569c296 bc7f8568
...@@ -2435,11 +2435,12 @@ function createPage(casper) { ...@@ -2435,11 +2435,12 @@ function createPage(casper) {
2435 newUrl = newUrl.substring(0, pos); 2435 newUrl = newUrl.substring(0, pos);
2436 } 2436 }
2437 // for URLs that are only different by their hash part 2437 // for URLs that are only different by their hash part
2438 // or if navigation locked (willNavigate == false)
2438 // don't turn navigationRequested to true, because 2439 // don't turn navigationRequested to true, because
2439 // there will not be loadStarted, loadFinished events 2440 // there will not be loadStarted, loadFinished events
2440 // so it could cause issues (for exemple, checkStep that 2441 // so it could cause issues (for exemple, checkStep that
2441 // do no execute the next step -> infinite loop on checkStep) 2442 // do no execute the next step -> infinite loop on checkStep)
2442 if (currentUrl !== newUrl) 2443 if (willNavigate && currentUrl !== newUrl)
2443 casper.navigationRequested = true; 2444 casper.navigationRequested = true;
2444 2445
2445 if (willNavigate) { 2446 if (willNavigate) {
......