From 45ef2ec8cdb87c55cec08af701d73b533a7e1e86 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 20 Mar 2019 20:13:15 +0100 Subject: [PATCH] DEV: do not wait for closed composer event on test (#7221) --- .../javascripts/discourse/components/composer-editor.js.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index 97a42379393..c73d3647b44 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -916,7 +916,10 @@ export default Ember.Component.extend({ Ember.run.next(() => { $("#main-outlet").css("padding-bottom", 0); // need to wait a bit for the "slide down" transition of the composer - Ember.run.later(() => this.appEvents.trigger("composer:closed"), 400); + Ember.run.later( + () => this.appEvents.trigger("composer:closed"), + Ember.testing ? 0 : 400 + ); }); if (this._enableAdvancedEditorPreviewSync())