DEV: prevents toolbar callbacks to leak between tests (#9403)

This commit is contained in:
Joffrey JAFFEUX
2020-04-10 16:47:27 +02:00
committed by GitHub
parent b57d4586d7
commit 058506bb77
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { next } from "@ember/runloop";
import { clearToolbarCallbacks } from "discourse/components/d-editor";
import componentTest from "helpers/component-test";
import { withPluginApi } from "discourse/lib/plugin-api";
import formatTextWithSelection from "helpers/d-editor-helper";
@ -633,6 +634,11 @@ componentTest("emoji", {
});
this.set("value", "hello world.");
},
afterEach() {
clearToolbarCallbacks();
},
async test(assert) {
jumpEnd(find("textarea.d-editor-input")[0]);
await click("button.emoji");