[Edit Mode] #627 removed edit concerns from browse controllers and markup

Fixed elements not appearing in edit mode

Fixed failing tests
This commit is contained in:
Henry
2016-02-26 17:12:35 -08:00
parent a910fa8f37
commit 2cc2c6a9d3
11 changed files with 140 additions and 73 deletions

View File

@ -84,6 +84,24 @@ define(
expect(callback).not.toHaveBeenCalled();
});
it("adds listeners to the 'after' state by default", function(){
expect(navigationService.callbacks.after).toBeUndefined();
navigationService.addListener(function(){});
expect(navigationService.callbacks.after).toBeDefined();
expect(navigationService.callbacks.after.length).toBe(1);
});
it("allows navigationService events to be prevented", function(){
var callback = jasmine.createSpy("callback"),
navigationResult;
callback.andReturn(false);
navigationService.addListener(callback, "before");
navigationResult = navigationService.setNavigation({});
expect(callback).toHaveBeenCalled();
expect(navigationResult).toBe(false);
});
});
}
);
);