Move `click` and `fillIn` to imports

Previously they were global functions.
This commit is contained in:
Robin Ward 2020-10-26 15:43:29 -04:00
parent 690a38bc9b
commit e634513568
96 changed files with 106 additions and 80 deletions

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import siteSettingFixture from "discourse/tests/fixtures/site-settings";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import I18n from "I18n";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { click, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import Category from "discourse/models/category";
import {

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { skip } from "qunit";
import { test } from "qunit";
import I18n from "I18n";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

@ -1,3 +1,4 @@
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import {

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { run } from "@ember/runloop";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { extraConnectorClass } from "discourse/lib/plugin-connectors";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit, currentURL } from "@ember/test-helpers";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import {

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { visit, fillIn, click } from "@ember/test-helpers";
import { skip } from "qunit";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
updateCurrentUser,

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { withPluginApi } from "discourse/lib/plugin-api";

View File

@ -1,4 +1,4 @@
import { visit } from "@ember/test-helpers";
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper";

View File

@ -3,6 +3,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import userFixtures from "discourse/tests/fixtures/user-fixtures";
import User from "discourse/models/user";
import { click } from "@ember/test-helpers";
acceptance("User Card - Show Local Time", function (needs) {
needs.user();

View File

@ -1,6 +1,7 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click } from "@ember/test-helpers";
acceptance("User Drafts", function (needs) {
needs.user();

View File

@ -5,6 +5,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import Site from "discourse/models/site";
import Session from "discourse/models/session";
import cookie, { removeCookie } from "discourse/lib/cookie";
import { click } from "@ember/test-helpers";
acceptance("User Preferences - Interface", function (needs) {
needs.user();

View File

@ -1,6 +1,7 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click } from "@ember/test-helpers";
acceptance("User Routes", function (needs) {
needs.user();

View File

@ -1,5 +1,6 @@
import { moduleForComponent } from "ember-qunit";
import { isEmpty } from "@ember/utils";
import { click, fillIn } from "@ember/test-helpers";
function checkSelectKitIsNotExpanded(selector) {
if (find(selector).hasClass("is-expanded")) {

View File

@ -1,6 +1,7 @@
import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test";
import pretender from "discourse/tests/helpers/create-pretender";
import { click } from "@ember/test-helpers";
moduleForComponent("admin-report", {
integration: true,

View File

@ -3,6 +3,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import componentTest from "discourse/tests/helpers/component-test";
import EmberObject from "@ember/object";
import pretender from "discourse/tests/helpers/create-pretender";
import { click } from "@ember/test-helpers";
moduleForComponent("badge-title", { integration: true });

View File

@ -9,6 +9,7 @@ import {
setTextareaSelection,
getTextareaSelection,
} from "discourse/tests/helpers/textarea-selection-helper";
import { fillIn, click } from "@ember/test-helpers";
moduleForComponent("d-editor", { integration: true });

View File

@ -1,5 +1,6 @@
import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test";
import { click } from "@ember/test-helpers";
moduleForComponent("date-input", { integration: true });

View File

@ -1,5 +1,6 @@
import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test";
import { click } from "@ember/test-helpers";
moduleForComponent("date-time-input", { integration: true });

View File

@ -1,5 +1,7 @@
import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test";
import { click } from "@ember/test-helpers";
moduleForComponent("image-uploader", { integration: true });
componentTest("with image", {

View File

@ -1,6 +1,8 @@
import { moduleForComponent } from "ember-qunit";
import I18n from "I18n";
import componentTest from "discourse/tests/helpers/component-test";
import { fillIn, click } from "@ember/test-helpers";
moduleForComponent("secret-value-list", { integration: true });
componentTest("adding a value", {

View File

@ -1,6 +1,7 @@
import { moduleForComponent } from "ember-qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import componentTest from "discourse/tests/helpers/component-test";
import { click } from "@ember/test-helpers";
moduleForComponent("select-kit/combo-box", {
integration: true,

View File

@ -1,5 +1,7 @@
import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test";
import { click, fillIn } from "@ember/test-helpers";
moduleForComponent("simple-list", { integration: true });
componentTest("adding a value", {

View File

@ -2,6 +2,7 @@ import sinon from "sinon";
import { moduleForComponent } from "ember-qunit";
import I18n from "I18n";
import componentTest from "discourse/tests/helpers/component-test";
import { fillIn } from "@ember/test-helpers";
moduleForComponent("text-field", { integration: true });

View File

@ -1,6 +1,8 @@
import { moduleForComponent } from "ember-qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import componentTest from "discourse/tests/helpers/component-test";
import { click } from "@ember/test-helpers";
moduleForComponent("value-list", { integration: true });
componentTest("adding a value", {

View File

@ -2,6 +2,7 @@ import {
moduleForWidget,
widgetTest,
} from "discourse/tests/helpers/widget-test";
import { click } from "@ember/test-helpers";
moduleForWidget("header");

View File

@ -2,6 +2,7 @@ import {
moduleForWidget,
widgetTest,
} from "discourse/tests/helpers/widget-test";
import { click } from "@ember/test-helpers";
moduleForWidget("post-links");

View File

@ -4,6 +4,7 @@ import {
moduleForWidget,
widgetTest,
} from "discourse/tests/helpers/widget-test";
import { click } from "@ember/test-helpers";
moduleForWidget("post");

View File

@ -5,6 +5,7 @@ import {
moduleForWidget,
widgetTest,
} from "discourse/tests/helpers/widget-test";
import { click } from "@ember/test-helpers";
moduleForWidget("user-menu");

View File

@ -3,6 +3,7 @@ import {
moduleForWidget,
widgetTest,
} from "discourse/tests/helpers/widget-test";
import { click } from "@ember/test-helpers";
moduleForWidget("widget-dropdown");

View File

@ -8,6 +8,7 @@ import { createWidget } from "discourse/widgets/widget";
import { withPluginApi } from "discourse/lib/plugin-api";
import { Promise } from "rsvp";
import hbs from "discourse/widgets/hbs-compiler";
import { click } from "@ember/test-helpers";
moduleForWidget("base");

View File

@ -19,21 +19,20 @@ define("ember-qunit", () => {
});
let _app;
define("@ember/test-helpers", () => {
return {
setResolver: window.setResolver,
let helpers = {
setApplication(app) {
_app = app;
},
getApplication() {
return _app;
},
visit() {
return window.visit(...arguments);
},
currentURL() {
return window.currentURL(...arguments);
},
};
["click", "visit", "currentURL", "fillIn", "setResolver"].forEach((attr) => {
helpers[attr] = function () {
return window[attr](...arguments);
};
});
return helpers;
});
define("pretender", () => {
return { default: window.Pretender };