From 3375163c9c6cb4b303b24b9292b46bb2f73b670e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 27 May 2016 14:33:25 +0200 Subject: [PATCH] Fixed browser test. --- app/assets/javascripts/app/lib/app_post/task_manager.coffee | 5 ++++- public/assets/tests/taskbar.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.coffee index 5284cc2aa..8b4f9531a 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.coffee @@ -1,7 +1,10 @@ class App.TaskManager _instance = undefined - @init: (params) -> + @init: (params = {}) -> + if params.force + _instance = new _taskManagerSingleton(params) + return _instance ?= new _taskManagerSingleton(params) @all: -> diff --git a/public/assets/tests/taskbar.js b/public/assets/tests/taskbar.js index e63644130..3312ca3a0 100644 --- a/public/assets/tests/taskbar.js +++ b/public/assets/tests/taskbar.js @@ -6,6 +6,7 @@ test( "taskbar basic tests", function() { App.TaskManager.init({ el: $('#taskbar1'), offlineModus: true, + force: true, }) // add tasks