REFACTOR: Move bootbox to an import instead of global variable (#10533)

This commit is contained in:
Robin Ward
2020-08-26 12:57:13 -04:00
committed by GitHub
parent 354014099d
commit ff4de97dfd
91 changed files with 104 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ import { getOwner } from "discourse-common/lib/get-owner";
import { setTopicList } from "discourse/lib/topic-list-tracker";
import { setURLContainer } from "discourse/lib/url";
import { setDefaultOwner } from "discourse-common/lib/get-owner";
import bootbox from "bootbox";
export function currentUser() {
return User.create(sessionFixtures["/session/current.json"].current_user);
@@ -97,7 +98,7 @@ function AcceptanceModal(option, _relatedTarget) {
});
}
window.bootbox.$body = $("#ember-testing");
bootbox.$body = $("#ember-testing");
$.fn.modal = AcceptanceModal;
let _pretenderCallbacks = {};

View File

@@ -10,6 +10,7 @@ import {
import * as Utilities from "discourse/lib/utilities";
import User from "discourse/models/user";
import { discourseModule } from "helpers/qunit-helpers";
import bootbox from "bootbox";
discourseModule("lib:uploads");