mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 00:09:39 +08:00
DEV: Remove long-deprecated test helpers (#29160)
nothing in all-the* is using them anymore
This commit is contained in:
parent
5b69329656
commit
578542ca98
@ -438,22 +438,6 @@ export function acceptance(name, optionsOrCallback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function controllerFor(controller, model) {
|
|
||||||
deprecated(
|
|
||||||
'controllerFor is deprecated. Use the standard `getOwner(this).lookup("controller:NAME")` instead',
|
|
||||||
{
|
|
||||||
id: "discourse.controller-for",
|
|
||||||
since: "3.0.0.beta14",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
controller = getOwnerWithFallback(this).lookup("controller:" + controller);
|
|
||||||
if (model) {
|
|
||||||
controller.set("model", model);
|
|
||||||
}
|
|
||||||
return controller;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function fixture(selector) {
|
export function fixture(selector) {
|
||||||
if (selector) {
|
if (selector) {
|
||||||
return document.querySelector(`#qunit-fixture ${selector}`);
|
return document.querySelector(`#qunit-fixture ${selector}`);
|
||||||
@ -461,21 +445,6 @@ export function fixture(selector) {
|
|||||||
return document.querySelector("#qunit-fixture");
|
return document.querySelector("#qunit-fixture");
|
||||||
}
|
}
|
||||||
|
|
||||||
QUnit.assert.not = function (actual, message) {
|
|
||||||
deprecated("assert.not() is deprecated. Use assert.false() instead.", {
|
|
||||||
since: "2.9.0.beta1",
|
|
||||||
dropFrom: "2.10.0.beta1",
|
|
||||||
id: "discourse.qunit.assert-not",
|
|
||||||
});
|
|
||||||
|
|
||||||
this.pushResult({
|
|
||||||
result: !actual,
|
|
||||||
actual,
|
|
||||||
expected: !actual,
|
|
||||||
message,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
QUnit.assert.blank = function (actual, message) {
|
QUnit.assert.blank = function (actual, message) {
|
||||||
this.pushResult({
|
this.pushResult({
|
||||||
result: isEmpty(actual),
|
result: isEmpty(actual),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user