fix(menuClose): add resetHistory() to menuClose

This commit is contained in:
Adam Bradley
2014-11-12 22:22:39 -06:00
parent 6ea73e6f82
commit 49aaed7e7b
4 changed files with 26 additions and 44 deletions

View File

@@ -90,36 +90,6 @@ describe('Ionic View Switcher', function() {
expect(d.showBack).toEqual(false);
}));
it('should override showBack from view data w/ $ionicViewSwitcher.nextShowBack() setting', inject(function($ionicViewSwitcher) {
$ionicViewSwitcher.nextShowBack(true);
var d = $ionicViewSwitcher.getTransitionData(null, null, null, null, true);
expect(d.showBack).toEqual(true);
$ionicViewSwitcher.nextShowBack(false);
var d = $ionicViewSwitcher.getTransitionData(null, null, null, null, true);
expect(d.showBack).toEqual(false);
$ionicViewSwitcher.nextShowBack(true);
d = $ionicViewSwitcher.getTransitionData(null, null, null, null, false);
expect(d.showBack).toEqual(true);
$ionicViewSwitcher.nextShowBack(false);
d = $ionicViewSwitcher.getTransitionData(null, null, null, null, false);
expect(d.showBack).toEqual(false);
$ionicViewSwitcher.nextShowBack(true);
d = $ionicViewSwitcher.getTransitionData(null, null, null, null, null);
expect(d.showBack).toEqual(true);
$ionicViewSwitcher.nextShowBack(false);
d = $ionicViewSwitcher.getTransitionData(null, null, null, null, null);
expect(d.showBack).toEqual(false);
$ionicViewSwitcher.nextShowBack(null);
d = $ionicViewSwitcher.getTransitionData(null, null, null, null, true);
expect(d.showBack).toEqual(true);
}));
it('should get an empty entering element with an empty navViewElement', inject(function($ionicViewSwitcher) {
var navViewElement = angular.element('<div class="view-container">');
var switcher = $ionicViewSwitcher.create(null, navViewElement, {}, {});