DEV: Clear custom sidebar sections after each test (#17775)
Initializers are re-run before each test, so we need to clear out the list to avoid duplicates building up over multiple tests.
This commit is contained in:
parent
d1d760ae7b
commit
36446649ff
|
@ -71,6 +71,7 @@ import {
|
||||||
} from "discourse/lib/to-markdown";
|
} from "discourse/lib/to-markdown";
|
||||||
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
||||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||||
|
import { resetSidebarSection } from "discourse/lib/sidebar/custom-sections";
|
||||||
|
|
||||||
export function currentUser() {
|
export function currentUser() {
|
||||||
return User.create(sessionFixtures["/session/current.json"].current_user);
|
return User.create(sessionFixtures["/session/current.json"].current_user);
|
||||||
|
@ -198,6 +199,7 @@ export function testCleanup(container, app) {
|
||||||
clearLegacyResolverOptions();
|
clearLegacyResolverOptions();
|
||||||
clearTagsHtmlCallbacks();
|
clearTagsHtmlCallbacks();
|
||||||
clearToolbarCallbacks();
|
clearToolbarCallbacks();
|
||||||
|
resetSidebarSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function discourseModule(name, options) {
|
export function discourseModule(name, options) {
|
||||||
|
|
Loading…
Reference in New Issue