REFACTOR: Import `visit` helper rather than using a global variable

This commit is contained in:
Robin Ward 2020-10-14 16:10:38 -04:00
parent bb165ac8b1
commit 51d10db7f2
123 changed files with 125 additions and 5 deletions

View File

@ -8,6 +8,6 @@
"moduleForComponent": "off",
"testStart": "off",
"testDone": "off",
"sinon": "off"
"sinon": "off",
}
}

View File

@ -146,9 +146,6 @@ var define, requirejs;
"@ember/object/internals": {
guidFor: Ember.guidFor,
},
"@ember/test-helpers": {
setResolver: window.setResolver,
},
I18n: {
// eslint-disable-next-line
default: I18n,

View File

@ -1,5 +1,7 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("About");
test("viewing", async (assert) => {

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "discourse/tests/helpers/create-pretender";

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Log Term", { loggedIn: true });

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Logs", { loggedIn: true });

View File

@ -1,3 +1,4 @@
import { visit } 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Watched Words", { loggedIn: true });

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { test } from "qunit";
import I18n from "I18n";

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import pretender from "discourse/tests/helpers/create-pretender";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import {
acceptance,

View File

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

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscourseURL from "discourse/lib/url";

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscourseURL from "discourse/lib/url";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic Discovery - Mobile", { mobileView: true });

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { withPluginApi } from "discourse/lib/plugin-api";

View File

@ -1,3 +1,4 @@
import { visit } 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { withPluginApi } from "discourse/lib/plugin-api";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { skip } from "qunit";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

View File

@ -1,3 +1,4 @@
import { 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,3 +1,4 @@
import { visit } from "@ember/test-helpers";
import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";

View File

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

Some files were not shown because too many files have changed in this diff Show More