From 035e63c81ffdb6943fcca4b59f3b4d2e079d7881 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 14 Jun 2019 13:29:13 -0400 Subject: [PATCH] FIX: Allow the clear callbacks to execute in acceptance tests --- test/javascripts/helpers/qunit-helpers.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/javascripts/helpers/qunit-helpers.js.es6 b/test/javascripts/helpers/qunit-helpers.js.es6 index d4513f3316..5e79f87647 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(); } }); }