FIX: Allow the clear callbacks to execute in acceptance tests

approved
#1

FIX: Allow the clear callbacks to execute in acceptance tests

diff --git a/test/javascripts/helpers/qunit-helpers.js.es6 b/test/javascripts/helpers/qunit-helpers.js.es6
index d4513f3..5e79f87 100644
--- a/test/javascripts/helpers/qunit-helpers.js.es6
+++ b/test/javascripts/helpers/qunit-helpers.js.es6
@@ -126,7 +126,6 @@ export function acceptance(name, options) {
       initSearchData();
       resetDecorators();
       resetPostCookedDecorators();
-      resetWidgetCleanCallbacks();
       resetOneboxCache();
       resetCustomPostMessageCallbacks();
       Discourse._runInitializer("instanceInitializers", function(
@@ -138,6 +137,9 @@ export function acceptance(name, options) {
         }
       });
       Discourse.reset();
+
+      // We do this after reset so that the willClearRender will have already fired
+      resetWidgetCleanCallbacks();
     }
   });
 }

GitHub sha: 035e63c8

2 Likes
Approved #2