Fixes persistence's mock, adds back the original keycode detection
This commit is contained in:
parent
5a7a06d1a2
commit
06329bef70
2 changed files with 5 additions and 4 deletions
|
@ -175,9 +175,9 @@ angular.module('JamStash')
|
||||||
$(this).fadeOut(function () { $(this).remove(); });
|
$(this).fadeOut(function () { $(this).remove(); });
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
// $document.keydown(function (e) {
|
$document.keydown(function (e) {
|
||||||
// $scope.scrollToIndex(e);
|
$scope.scrollToIndex(e);
|
||||||
// });
|
});
|
||||||
$scope.scrollToIndex = function (e) {
|
$scope.scrollToIndex = function (e) {
|
||||||
var source = e.target.id;
|
var source = e.target.id;
|
||||||
if (e.target.tagName.toUpperCase() != 'INPUT') {
|
if (e.target.tagName.toUpperCase() != 'INPUT') {
|
||||||
|
|
|
@ -5,6 +5,7 @@ describe("Main controller", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
mockGlobals = {
|
mockGlobals = {
|
||||||
settings: {
|
settings: {
|
||||||
|
SaveTrackPosition: false,
|
||||||
ShowQueue: false,
|
ShowQueue: false,
|
||||||
Debug: true,
|
Debug: true,
|
||||||
Jukebox: false
|
Jukebox: false
|
||||||
|
@ -21,7 +22,7 @@ describe("Main controller", function() {
|
||||||
player.volume = 1.0;
|
player.volume = 1.0;
|
||||||
|
|
||||||
// Mock the persistence service
|
// Mock the persistence service
|
||||||
persistence = jasmine.createSpyObj("persistence", ["getVolume", "saveVolume"]);
|
persistence = jasmine.createSpyObj("persistence", ["loadQueue", "loadTrackPosition", "getVolume", "saveVolume"]);
|
||||||
|
|
||||||
inject(function (_$controller_, $rootScope, _$document_, _$window_, _$location_, _$cookieStore_, _utils_, globals, _model_, _notifications_, _Page_) {
|
inject(function (_$controller_, $rootScope, _$document_, _$window_, _$location_, _$cookieStore_, _utils_, globals, _model_, _notifications_, _Page_) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue