mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:11:22 +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:
@ -11,7 +11,7 @@ export default Component.extend({
|
|||||||
return (this.users || []).map(user => {
|
return (this.users || []).map(user => {
|
||||||
let name = user.name;
|
let name = user.name;
|
||||||
let username = user.username;
|
let username = user.username;
|
||||||
let prioritizeName = prioritizeNameInUx(name, this.siteSettings);
|
let prioritizeName = prioritizeNameInUx(name);
|
||||||
let hideName = false;
|
let hideName = false;
|
||||||
if (name && normalize(username) === normalize(name)) {
|
if (name && normalize(username) === normalize(name)) {
|
||||||
hideName = true;
|
hideName = true;
|
||||||
|
@ -68,7 +68,7 @@ export default Component.extend(CardContentsBase, CanCheckEmails, CleansUp, {
|
|||||||
|
|
||||||
@discourseComputed("user.name")
|
@discourseComputed("user.name")
|
||||||
nameFirst(name) {
|
nameFirst(name) {
|
||||||
return prioritizeNameInUx(name, this.siteSettings);
|
return prioritizeNameInUx(name);
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("user")
|
@discourseComputed("user")
|
||||||
|
@ -103,7 +103,7 @@ export default Controller.extend(CanCheckEmails, {
|
|||||||
|
|
||||||
@discourseComputed("model.name")
|
@discourseComputed("model.name")
|
||||||
nameFirst(name) {
|
nameFirst(name) {
|
||||||
return prioritizeNameInUx(name, this.siteSettings);
|
return prioritizeNameInUx(name);
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("model.badge_count")
|
@discourseComputed("model.badge_count")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { get } from "@ember/object";
|
import { get } from "@ember/object";
|
||||||
import { registerUnbound, helperContext } from "discourse-common/lib/helpers";
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||||
import { avatarImg, formatUsername } from "discourse/lib/utilities";
|
import { avatarImg, formatUsername } from "discourse/lib/utilities";
|
||||||
import { prioritizeNameInUx } from "discourse/lib/settings";
|
import { prioritizeNameInUx } from "discourse/lib/settings";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
@ -32,7 +32,6 @@ export function classesForUser(u) {
|
|||||||
function renderAvatar(user, options) {
|
function renderAvatar(user, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
let siteSettings = helperContext().siteSettings;
|
|
||||||
if (user) {
|
if (user) {
|
||||||
const name = get(user, options.namePath || "name");
|
const name = get(user, options.namePath || "name");
|
||||||
const username = get(user, options.usernamePath || "username");
|
const username = get(user, options.usernamePath || "username");
|
||||||
@ -45,7 +44,7 @@ function renderAvatar(user, options) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
let displayName = prioritizeNameInUx(name, siteSettings)
|
let displayName = prioritizeNameInUx(name)
|
||||||
? name
|
? name
|
||||||
: formatUsername(username);
|
: formatUsername(username);
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@ export function autoLoadModules(container, registry) {
|
|||||||
});
|
});
|
||||||
let siteSettings = container.lookup("site-settings:main");
|
let siteSettings = container.lookup("site-settings:main");
|
||||||
let themeSettings = container.lookup("service:theme-settings");
|
let themeSettings = container.lookup("service:theme-settings");
|
||||||
createHelperContext({ siteSettings, themeSettings });
|
let keyValueStore = container.lookup("key-value-store:main");
|
||||||
|
createHelperContext({ siteSettings, themeSettings, keyValueStore });
|
||||||
registerHelpers(registry);
|
registerHelpers(registry);
|
||||||
registerRawHelpers(RawHandlebars, Handlebars);
|
registerRawHelpers(RawHandlebars, Handlebars);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import Session from "discourse/models/session";
|
|||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import Site from "discourse/models/site";
|
import Site from "discourse/models/site";
|
||||||
import { isTesting } from "discourse-common/config/environment";
|
import { isTesting } from "discourse-common/config/environment";
|
||||||
|
import User from "discourse/models/user";
|
||||||
|
|
||||||
let _trackView = false;
|
let _trackView = false;
|
||||||
let _transientHeader = null;
|
let _transientHeader = null;
|
||||||
@ -80,7 +81,7 @@ export function ajax() {
|
|||||||
function performAjax(resolve, reject) {
|
function performAjax(resolve, reject) {
|
||||||
args.headers = args.headers || {};
|
args.headers = args.headers || {};
|
||||||
|
|
||||||
if (Discourse.__container__.lookup("current-user:main")) {
|
if (User.current()) {
|
||||||
args.headers["Discourse-Logged-In"] = "true";
|
args.headers["Discourse-Logged-In"] = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
import getURL from "discourse-common/lib/get-url";
|
import getURL from "discourse-common/lib/get-url";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import { findAll } from "discourse/models/login-method";
|
import { findAll } from "discourse/models/login-method";
|
||||||
|
import { helperContext } from "discourse-common/lib/helpers";
|
||||||
|
|
||||||
export default function logout(siteSettings, keyValueStore) {
|
export default function logout() {
|
||||||
if (!siteSettings || !keyValueStore) {
|
const ctx = helperContext();
|
||||||
const container = Discourse.__container__;
|
let siteSettings = ctx.siteSettings;
|
||||||
siteSettings = siteSettings || container.lookup("site-settings:main");
|
let keyValueStore = ctx.keyValueStore;
|
||||||
keyValueStore = keyValueStore || container.lookup("key-value-store:main");
|
|
||||||
}
|
|
||||||
|
|
||||||
keyValueStore.abandonLocal();
|
keyValueStore.abandonLocal();
|
||||||
|
|
||||||
const redirect = siteSettings.logout_redirect;
|
const redirect = siteSettings.logout_redirect;
|
||||||
|
@ -1200,11 +1200,17 @@ function cmpVersions(a, b) {
|
|||||||
return segmentsA.length - segmentsB.length;
|
return segmentsA.length - segmentsB.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let _container;
|
||||||
|
|
||||||
|
export function setPluginContainer(container) {
|
||||||
|
_container = container;
|
||||||
|
}
|
||||||
|
|
||||||
function getPluginApi(version) {
|
function getPluginApi(version) {
|
||||||
version = version.toString();
|
version = version.toString();
|
||||||
if (cmpVersions(version, PLUGIN_API_VERSION) <= 0) {
|
if (cmpVersions(version, PLUGIN_API_VERSION) <= 0) {
|
||||||
if (!_pluginv01) {
|
if (!_pluginv01) {
|
||||||
_pluginv01 = new PluginApi(version, Discourse.__container__);
|
_pluginv01 = new PluginApi(version, _container);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are recycling the compatible object, but let's update to the higher version
|
// We are recycling the compatible object, but let's update to the higher version
|
||||||
@ -1267,4 +1273,5 @@ function decorate(klass, evt, cb, id) {
|
|||||||
|
|
||||||
export function resetPluginApi() {
|
export function resetPluginApi() {
|
||||||
_pluginv01 = null;
|
_pluginv01 = null;
|
||||||
|
_container = null;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,7 @@
|
|||||||
import deprecated from "discourse-common/lib/deprecated";
|
import { helperContext } from "discourse-common/lib/helpers";
|
||||||
|
|
||||||
export function prioritizeNameInUx(name, siteSettings) {
|
export function prioritizeNameInUx(name) {
|
||||||
if (!siteSettings) {
|
let siteSettings = helperContext().siteSettings;
|
||||||
deprecated(
|
|
||||||
"You must supply `prioritizeNameInUx` with a `siteSettings` object",
|
|
||||||
{
|
|
||||||
since: "2.6.0",
|
|
||||||
dropFrom: "2.7.0"
|
|
||||||
}
|
|
||||||
);
|
|
||||||
siteSettings = Discourse.SiteSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
!siteSettings.prioritize_username_in_ux && name && name.trim().length > 0
|
!siteSettings.prioritize_username_in_ux && name && name.trim().length > 0
|
||||||
|
@ -8,6 +8,7 @@ import { formatUsername } from "discourse/lib/utilities";
|
|||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { helperContext } from "discourse-common/lib/helpers";
|
import { helperContext } from "discourse-common/lib/helpers";
|
||||||
|
import Session from "discourse/models/session";
|
||||||
|
|
||||||
function getOpts(opts) {
|
function getOpts(opts) {
|
||||||
const siteSettings = Discourse.__container__.lookup("site-settings:main"),
|
const siteSettings = Discourse.__container__.lookup("site-settings:main"),
|
||||||
@ -59,14 +60,19 @@ export function sanitizeAsync(text, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadMarkdownIt() {
|
function loadMarkdownIt() {
|
||||||
if (Discourse.MarkdownItURL) {
|
return new Promise(resolve => {
|
||||||
return loadScript(Discourse.MarkdownItURL).catch(e => {
|
let markdownItURL = Session.currentProp("markdownItURL");
|
||||||
|
if (markdownItURL) {
|
||||||
|
loadScript(markdownItURL)
|
||||||
|
.then(() => resolve())
|
||||||
|
.catch(e => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return Promise.resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPrettyText(options) {
|
function createPrettyText(options) {
|
||||||
|
@ -165,7 +165,7 @@ const Bookmark = RestModel.extend({
|
|||||||
Bookmark.reopenClass({
|
Bookmark.reopenClass({
|
||||||
create(args) {
|
create(args) {
|
||||||
args = args || {};
|
args = args || {};
|
||||||
args.currentUser = args.currentUser || Discourse.currentUser;
|
args.currentUser = args.currentUser || User.current();
|
||||||
return this._super(args);
|
return this._super(args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1045,7 +1045,6 @@ const Composer = RestModel.extend({
|
|||||||
x => x.id === (parseInt(createdPost.category, 10) || 1)
|
x => x.id === (parseInt(createdPost.category, 10) || 1)
|
||||||
);
|
);
|
||||||
if (category) category.incrementProperty("topic_count");
|
if (category) category.incrementProperty("topic_count");
|
||||||
Discourse.notifyPropertyChange("globalNotice");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
composer.clearState();
|
composer.clearState();
|
||||||
|
@ -973,11 +973,6 @@ User.reopenClass(Singleton, {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
resetCurrent(user) {
|
|
||||||
this._super(user);
|
|
||||||
Discourse.currentUser = user;
|
|
||||||
},
|
|
||||||
|
|
||||||
checkUsername(username, email, for_user_id) {
|
checkUsername(username, email, for_user_id) {
|
||||||
return ajax(userPath("check_username"), {
|
return ajax(userPath("check_username"), {
|
||||||
data: { username, email, for_user_id }
|
data: { username, email, for_user_id }
|
||||||
|
@ -11,12 +11,15 @@ import {
|
|||||||
import { setupURL, setupS3CDN } from "discourse-common/lib/get-url";
|
import { setupURL, setupS3CDN } from "discourse-common/lib/get-url";
|
||||||
import deprecated from "discourse-common/lib/deprecated";
|
import deprecated from "discourse-common/lib/deprecated";
|
||||||
import { setIconList } from "discourse-common/lib/icon-library";
|
import { setIconList } from "discourse-common/lib/icon-library";
|
||||||
|
import { setPluginContainer } from "discourse/lib/plugin-api";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "discourse-bootstrap",
|
name: "discourse-bootstrap",
|
||||||
|
|
||||||
// The very first initializer to run
|
// The very first initializer to run
|
||||||
initialize(container, app) {
|
initialize(container, app) {
|
||||||
|
setPluginContainer(container);
|
||||||
|
|
||||||
// Our test environment has its own bootstrap code
|
// Our test environment has its own bootstrap code
|
||||||
if (isTesting()) {
|
if (isTesting()) {
|
||||||
return;
|
return;
|
||||||
@ -38,8 +41,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
app.CDN = setupData.cdn;
|
|
||||||
|
|
||||||
let baseUrl = setupData.baseUrl;
|
let baseUrl = setupData.baseUrl;
|
||||||
Object.defineProperty(app, "BaseUrl", {
|
Object.defineProperty(app, "BaseUrl", {
|
||||||
get() {
|
get() {
|
||||||
@ -63,51 +64,40 @@ export default {
|
|||||||
setupURL(setupData.cdn, baseUrl, setupData.baseUri);
|
setupURL(setupData.cdn, baseUrl, setupData.baseUri);
|
||||||
setEnvironment(setupData.environment);
|
setEnvironment(setupData.environment);
|
||||||
app.SiteSettings = PreloadStore.get("siteSettings");
|
app.SiteSettings = PreloadStore.get("siteSettings");
|
||||||
app.ThemeSettings = PreloadStore.get("themeSettings");
|
|
||||||
app.LetterAvatarVersion = setupData.letterAvatarVersion;
|
|
||||||
app.MarkdownItURL = setupData.markdownItUrl;
|
|
||||||
I18n.defaultLocale = setupData.defaultLocale;
|
I18n.defaultLocale = setupData.defaultLocale;
|
||||||
|
|
||||||
window.Logster = window.Logster || {};
|
window.Logster = window.Logster || {};
|
||||||
window.Logster.enabled = setupData.enableJsErrorReporting === "true";
|
window.Logster.enabled = setupData.enableJsErrorReporting === "true";
|
||||||
|
|
||||||
Session.currentProp("serviceWorkerURL", setupData.serviceWorkerUrl);
|
let session = Session.current();
|
||||||
Session.currentProp("assetVersion", setupData.assetVersion);
|
session.serviceWorkerURL = setupData.serviceWorkerUrl;
|
||||||
|
session.assetVersion = setupData.assetVersion;
|
||||||
Session.currentProp(
|
session.disableCustomCSS = setupData.disableCustomCss === "true";
|
||||||
"disableCustomCSS",
|
session.markdownItURL = setupData.markdownItUrl;
|
||||||
setupData.disableCustomCss === "true"
|
|
||||||
);
|
|
||||||
|
|
||||||
if (setupData.safeMode) {
|
if (setupData.safeMode) {
|
||||||
Session.currentProp("safe_mode", setupData.safeMode);
|
session.safe_mode = setupData.safeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session.currentProp(
|
session.darkModeAvailable =
|
||||||
"darkModeAvailable",
|
|
||||||
document.head.querySelectorAll(
|
document.head.querySelectorAll(
|
||||||
'link[media="(prefers-color-scheme: dark)"]'
|
'link[media="(prefers-color-scheme: dark)"]'
|
||||||
).length > 0
|
).length > 0;
|
||||||
);
|
|
||||||
|
|
||||||
Session.currentProp(
|
session.darkColorScheme =
|
||||||
"defaultColorSchemeIsDark",
|
|
||||||
!window.matchMedia("(prefers-color-scheme: dark)").matches &&
|
!window.matchMedia("(prefers-color-scheme: dark)").matches &&
|
||||||
getComputedStyle(document.documentElement)
|
getComputedStyle(document.documentElement)
|
||||||
.getPropertyValue("--scheme-type")
|
.getPropertyValue("--scheme-type")
|
||||||
.trim() === "dark"
|
.trim() === "dark";
|
||||||
);
|
|
||||||
|
|
||||||
Session.currentProp("highlightJsPath", setupData.highlightJsPath);
|
session.highlightJsPath = setupData.highlightJsPath;
|
||||||
Session.currentProp("svgSpritePath", setupData.svgSpritePath);
|
session.svgSpritePath = setupData.svgSpritePath;
|
||||||
|
|
||||||
if (isDevelopment()) {
|
if (isDevelopment()) {
|
||||||
setIconList(setupData.svgIconList);
|
setIconList(setupData.svgIconList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setupData.s3BaseUrl) {
|
if (setupData.s3BaseUrl) {
|
||||||
app.S3CDN = setupData.s3Cdn;
|
|
||||||
app.S3BaseUrl = setupData.s3BaseUrl;
|
|
||||||
setupS3CDN(setupData.s3BaseUrl, setupData.s3Cdn);
|
setupS3CDN(setupData.s3BaseUrl, setupData.s3Cdn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,9 +283,7 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
|||||||
|
|
||||||
_handleLogout() {
|
_handleLogout() {
|
||||||
if (this.currentUser) {
|
if (this.currentUser) {
|
||||||
this.currentUser
|
this.currentUser.destroySession().then(() => logout());
|
||||||
.destroySession()
|
|
||||||
.then(() => logout(this.siteSettings, this.keyValueStore));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -474,8 +474,7 @@ createWidget("post-notice", {
|
|||||||
|
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
const user =
|
const user =
|
||||||
this.siteSettings.display_name_on_posts &&
|
this.siteSettings.display_name_on_posts && prioritizeNameInUx(attrs.name)
|
||||||
prioritizeNameInUx(attrs.name, this.siteSettings)
|
|
||||||
? attrs.name
|
? attrs.name
|
||||||
: attrs.username;
|
: attrs.username;
|
||||||
let text, icon;
|
let text, icon;
|
||||||
|
@ -68,8 +68,7 @@ export default createWidget("poster-name", {
|
|||||||
const username = attrs.username;
|
const username = attrs.username;
|
||||||
const name = attrs.name;
|
const name = attrs.name;
|
||||||
const nameFirst =
|
const nameFirst =
|
||||||
this.siteSettings.display_name_on_posts &&
|
this.siteSettings.display_name_on_posts && prioritizeNameInUx(name);
|
||||||
prioritizeNameInUx(name, this.siteSettings);
|
|
||||||
const classNames = nameFirst
|
const classNames = nameFirst
|
||||||
? ["first", "full-name"]
|
? ["first", "full-name"]
|
||||||
: ["first", "username"];
|
: ["first", "username"];
|
||||||
|
@ -5,7 +5,7 @@ import { later } from "@ember/runloop";
|
|||||||
import sessionFixtures from "fixtures/session-fixtures";
|
import sessionFixtures from "fixtures/session-fixtures";
|
||||||
import HeaderComponent from "discourse/components/site-header";
|
import HeaderComponent from "discourse/components/site-header";
|
||||||
import { forceMobile, resetMobile } from "discourse/lib/mobile";
|
import { forceMobile, resetMobile } from "discourse/lib/mobile";
|
||||||
import { resetPluginApi } from "discourse/lib/plugin-api";
|
import { resetPluginApi, setPluginContainer } from "discourse/lib/plugin-api";
|
||||||
import {
|
import {
|
||||||
clearCache as clearOutletCache,
|
clearCache as clearOutletCache,
|
||||||
resetExtraClasses
|
resetExtraClasses
|
||||||
@ -173,6 +173,7 @@ export function acceptance(name, options) {
|
|||||||
resetPluginApi();
|
resetPluginApi();
|
||||||
Discourse.reset();
|
Discourse.reset();
|
||||||
this.container = getOwner(this);
|
this.container = getOwner(this);
|
||||||
|
setPluginContainer(this.container);
|
||||||
if (options.beforeEach) {
|
if (options.beforeEach) {
|
||||||
options.beforeEach.call(this);
|
options.beforeEach.call(this);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import EmailLog from "admin/models/email-log";
|
import EmailLog from "admin/models/email-log";
|
||||||
import { setPrefix } from "discourse-common/lib/get-url";
|
import { setPrefix } from "discourse-common/lib/get-url";
|
||||||
|
|
||||||
QUnit.module("Discourse.EmailLog");
|
QUnit.module("model:email-log");
|
||||||
|
|
||||||
QUnit.test("create", assert => {
|
QUnit.test("create", assert => {
|
||||||
assert.ok(EmailLog.create(), "it can be created without arguments");
|
assert.ok(EmailLog.create(), "it can be created without arguments");
|
||||||
|
@ -42,12 +42,13 @@
|
|||||||
//
|
//
|
||||||
//= require jquery.magnific-popup.min.js
|
//= require jquery.magnific-popup.min.js
|
||||||
|
|
||||||
|
let App = window.Discourse;
|
||||||
let resetSettings = require("helpers/site-settings").resetSettings;
|
let resetSettings = require("helpers/site-settings").resetSettings;
|
||||||
let createHelperContext = require("discourse-common/lib/helpers")
|
let createHelperContext = require("discourse-common/lib/helpers")
|
||||||
.createHelperContext;
|
.createHelperContext;
|
||||||
|
|
||||||
const buildResolver = require("discourse-common/resolver").buildResolver;
|
const buildResolver = require("discourse-common/resolver").buildResolver;
|
||||||
window.setResolver(buildResolver("discourse").create({ namespace: Discourse }));
|
window.setResolver(buildResolver("discourse").create({ namespace: App }));
|
||||||
|
|
||||||
sinon.config = {
|
sinon.config = {
|
||||||
injectIntoThis: false,
|
injectIntoThis: false,
|
||||||
@ -71,10 +72,10 @@ d.write(
|
|||||||
"<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>"
|
"<style>#ember-testing-container { position: absolute; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; } #ember-testing { zoom: 50%; }</style>"
|
||||||
);
|
);
|
||||||
|
|
||||||
Discourse.rootElement = "#ember-testing";
|
App.rootElement = "#ember-testing";
|
||||||
Discourse.setupForTesting();
|
App.setupForTesting();
|
||||||
Discourse.injectTestHelpers();
|
App.injectTestHelpers();
|
||||||
Discourse.start();
|
App.start();
|
||||||
|
|
||||||
// disable logster error reporting
|
// disable logster error reporting
|
||||||
if (window.Logster) {
|
if (window.Logster) {
|
||||||
|
Reference in New Issue
Block a user