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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import siteSettingFixture from "discourse/tests/fixtures/site-settings"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import I18n from "I18n"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import { 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 { skip } from "qunit";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { import {
acceptance, acceptance,

View File

@ -1,3 +1,4 @@
import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { import {
acceptance, 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { import {
acceptance, 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { run } from "@ember/runloop"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { extraConnectorClass } from "discourse/lib/plugin-connectors"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { skip } from "qunit";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import { import {
updateCurrentUser, 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 { test } from "qunit";
import { import {
acceptance, 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 { skip } from "qunit";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; 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 { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { withPluginApi } from "discourse/lib/plugin-api"; 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 { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper"; 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 { acceptance } from "discourse/tests/helpers/qunit-helpers";
import userFixtures from "discourse/tests/fixtures/user-fixtures"; import userFixtures from "discourse/tests/fixtures/user-fixtures";
import User from "discourse/models/user"; import User from "discourse/models/user";
import { click } from "@ember/test-helpers";
acceptance("User Card - Show Local Time", function (needs) { acceptance("User Card - Show Local Time", function (needs) {
needs.user(); needs.user();

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,7 @@
import { moduleForComponent } from "ember-qunit"; import { moduleForComponent } from "ember-qunit";
import componentTest from "discourse/tests/helpers/component-test"; import componentTest from "discourse/tests/helpers/component-test";
import pretender from "discourse/tests/helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
import { click } from "@ember/test-helpers";
moduleForComponent("admin-report", { moduleForComponent("admin-report", {
integration: true, 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 componentTest from "discourse/tests/helpers/component-test";
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import pretender from "discourse/tests/helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
import { click } from "@ember/test-helpers";
moduleForComponent("badge-title", { integration: true }); moduleForComponent("badge-title", { integration: true });

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,21 +19,20 @@ define("ember-qunit", () => {
}); });
let _app; let _app;
define("@ember/test-helpers", () => { define("@ember/test-helpers", () => {
return { let helpers = {
setResolver: window.setResolver,
setApplication(app) { setApplication(app) {
_app = app; _app = app;
}, },
getApplication() { getApplication() {
return _app; 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", () => { define("pretender", () => {
return { default: window.Pretender }; return { default: window.Pretender };