mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:17:24 +08:00
Remove Discourse
constant usage (#10470)
* REFACTOR: Get us closer to no `Discourse` constants in tests * REFACTOR: Remove `Discourse.currentUser` * REFACTOR: `prioritizeNameInUx` is really a helper and can use context * REFACTOR: Rename test * REFACTOR: Remove `Discourse.MarkdownItURL` and use session * REFACTOR: Remove unused `LetterAvatarVersion` * REFACTOR: Remove unused `Discourse.ThemeSettings` * REFACTOR: Remove unused CDN constants * REFACTOR: The `globalNotice` property doesn't exist anymore * REFACTOR: Remove `Discourse.__container__` from plugin api * REFACTOR: Consider `logout()` a helper and remove container.
This commit is contained in:
@ -5,7 +5,7 @@ import { later } from "@ember/runloop";
|
||||
import sessionFixtures from "fixtures/session-fixtures";
|
||||
import HeaderComponent from "discourse/components/site-header";
|
||||
import { forceMobile, resetMobile } from "discourse/lib/mobile";
|
||||
import { resetPluginApi } from "discourse/lib/plugin-api";
|
||||
import { resetPluginApi, setPluginContainer } from "discourse/lib/plugin-api";
|
||||
import {
|
||||
clearCache as clearOutletCache,
|
||||
resetExtraClasses
|
||||
@ -173,6 +173,7 @@ export function acceptance(name, options) {
|
||||
resetPluginApi();
|
||||
Discourse.reset();
|
||||
this.container = getOwner(this);
|
||||
setPluginContainer(this.container);
|
||||
if (options.beforeEach) {
|
||||
options.beforeEach.call(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user