diff --git a/.eslintignore b/.eslintignore index f0d962bb0f4..516be7613de 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,8 +10,8 @@ lib/highlight_js/ plugins/**/lib/javascripts/locale public/ vendor/ -test/javascripts/test_helper.js -test/javascripts/fixtures -test/javascripts/helpers/assertions.js +app/assets/javascripts/discourse/tests/test_helper.js +app/assets/javascripts/discourse/tests/fixtures +app/assets/javascripts/discourse/tests/helpers/assertions.js node_modules/ dist/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90508e1b295..3c2b32e6ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,7 +147,7 @@ jobs: - name: ESLint (core) if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'CORE' - run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern app/assets/javascripts test/javascripts + run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern app/assets/javascripts - name: ESLint (core plugins) if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'CORE' @@ -164,7 +164,6 @@ jobs: yarn prettier --list-different \ "app/assets/stylesheets/**/*.scss" \ "app/assets/javascripts/**/*.{js,es6}" \ - "test/javascripts/**/*.{js,es6}" \ "plugins/**/assets/stylesheets/**/*.scss" \ "plugins/**/assets/javascripts/**/*.{js,es6}" diff --git a/.prettierignore b/.prettierignore index b97584a5f29..0d02324d6fe 100644 --- a/.prettierignore +++ b/.prettierignore @@ -18,8 +18,8 @@ lib/highlight_js/ plugins/**/lib/javascripts/locale public/ vendor/ -test/javascripts/test_helper.js -test/javascripts/fixtures -test/javascripts/helpers/assertions.js +app/assets/javascripts/discourse/tests/test_helper.js +app/assets/javascripts/discourse/tests/fixtures +app/assets/javascripts/discourse/tests/helpers/assertions.js node_modules/ dist/ diff --git a/test/javascripts/admin/integration/components/group-list-setting-test.js b/app/assets/javascripts/admin/tests/admin/integration/components/group-list-setting-test.js similarity index 89% rename from test/javascripts/admin/integration/components/group-list-setting-test.js rename to app/assets/javascripts/admin/tests/admin/integration/components/group-list-setting-test.js index 2472d66a432..19ab1635bd6 100644 --- a/test/javascripts/admin/integration/components/group-list-setting-test.js +++ b/app/assets/javascripts/admin/tests/admin/integration/components/group-list-setting-test.js @@ -1,6 +1,6 @@ import EmberObject from "@ember/object"; -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("group-list", { integration: true }); diff --git a/test/javascripts/admin/integration/components/themes-list-item-test.js b/app/assets/javascripts/admin/tests/admin/integration/components/themes-list-item-test.js similarity index 96% rename from test/javascripts/admin/integration/components/themes-list-item-test.js rename to app/assets/javascripts/admin/tests/admin/integration/components/themes-list-item-test.js index d983624c6a0..05c52ac5e39 100644 --- a/test/javascripts/admin/integration/components/themes-list-item-test.js +++ b/app/assets/javascripts/admin/tests/admin/integration/components/themes-list-item-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; import Theme from "admin/models/theme"; moduleForComponent("themes-list-item", { integration: true }); diff --git a/test/javascripts/admin/integration/components/themes-list-test.js b/app/assets/javascripts/admin/tests/admin/integration/components/themes-list-test.js similarity index 98% rename from test/javascripts/admin/integration/components/themes-list-test.js rename to app/assets/javascripts/admin/tests/admin/integration/components/themes-list-test.js index 631e84b70b7..ed462ada167 100644 --- a/test/javascripts/admin/integration/components/themes-list-test.js +++ b/app/assets/javascripts/admin/tests/admin/integration/components/themes-list-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; import Theme, { THEMES, COMPONENTS } from "admin/models/theme"; moduleForComponent("themes-list", { integration: true }); diff --git a/test/javascripts/admin/unit/controllers/admin-customize-themes-show-test.js b/app/assets/javascripts/admin/tests/admin/unit/controllers/admin-customize-themes-show-test.js similarity index 100% rename from test/javascripts/admin/unit/controllers/admin-customize-themes-show-test.js rename to app/assets/javascripts/admin/tests/admin/unit/controllers/admin-customize-themes-show-test.js diff --git a/test/javascripts/admin/unit/controllers/admin-customize-themes-test.js b/app/assets/javascripts/admin/tests/admin/unit/controllers/admin-customize-themes-test.js similarity index 100% rename from test/javascripts/admin/unit/controllers/admin-customize-themes-test.js rename to app/assets/javascripts/admin/tests/admin/unit/controllers/admin-customize-themes-test.js diff --git a/test/javascripts/admin/unit/controllers/admin-user-badges-test.js b/app/assets/javascripts/admin/tests/admin/unit/controllers/admin-user-badges-test.js similarity index 100% rename from test/javascripts/admin/unit/controllers/admin-user-badges-test.js rename to app/assets/javascripts/admin/tests/admin/unit/controllers/admin-user-badges-test.js diff --git a/test/javascripts/admin/unit/models/theme-test.js b/app/assets/javascripts/admin/tests/admin/unit/models/theme-test.js similarity index 100% rename from test/javascripts/admin/unit/models/theme-test.js rename to app/assets/javascripts/admin/tests/admin/unit/models/theme-test.js diff --git a/app/assets/javascripts/discourse-loader.js b/app/assets/javascripts/discourse-loader.js index 28b0998d85b..bf3d0ccae75 100644 --- a/app/assets/javascripts/discourse-loader.js +++ b/app/assets/javascripts/discourse-loader.js @@ -1,12 +1,17 @@ var define, requirejs; (function () { - var JS_MODULES = {}; - var ALIASES = { + let JS_MODULES = {}; + const ALIASES = { "ember-addons/ember-computed-decorators": "discourse-common/utils/decorators", "discourse/lib/raw-templates": "discourse-common/lib/raw-templates", "preload-store": "discourse/lib/preload-store", + "fixtures/user_fixtures": "discourse/tests/fixtures/user-fixtures", + }; + const ALIAS_PREPEND = { + fixtures: "discourse/tests/", + helpers: "discourse/tests/", }; // In future versions of ember we don't need this @@ -299,11 +304,15 @@ var define, requirejs; } function transformForAliases(name) { - var alias = ALIASES[name]; + let alias = ALIASES[name]; if (!alias) { - return name; + let segment = name.split("/")[0]; + let prepend = ALIAS_PREPEND[segment]; + if (!prepend) { + return name; + } + alias = prepend + name; } - deprecatedModule(name, alias); return alias; } diff --git a/test/javascripts/acceptance/about-test.js b/app/assets/javascripts/discourse/tests/acceptance/about-test.js similarity index 83% rename from test/javascripts/acceptance/about-test.js rename to app/assets/javascripts/discourse/tests/acceptance/about-test.js index 755fa7232b1..3b50422d1e6 100644 --- a/test/javascripts/acceptance/about-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/about-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("About"); QUnit.test("viewing", async (assert) => { diff --git a/test/javascripts/acceptance/account-created-test.js b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js similarity index 97% rename from test/javascripts/acceptance/account-created-test.js rename to app/assets/javascripts/discourse/tests/acceptance/account-created-test.js index 1680f140880..3a93a2fe206 100644 --- a/test/javascripts/acceptance/account-created-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Account Created"); diff --git a/test/javascripts/acceptance/admin-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js similarity index 87% rename from test/javascripts/acceptance/admin-emails-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js index 1de408c83ea..8a434281723 100644 --- a/test/javascripts/acceptance/admin-emails-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Admin - Emails", { loggedIn: true }); diff --git a/test/javascripts/acceptance/admin-search-log-term-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js similarity index 85% rename from test/javascripts/acceptance/admin-search-log-term-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js index ea5e96e2757..10747801eee 100644 --- a/test/javascripts/acceptance/admin-search-log-term-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Search Log Term", { loggedIn: true }); QUnit.skip("show search log term details", async (assert) => { diff --git a/test/javascripts/acceptance/admin-search-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js similarity index 87% rename from test/javascripts/acceptance/admin-search-logs-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js index fafbd651cdd..230921fc6c7 100644 --- a/test/javascripts/acceptance/admin-search-logs-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Search Logs", { loggedIn: true }); QUnit.skip("show search logs", async (assert) => { diff --git a/test/javascripts/acceptance/admin-site-settings-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js similarity index 96% rename from test/javascripts/acceptance/admin-site-settings-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js index 0780a1b3cbf..d2201846f7e 100644 --- a/test/javascripts/acceptance/admin-site-settings-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import siteSettingFixture from "fixtures/site_settings"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import siteSettingFixture from "discourse/tests/fixtures/site-settings"; var titleOverride = undefined; diff --git a/test/javascripts/acceptance/admin-site-text-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js similarity index 95% rename from test/javascripts/acceptance/admin-site-text-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js index 06bed8874f3..6132441f0a1 100644 --- a/test/javascripts/acceptance/admin-site-text-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Site Texts", { loggedIn: true }); diff --git a/test/javascripts/acceptance/admin-suspend-user-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js similarity index 95% rename from test/javascripts/acceptance/admin-suspend-user-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js index 9f67ff1beee..1eba7ffc3ea 100644 --- a/test/javascripts/acceptance/admin-suspend-user-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Suspend User", { loggedIn: true, diff --git a/test/javascripts/acceptance/admin-user-badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js similarity index 76% rename from test/javascripts/acceptance/admin-user-badges-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js index 9686b2bba0c..561f0f0996e 100644 --- a/test/javascripts/acceptance/admin-user-badges-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Users Badges", { loggedIn: true }); diff --git a/test/javascripts/acceptance/admin-user-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js similarity index 96% rename from test/javascripts/acceptance/admin-user-emails-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js index 7e21e056aa7..2f931eb67ac 100644 --- a/test/javascripts/acceptance/admin-user-emails-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - User Emails", { loggedIn: true }); diff --git a/test/javascripts/acceptance/admin-user-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js similarity index 92% rename from test/javascripts/acceptance/admin-user-index-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js index 841b1a6f8b2..bef0b7c8245 100644 --- a/test/javascripts/acceptance/admin-user-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js @@ -1,6 +1,6 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Admin - User Index", { loggedIn: true, diff --git a/test/javascripts/acceptance/admin-users-list-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js similarity index 97% rename from test/javascripts/acceptance/admin-users-list-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js index db734913320..6053f4d37e2 100644 --- a/test/javascripts/acceptance/admin-users-list-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Users List", { loggedIn: true }); diff --git a/test/javascripts/acceptance/admin-watched-words-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js similarity index 96% rename from test/javascripts/acceptance/admin-watched-words-test.js rename to app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js index 9ee3356a31f..3fcc308114d 100644 --- a/test/javascripts/acceptance/admin-watched-words-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Watched Words", { loggedIn: true }); QUnit.test("list words in groups", async (assert) => { diff --git a/test/javascripts/acceptance/auth-complete-test.js b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js similarity index 93% rename from test/javascripts/acceptance/auth-complete-test.js rename to app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js index d7f43d5dd1c..a52c027f593 100644 --- a/test/javascripts/acceptance/auth-complete-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Auth Complete", { beforeEach() { const node = document.createElement("meta"); diff --git a/test/javascripts/acceptance/badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js similarity index 85% rename from test/javascripts/acceptance/badges-test.js rename to app/assets/javascripts/discourse/tests/acceptance/badges-test.js index 2707bb3b374..7e922571bfa 100644 --- a/test/javascripts/acceptance/badges-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Badges", { loggedIn: true }); diff --git a/test/javascripts/acceptance/bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js similarity index 97% rename from test/javascripts/acceptance/bookmarks-test.js rename to app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js index c897b6fb65a..0b13db4b6ac 100644 --- a/test/javascripts/acceptance/bookmarks-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js @@ -1,12 +1,13 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; import { acceptance, loggedInUser, acceptanceUseFakeClock, -} from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; -import { parsePostData } from "helpers/create-pretender"; +} from "discourse/tests/helpers/qunit-helpers"; +import pretender, { + parsePostData, +} from "discourse/tests/helpers/create-pretender"; acceptance("Bookmarking", { loggedIn: true, diff --git a/test/javascripts/acceptance/category-banner-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js similarity index 94% rename from test/javascripts/acceptance/category-banner-test.js rename to app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js index 8962b68c7bb..57a4d5f029d 100644 --- a/test/javascripts/acceptance/category-banner-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import DiscoveryFixtures from "fixtures/discovery_fixtures"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; acceptance("Category Banners", { pretend(server, helper) { diff --git a/test/javascripts/acceptance/category-chooser-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js similarity index 88% rename from test/javascripts/acceptance/category-chooser-test.js rename to app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js index 1642a7c2811..183d1c90827 100644 --- a/test/javascripts/acceptance/category-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("CategoryChooser", { loggedIn: true, diff --git a/test/javascripts/acceptance/category-edit-security-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js similarity index 96% rename from test/javascripts/acceptance/category-edit-security-test.js rename to app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js index e6e0e7fd149..ece3a6417f9 100644 --- a/test/javascripts/acceptance/category-edit-security-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Category Edit - security", { loggedIn: true, diff --git a/test/javascripts/acceptance/category-edit-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js similarity index 95% rename from test/javascripts/acceptance/category-edit-test.js rename to app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js index a3a8268c804..854927d8092 100644 --- a/test/javascripts/acceptance/category-edit-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js @@ -1,6 +1,6 @@ -import selectKit from "helpers/select-kit-helper"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; import DiscourseURL from "discourse/lib/url"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Category Edit", { loggedIn: true, diff --git a/test/javascripts/acceptance/click-track-test.js b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js similarity index 78% rename from test/javascripts/acceptance/click-track-test.js rename to app/assets/javascripts/discourse/tests/acceptance/click-track-test.js index d8a982d61ce..579345e988b 100644 --- a/test/javascripts/acceptance/click-track-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js @@ -1,5 +1,5 @@ -import pretender from "helpers/create-pretender"; -import { acceptance } from "helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Click Track", {}); diff --git a/test/javascripts/acceptance/composer-actions-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js similarity index 99% rename from test/javascripts/acceptance/composer-actions-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js index 821665371a2..6c8d1512d54 100644 --- a/test/javascripts/acceptance/composer-actions-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; import { _clearSnapshots } from "select-kit/components/composer-actions"; import { toggleCheckDraftPopup } from "discourse/controllers/composer"; import Draft from "discourse/models/draft"; diff --git a/test/javascripts/acceptance/composer-attachment-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js similarity index 96% rename from test/javascripts/acceptance/composer-attachment-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js index 3195d30153f..a558654b517 100644 --- a/test/javascripts/acceptance/composer-attachment-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; function setupPretender(server, helper) { server.post("/uploads/lookup-urls", () => { diff --git a/test/javascripts/acceptance/composer-edit-conflict-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js similarity index 94% rename from test/javascripts/acceptance/composer-edit-conflict-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js index 56a37a4cf80..7f91a20c7b3 100644 --- a/test/javascripts/acceptance/composer-edit-conflict-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Composer - Edit conflict", { loggedIn: true, diff --git a/test/javascripts/acceptance/composer-hyperlink-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js similarity index 97% rename from test/javascripts/acceptance/composer-hyperlink-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js index fb21f250977..817e933684e 100644 --- a/test/javascripts/acceptance/composer-hyperlink-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer - Hyperlink", { loggedIn: true, diff --git a/test/javascripts/acceptance/composer-onebox-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js similarity index 96% rename from test/javascripts/acceptance/composer-onebox-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js index c51ad0cc199..a214e56f25c 100644 --- a/test/javascripts/acceptance/composer-onebox-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer - Onebox", { loggedIn: true, diff --git a/test/javascripts/acceptance/composer-tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js similarity index 91% rename from test/javascripts/acceptance/composer-tags-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js index da2502158bf..df50610ad3a 100644 --- a/test/javascripts/acceptance/composer-tags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js @@ -1,6 +1,9 @@ import Category from "discourse/models/category"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("Composer - Tags", { loggedIn: true, diff --git a/test/javascripts/acceptance/composer-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js similarity index 99% rename from test/javascripts/acceptance/composer-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-test.js index 0639560a882..1d1061225ec 100644 --- a/test/javascripts/acceptance/composer-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js @@ -1,7 +1,7 @@ import I18n from "I18n"; import { run } from "@ember/runloop"; -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { toggleCheckDraftPopup } from "discourse/controllers/composer"; import Draft from "discourse/models/draft"; import { Promise } from "rsvp"; diff --git a/test/javascripts/acceptance/composer-topic-links-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js similarity index 98% rename from test/javascripts/acceptance/composer-topic-links-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js index a962bbc7fd7..0fa875c2838 100644 --- a/test/javascripts/acceptance/composer-topic-links-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer topic featured links", { loggedIn: true, diff --git a/test/javascripts/acceptance/composer-uncategorized-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js similarity index 94% rename from test/javascripts/acceptance/composer-uncategorized-test.js rename to app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js index 26ff2f1148c..54d91404bb9 100644 --- a/test/javascripts/acceptance/composer-uncategorized-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js @@ -1,5 +1,8 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance( "Composer disabled, uncategorized not allowed when any topic_template present", diff --git a/test/javascripts/acceptance/create-account-external-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js similarity index 94% rename from test/javascripts/acceptance/create-account-external-test.js rename to app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js index 75466ce96d9..e9f844fc6c5 100644 --- a/test/javascripts/acceptance/create-account-external-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Create Account - external auth", { beforeEach() { diff --git a/test/javascripts/acceptance/create-account-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js similarity index 96% rename from test/javascripts/acceptance/create-account-user-fields-test.js rename to app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js index 8bd6f0ca998..138428a294e 100644 --- a/test/javascripts/acceptance/create-account-user-fields-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Create Account - User Fields", { site: { diff --git a/test/javascripts/acceptance/custom-html-set-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js similarity index 92% rename from test/javascripts/acceptance/custom-html-set-test.js rename to app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js index 84c235aba9c..51fb329d5e3 100644 --- a/test/javascripts/acceptance/custom-html-set-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { setCustomHTML } from "discourse/helpers/custom-html"; import PreloadStore from "discourse/lib/preload-store"; diff --git a/test/javascripts/acceptance/custom-html-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js similarity index 85% rename from test/javascripts/acceptance/custom-html-template-test.js rename to app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js index 21fff43f41e..25d2d64f2a1 100644 --- a/test/javascripts/acceptance/custom-html-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("CustomHTML template", { beforeEach() { diff --git a/test/javascripts/acceptance/dashboard-test.js b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js similarity index 96% rename from test/javascripts/acceptance/dashboard-test.js rename to app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js index d2296ad1f3b..600f86a6843 100644 --- a/test/javascripts/acceptance/dashboard-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Dashboard", { loggedIn: true, diff --git a/test/javascripts/acceptance/email-notice-test.js b/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js similarity index 91% rename from test/javascripts/acceptance/email-notice-test.js rename to app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js index 2a664140f5e..dfc1a81cc3c 100644 --- a/test/javascripts/acceptance/email-notice-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Email Disabled Banner", { loggedIn: true, diff --git a/test/javascripts/acceptance/emoji-picker-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js similarity index 98% rename from test/javascripts/acceptance/emoji-picker-test.js rename to app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js index f0abfc61723..ad0b3d37d73 100644 --- a/test/javascripts/acceptance/emoji-picker-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("EmojiPicker", { loggedIn: true, diff --git a/test/javascripts/acceptance/emoji-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js similarity index 93% rename from test/javascripts/acceptance/emoji-test.js rename to app/assets/javascripts/discourse/tests/acceptance/emoji-test.js index 00218ffc3c4..f23d251d373 100644 --- a/test/javascripts/acceptance/emoji-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js @@ -1,5 +1,5 @@ import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Emoji", { loggedIn: true }); diff --git a/test/javascripts/acceptance/encoded-category-test.js b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js similarity index 92% rename from test/javascripts/acceptance/encoded-category-test.js rename to app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js index d31e71d6628..51b686b3125 100644 --- a/test/javascripts/acceptance/encoded-category-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import DiscoveryFixtures from "fixtures/discovery_fixtures"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; acceptance("Encoded Sub Category Discovery", { pretend(server, helper) { diff --git a/test/javascripts/acceptance/enforce-second-factor-test.js b/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js similarity index 95% rename from test/javascripts/acceptance/enforce-second-factor-test.js rename to app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js index 6f59631d875..d5249a3a307 100644 --- a/test/javascripts/acceptance/enforce-second-factor-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Enforce Second Factor", { loggedIn: true, diff --git a/test/javascripts/acceptance/forgot-password-test.js b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js similarity index 96% rename from test/javascripts/acceptance/forgot-password-test.js rename to app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js index bbd532a6516..e7f7bc0adac 100644 --- a/test/javascripts/acceptance/forgot-password-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; let userFound = false; diff --git a/test/javascripts/acceptance/group-card-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-card-mobile-test.js similarity index 89% rename from test/javascripts/acceptance/group-card-mobile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-card-mobile-test.js index d7a5e8083c6..106b7e00c0a 100644 --- a/test/javascripts/acceptance/group-card-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-card-mobile-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import DiscourseURL from "discourse/lib/url"; acceptance("Group Card - Mobile", { mobileView: true }); diff --git a/test/javascripts/acceptance/group-card-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-card-test.js similarity index 88% rename from test/javascripts/acceptance/group-card-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-card-test.js index 06a1d596c56..4cb5db2ba86 100644 --- a/test/javascripts/acceptance/group-card-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-card-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import DiscourseURL from "discourse/lib/url"; acceptance("Group Card"); diff --git a/test/javascripts/acceptance/group-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js similarity index 93% rename from test/javascripts/acceptance/group-index-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-index-test.js index a35956958e1..0d8f4373358 100644 --- a/test/javascripts/acceptance/group-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js @@ -1,5 +1,8 @@ import I18n from "I18n"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Group Members"); diff --git a/test/javascripts/acceptance/group-manage-categories-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js similarity index 90% rename from test/javascripts/acceptance/group-manage-categories-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js index af3d850f05e..99f64a92e92 100644 --- a/test/javascripts/acceptance/group-manage-categories-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Category Notification Defaults"); QUnit.test("As an anonymous user", async (assert) => { diff --git a/test/javascripts/acceptance/group-manage-interaction-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js similarity index 95% rename from test/javascripts/acceptance/group-manage-interaction-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js index 0f2d2b741ca..60c4aa35cdc 100644 --- a/test/javascripts/acceptance/group-manage-interaction-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Interaction Settings", { loggedIn: true, diff --git a/test/javascripts/acceptance/group-manage-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js similarity index 97% rename from test/javascripts/acceptance/group-manage-logs-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js index 0e1976ddc55..d1fb0010320 100644 --- a/test/javascripts/acceptance/group-manage-logs-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Group logs", { loggedIn: true, diff --git a/test/javascripts/acceptance/group-manage-membership-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js similarity index 95% rename from test/javascripts/acceptance/group-manage-membership-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js index 0e2af2fee56..2d9876c0a2c 100644 --- a/test/javascripts/acceptance/group-manage-membership-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js @@ -1,5 +1,8 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("Managing Group Membership", { loggedIn: true, diff --git a/test/javascripts/acceptance/group-manage-profile-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js similarity index 92% rename from test/javascripts/acceptance/group-manage-profile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js index 34c744dee7b..4c13bf32913 100644 --- a/test/javascripts/acceptance/group-manage-profile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Profile"); QUnit.test("As an anonymous user", async (assert) => { diff --git a/test/javascripts/acceptance/group-manage-tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js similarity index 90% rename from test/javascripts/acceptance/group-manage-tags-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js index e71c43f64c4..71c1c6c7e1b 100644 --- a/test/javascripts/acceptance/group-manage-tags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Tag Notification Defaults"); QUnit.test("As an anonymous user", async (assert) => { diff --git a/test/javascripts/acceptance/group-requests-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js similarity index 96% rename from test/javascripts/acceptance/group-requests-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js index 39759517f92..952089e7859 100644 --- a/test/javascripts/acceptance/group-requests-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import { parsePostData } from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import { parsePostData } from "discourse/tests/helpers/create-pretender"; let requests = []; diff --git a/test/javascripts/acceptance/group-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-test.js similarity index 97% rename from test/javascripts/acceptance/group-test.js rename to app/assets/javascripts/discourse/tests/acceptance/group-test.js index 3990c05558d..169aae43913 100644 --- a/test/javascripts/acceptance/group-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-test.js @@ -1,7 +1,7 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; let groupArgs = { settings: { diff --git a/test/javascripts/acceptance/groups-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js similarity index 94% rename from test/javascripts/acceptance/groups-index-test.js rename to app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js index 5868920f8bf..96ff83d28ea 100644 --- a/test/javascripts/acceptance/groups-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Groups"); diff --git a/test/javascripts/acceptance/groups-new-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js similarity index 96% rename from test/javascripts/acceptance/groups-new-test.js rename to app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js index 85954e65214..eb638e8890d 100644 --- a/test/javascripts/acceptance/groups-new-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Group"); diff --git a/test/javascripts/acceptance/hamburger-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js similarity index 83% rename from test/javascripts/acceptance/hamburger-menu-test.js rename to app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js index 11fe87742d9..18b5bcee23f 100644 --- a/test/javascripts/acceptance/hamburger-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Opening the hamburger menu with some reviewables", { loggedIn: true, diff --git a/test/javascripts/acceptance/hashtags-test.js b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js similarity index 94% rename from test/javascripts/acceptance/hashtags-test.js rename to app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js index 4a8559ea6d8..833d0d4f8d1 100644 --- a/test/javascripts/acceptance/hashtags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Category and Tag Hashtags", { loggedIn: true, diff --git a/test/javascripts/acceptance/invite-accept-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js similarity index 97% rename from test/javascripts/acceptance/invite-accept-test.js rename to app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js index eb8d85431ed..397ae63a8d0 100644 --- a/test/javascripts/acceptance/invite-accept-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Invite Accept", { diff --git a/test/javascripts/acceptance/invite-show-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js similarity index 96% rename from test/javascripts/acceptance/invite-show-user-fields-test.js rename to app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js index f27b91850f8..83f21aac25b 100644 --- a/test/javascripts/acceptance/invite-show-user-fields-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Accept Invite - User Fields", { diff --git a/test/javascripts/acceptance/jump-to-test.js b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js similarity index 95% rename from test/javascripts/acceptance/jump-to-test.js rename to app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js index fca677999f2..1adbaa7f1a4 100644 --- a/test/javascripts/acceptance/jump-to-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Jump to", { loggedIn: true, diff --git a/test/javascripts/acceptance/keyboard-shortcuts-test.js b/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js similarity index 92% rename from test/javascripts/acceptance/keyboard-shortcuts-test.js rename to app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js index 76c3bca9283..f93ec01a189 100644 --- a/test/javascripts/acceptance/keyboard-shortcuts-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Keyboard Shortcuts", { loggedIn: true }); diff --git a/test/javascripts/acceptance/login-redirect-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-redirect-test.js similarity index 89% rename from test/javascripts/acceptance/login-redirect-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-redirect-test.js index a1a0ebf38f4..6057fed199e 100644 --- a/test/javascripts/acceptance/login-redirect-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-redirect-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login redirect"); QUnit.test("redirects login to default homepage", async function (assert) { diff --git a/test/javascripts/acceptance/login-required-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js similarity index 89% rename from test/javascripts/acceptance/login-required-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-required-test.js index a34fc49a39e..c5d210c278f 100644 --- a/test/javascripts/acceptance/login-required-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login Required", { settings: { diff --git a/test/javascripts/acceptance/login-with-email-and-hide-email-address-taken-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js similarity index 86% rename from test/javascripts/acceptance/login-with-email-and-hide-email-address-taken-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js index 6bdfb5ad7b8..f95242d6ed8 100644 --- a/test/javascripts/acceptance/login-with-email-and-hide-email-address-taken-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Login with email - hide email address taken", { settings: { diff --git a/test/javascripts/acceptance/login-with-email-and-no-social-logins-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js similarity index 89% rename from test/javascripts/acceptance/login-with-email-and-no-social-logins-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js index ccf32b18be2..7d002f7448d 100644 --- a/test/javascripts/acceptance/login-with-email-and-no-social-logins-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email - no social logins", { settings: { diff --git a/test/javascripts/acceptance/login-with-email-disabled-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js similarity index 87% rename from test/javascripts/acceptance/login-with-email-disabled-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js index 9203cbffe09..6361efe2d9a 100644 --- a/test/javascripts/acceptance/login-with-email-disabled-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email disabled", { settings: { diff --git a/test/javascripts/acceptance/login-with-email-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js similarity index 96% rename from test/javascripts/acceptance/login-with-email-test.js rename to app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js index 786c56ddf77..9b959cf961c 100644 --- a/test/javascripts/acceptance/login-with-email-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; let userFound = false; diff --git a/test/javascripts/acceptance/mobile-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js similarity index 84% rename from test/javascripts/acceptance/mobile-discovery-test.js rename to app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js index a83a7872e79..281bf94bf95 100644 --- a/test/javascripts/acceptance/mobile-discovery-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic Discovery - Mobile", { mobileView: true }); QUnit.test("Visit Discovery Pages", async (assert) => { diff --git a/test/javascripts/acceptance/mobile-sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js similarity index 77% rename from test/javascripts/acceptance/mobile-sign-in-test.js rename to app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js index b5a9e604c38..452c8ae8a44 100644 --- a/test/javascripts/acceptance/mobile-sign-in-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Signing In - Mobile", { mobileView: true }); diff --git a/test/javascripts/acceptance/mobile-users-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js similarity index 74% rename from test/javascripts/acceptance/mobile-users-test.js rename to app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js index 1b67837bff1..ad84a25745b 100644 --- a/test/javascripts/acceptance/mobile-users-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Directory - Mobile", { mobileView: true }); diff --git a/test/javascripts/acceptance/modal-test.js b/app/assets/javascripts/discourse/tests/acceptance/modal-test.js similarity index 97% rename from test/javascripts/acceptance/modal-test.js rename to app/assets/javascripts/discourse/tests/acceptance/modal-test.js index 8414007d7a0..b829dd23a5c 100644 --- a/test/javascripts/acceptance/modal-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/modal-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; import { run } from "@ember/runloop"; -import { acceptance, controllerFor } from "helpers/qunit-helpers"; +import { + acceptance, + controllerFor, +} from "discourse/tests/helpers/qunit-helpers"; import showModal from "discourse/lib/show-modal"; acceptance("Modal", { diff --git a/test/javascripts/acceptance/new-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js similarity index 93% rename from test/javascripts/acceptance/new-message-test.js rename to app/assets/javascripts/discourse/tests/acceptance/new-message-test.js index 155cea28a81..fa8011b466e 100644 --- a/test/javascripts/acceptance/new-message-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Message"); diff --git a/test/javascripts/acceptance/new-topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js similarity index 86% rename from test/javascripts/acceptance/new-topic-test.js rename to app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js index ad75ca3a11c..cbddf5f6148 100644 --- a/test/javascripts/acceptance/new-topic-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Topic"); diff --git a/test/javascripts/acceptance/notifications-filter-test.js b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js similarity index 85% rename from test/javascripts/acceptance/notifications-filter-test.js rename to app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js index 6b35838defd..2068e2eafba 100644 --- a/test/javascripts/acceptance/notifications-filter-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("NotificationsFilter", { loggedIn: true, diff --git a/test/javascripts/acceptance/page-publishing-test.js b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js similarity index 94% rename from test/javascripts/acceptance/page-publishing-test.js rename to app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js index d84681c9221..64acfe8aab7 100644 --- a/test/javascripts/acceptance/page-publishing-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Page Publishing", { loggedIn: true, diff --git a/test/javascripts/acceptance/password-reset-test.js b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js similarity index 96% rename from test/javascripts/acceptance/password-reset-test.js rename to app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js index f8dd9ebc0ea..e0ed6433c6a 100644 --- a/test/javascripts/acceptance/password-reset-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js @@ -1,7 +1,7 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; -import { parsePostData } from "helpers/create-pretender"; +import { parsePostData } from "discourse/tests/helpers/create-pretender"; acceptance("Password Reset", { pretend(server, helper) { diff --git a/test/javascripts/acceptance/personal-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js similarity index 88% rename from test/javascripts/acceptance/personal-message-test.js rename to app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js index f21f8c406f7..1c84889cbff 100644 --- a/test/javascripts/acceptance/personal-message-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Personal Message", { loggedIn: true, diff --git a/test/javascripts/acceptance/plugin-keyboard-shortcut-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js similarity index 95% rename from test/javascripts/acceptance/plugin-keyboard-shortcut-test.js rename to app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js index 790331bd0b9..f8f2b3c1591 100644 --- a/test/javascripts/acceptance/plugin-keyboard-shortcut-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { withPluginApi } from "discourse/lib/plugin-api"; import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts"; import KeyboardShortcutInitializer from "discourse/initializers/keyboard-shortcuts"; diff --git a/test/javascripts/acceptance/plugin-outlet-connector-class-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js similarity index 97% rename from test/javascripts/acceptance/plugin-outlet-connector-class-test.js rename to app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js index 92416f1f22b..3d2628e0f1a 100644 --- a/test/javascripts/acceptance/plugin-outlet-connector-class-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { extraConnectorClass } from "discourse/lib/plugin-connectors"; import { action } from "@ember/object"; diff --git a/test/javascripts/acceptance/plugin-outlet-decorator-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js similarity index 96% rename from test/javascripts/acceptance/plugin-outlet-decorator-test.js rename to app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js index 94ecb7d5a16..c9612adfec3 100644 --- a/test/javascripts/acceptance/plugin-outlet-decorator-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { withPluginApi } from "discourse/lib/plugin-api"; const PREFIX = "javascripts/single-test/connectors"; diff --git a/test/javascripts/acceptance/plugin-outlet-multi-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js similarity index 94% rename from test/javascripts/acceptance/plugin-outlet-multi-template-test.js rename to app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js index 1b48bc664a9..f806ab34534 100644 --- a/test/javascripts/acceptance/plugin-outlet-multi-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearCache } from "discourse/lib/plugin-connectors"; const HELLO = "javascripts/multi-test/connectors/user-profile-primary/hello"; diff --git a/test/javascripts/acceptance/plugin-outlet-single-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js similarity index 90% rename from test/javascripts/acceptance/plugin-outlet-single-template-test.js rename to app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js index d7460c9d61e..e98a67badea 100644 --- a/test/javascripts/acceptance/plugin-outlet-single-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; const CONNECTOR = "javascripts/single-test/connectors/user-profile-primary/hello"; diff --git a/test/javascripts/acceptance/post-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js similarity index 93% rename from test/javascripts/acceptance/post-admin-menu-test.js rename to app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js index cbc82cca4c0..81ed32c84b0 100644 --- a/test/javascripts/acceptance/post-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Post - Admin Menu Anonymous Users", { loggedIn: false }); diff --git a/test/javascripts/acceptance/preferences-test.js b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js similarity index 98% rename from test/javascripts/acceptance/preferences-test.js rename to app/assets/javascripts/discourse/tests/acceptance/preferences-test.js index ba256f72cb2..5dec56e8e49 100644 --- a/test/javascripts/acceptance/preferences-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; import User from "discourse/models/user"; function preferencesPretender(server, helper) { diff --git a/test/javascripts/acceptance/raw-plugin-outlet-test.js b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js similarity index 91% rename from test/javascripts/acceptance/raw-plugin-outlet-test.js rename to app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js index 580f5ad3d4d..6c19832471c 100644 --- a/test/javascripts/acceptance/raw-plugin-outlet-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import compile from "handlebars-compiler"; import { addRawTemplate, diff --git a/test/javascripts/acceptance/redirect-to-top-test.js b/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js similarity index 89% rename from test/javascripts/acceptance/redirect-to-top-test.js rename to app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js index f207c009713..cd668878f68 100644 --- a/test/javascripts/acceptance/redirect-to-top-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js @@ -1,5 +1,8 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; -import DiscoveryFixtures from "fixtures/discovery_fixtures"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; +import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; acceptance("Redirect to Top", { pretend(server, helper) { diff --git a/test/javascripts/acceptance/reports-test.js b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js similarity index 89% rename from test/javascripts/acceptance/reports-test.js rename to app/assets/javascripts/discourse/tests/acceptance/reports-test.js index 93cbbff3689..6d42d652406 100644 --- a/test/javascripts/acceptance/reports-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Reports", { loggedIn: true, diff --git a/test/javascripts/acceptance/review-test.js b/app/assets/javascripts/discourse/tests/acceptance/review-test.js similarity index 96% rename from test/javascripts/acceptance/review-test.js rename to app/assets/javascripts/discourse/tests/acceptance/review-test.js index 62fc40d7f43..1821b2abdc8 100644 --- a/test/javascripts/acceptance/review-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/review-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Review", { loggedIn: true, diff --git a/test/javascripts/acceptance/search-full-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js similarity index 98% rename from test/javascripts/acceptance/search-full-test.js rename to app/assets/javascripts/discourse/tests/acceptance/search-full-test.js index 964296d6a15..717bd90b4c2 100644 --- a/test/javascripts/acceptance/search-full-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js @@ -1,5 +1,9 @@ -import selectKit from "helpers/select-kit-helper"; -import { selectDate, acceptance, waitFor } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { + selectDate, + acceptance, + waitFor, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Search - Full Page", { settings: { tagging_enabled: true }, diff --git a/test/javascripts/acceptance/search-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js similarity index 93% rename from test/javascripts/acceptance/search-mobile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js index 47a110eefff..f7e1e68d9d8 100644 --- a/test/javascripts/acceptance/search-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Search - Mobile", { mobileView: true }); diff --git a/test/javascripts/acceptance/search-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-test.js similarity index 97% rename from test/javascripts/acceptance/search-test.js rename to app/assets/javascripts/discourse/tests/acceptance/search-test.js index eda6a22e161..0f9cdc5a0f1 100644 --- a/test/javascripts/acceptance/search-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; const emptySearchContextCallbacks = []; diff --git a/test/javascripts/acceptance/share-and-invite-desktop-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js similarity index 97% rename from test/javascripts/acceptance/share-and-invite-desktop-test.js rename to app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js index 0b6358e0872..30a88815018 100644 --- a/test/javascripts/acceptance/share-and-invite-desktop-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Share and Invite modal - desktop", { loggedIn: true, diff --git a/test/javascripts/acceptance/share-and-invite-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js similarity index 94% rename from test/javascripts/acceptance/share-and-invite-mobile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js index b5b088e87e1..f8c180897fa 100644 --- a/test/javascripts/acceptance/share-and-invite-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Share and Invite modal - mobile", { loggedIn: true, diff --git a/test/javascripts/acceptance/shared-drafts-test.js b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js similarity index 77% rename from test/javascripts/acceptance/shared-drafts-test.js rename to app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js index 7f46522f3e5..4bc854a636f 100644 --- a/test/javascripts/acceptance/shared-drafts-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Shared Drafts", { loggedIn: true }); diff --git a/test/javascripts/acceptance/sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js similarity index 98% rename from test/javascripts/acceptance/sign-in-test.js rename to app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js index d3c8dbe75a7..4ab6c6c43c9 100644 --- a/test/javascripts/acceptance/sign-in-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Signing In"); QUnit.test("sign in", async (assert) => { diff --git a/test/javascripts/acceptance/static-test.js b/app/assets/javascripts/discourse/tests/acceptance/static-test.js similarity index 92% rename from test/javascripts/acceptance/static-test.js rename to app/assets/javascripts/discourse/tests/acceptance/static-test.js index d8aa41060f8..95fd895e6e5 100644 --- a/test/javascripts/acceptance/static-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/static-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Static"); QUnit.test("Static Pages", async (assert) => { diff --git a/test/javascripts/acceptance/tag-groups-test.js b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js similarity index 87% rename from test/javascripts/acceptance/tag-groups-test.js rename to app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js index 6e7bf9ab132..8dab6309704 100644 --- a/test/javascripts/acceptance/tag-groups-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Tag Groups", { loggedIn: true, diff --git a/test/javascripts/acceptance/tags-intersection-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js similarity index 94% rename from test/javascripts/acceptance/tags-intersection-test.js rename to app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js index ad0b6ddf9ae..5363beb8da4 100644 --- a/test/javascripts/acceptance/tags-intersection-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Tags intersection", { loggedIn: true, diff --git a/test/javascripts/acceptance/tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js similarity index 97% rename from test/javascripts/acceptance/tags-test.js rename to app/assets/javascripts/discourse/tests/acceptance/tags-test.js index 44dbd9dbb0c..e1da1c0a290 100644 --- a/test/javascripts/acceptance/tags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js @@ -1,5 +1,8 @@ -import { updateCurrentUser, acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { + updateCurrentUser, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Tags", { loggedIn: true }); diff --git a/test/javascripts/acceptance/topic-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js similarity index 94% rename from test/javascripts/acceptance/topic-admin-menu-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js index 692ce4758b9..f6f25b7c9aa 100644 --- a/test/javascripts/acceptance/topic-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js @@ -1,4 +1,7 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic - Admin Menu Anonymous Users", { loggedIn: false }); diff --git a/test/javascripts/acceptance/topic-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js similarity index 94% rename from test/javascripts/acceptance/topic-anonymous-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js index a5cfe42f22c..b989b10efc9 100644 --- a/test/javascripts/acceptance/topic-anonymous-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic - Anonymous"); QUnit.test("Enter a Topic", async (assert) => { diff --git a/test/javascripts/acceptance/topic-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js similarity index 96% rename from test/javascripts/acceptance/topic-discovery-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js index 8f6ee958240..bd9a8c826ba 100644 --- a/test/javascripts/acceptance/topic-discovery-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js @@ -1,6 +1,6 @@ import DiscourseURL from "discourse/lib/url"; -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import MessageBus from "message-bus-client"; acceptance("Topic Discovery", { diff --git a/test/javascripts/acceptance/topic-edit-timer-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js similarity index 98% rename from test/javascripts/acceptance/topic-edit-timer-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js index 6a2c0912272..20a3554cec1 100644 --- a/test/javascripts/acceptance/topic-edit-timer-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js @@ -1,5 +1,8 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { + acceptance, + updateCurrentUser, +} from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic - Edit timer", { loggedIn: true, diff --git a/test/javascripts/acceptance/topic-footer-buttons-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js similarity index 88% rename from test/javascripts/acceptance/topic-footer-buttons-mobile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js index c8ebaa0c09f..8e160e07e44 100644 --- a/test/javascripts/acceptance/topic-footer-buttons-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js @@ -1,8 +1,8 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; import { withPluginApi } from "discourse/lib/plugin-api"; import { clearTopicFooterButtons } from "discourse/lib/register-topic-footer-button"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; let _test; diff --git a/test/javascripts/acceptance/topic-list-tracker-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js similarity index 88% rename from test/javascripts/acceptance/topic-list-tracker-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js index c58000843eb..5ddb9860fdf 100644 --- a/test/javascripts/acceptance/topic-list-tracker-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { nextTopicUrl, previousTopicUrl, diff --git a/test/javascripts/acceptance/topic-move-posts-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js similarity index 98% rename from test/javascripts/acceptance/topic-move-posts-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js index 96fec0a9e98..ee0e48cc332 100644 --- a/test/javascripts/acceptance/topic-move-posts-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic move posts", { loggedIn: true }); QUnit.test("default", async (assert) => { diff --git a/test/javascripts/acceptance/topic-notifications-button-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js similarity index 91% rename from test/javascripts/acceptance/topic-notifications-button-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js index 48e65e0b3c9..f77ecd1a30f 100644 --- a/test/javascripts/acceptance/topic-notifications-button-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic Notifications button", { loggedIn: true, diff --git a/test/javascripts/acceptance/topic-quote-button-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js similarity index 98% rename from test/javascripts/acceptance/topic-quote-button-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js index 4bedcd4f060..4068e04bbe7 100644 --- a/test/javascripts/acceptance/topic-quote-button-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; function selectText(selector) { const range = document.createRange(); diff --git a/test/javascripts/acceptance/topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js similarity index 98% rename from test/javascripts/acceptance/topic-test.js rename to app/assets/javascripts/discourse/tests/acceptance/topic-test.js index 021389f7533..5d05288ee0e 100644 --- a/test/javascripts/acceptance/topic-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js @@ -1,7 +1,7 @@ import I18n from "I18n"; import { withPluginApi } from "discourse/lib/plugin-api"; -import selectKit from "helpers/select-kit-helper"; -import { acceptance } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; acceptance("Topic", { diff --git a/test/javascripts/acceptance/unknown-test.js b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js similarity index 89% rename from test/javascripts/acceptance/unknown-test.js rename to app/assets/javascripts/discourse/tests/acceptance/unknown-test.js index 5584c7087ef..107e8891f15 100644 --- a/test/javascripts/acceptance/unknown-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; acceptance("Unknown"); QUnit.test("Permalink Unknown URL", async (assert) => { diff --git a/test/javascripts/acceptance/user-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js similarity index 95% rename from test/javascripts/acceptance/user-anonymous-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js index aa14b9f3ee8..e2b04d175d1 100644 --- a/test/javascripts/acceptance/user-anonymous-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Anonymous"); function hasStream(assert) { diff --git a/test/javascripts/acceptance/user-bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js similarity index 87% rename from test/javascripts/acceptance/user-bookmarks-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js index fc1f689ffa1..f034878f6b0 100644 --- a/test/javascripts/acceptance/user-bookmarks-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js @@ -1,7 +1,7 @@ -import { acceptance } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; -import pretender from "helpers/create-pretender"; -import userFixtures from "fixtures/user_fixtures"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import pretender from "discourse/tests/helpers/create-pretender"; +import userFixtures from "discourse/tests/fixtures/user-fixtures"; acceptance("User's bookmarks", { loggedIn: true, diff --git a/test/javascripts/acceptance/user-card-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-card-mobile-test.js similarity index 90% rename from test/javascripts/acceptance/user-card-mobile-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-card-mobile-test.js index 6b35a468795..be9b6d0af52 100644 --- a/test/javascripts/acceptance/user-card-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-card-mobile-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import DiscourseURL from "discourse/lib/url"; acceptance("User Card - Mobile", { mobileView: true }); diff --git a/test/javascripts/acceptance/user-card-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js similarity index 95% rename from test/javascripts/acceptance/user-card-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-card-test.js index 4c1e81c07a1..8a14c0513d7 100644 --- a/test/javascripts/acceptance/user-card-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js @@ -1,8 +1,8 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import DiscourseURL from "discourse/lib/url"; -import pretender from "helpers/create-pretender"; -import userFixtures from "fixtures/user_fixtures"; +import pretender from "discourse/tests/helpers/create-pretender"; +import userFixtures from "discourse/tests/fixtures/user-fixtures"; import User from "discourse/models/user"; acceptance("User Card - Show Local Time", { diff --git a/test/javascripts/acceptance/user-drafts-stream-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js similarity index 91% rename from test/javascripts/acceptance/user-drafts-stream-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js index a892c2a8be3..22a56354e03 100644 --- a/test/javascripts/acceptance/user-drafts-stream-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Drafts", { loggedIn: true }); diff --git a/test/javascripts/acceptance/user-preferences-interface-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js similarity index 97% rename from test/javascripts/acceptance/user-preferences-interface-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js index 1cc396a984c..df5b5a95396 100644 --- a/test/javascripts/acceptance/user-preferences-interface-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import selectKit from "helpers/select-kit-helper"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +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"; diff --git a/test/javascripts/acceptance/user-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-test.js similarity index 95% rename from test/javascripts/acceptance/user-test.js rename to app/assets/javascripts/discourse/tests/acceptance/user-test.js index f4b28465bc3..06a73a3ab37 100644 --- a/test/javascripts/acceptance/user-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-test.js @@ -1,5 +1,5 @@ -import { acceptance } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; import Draft from "discourse/models/draft"; import { Promise } from "rsvp"; diff --git a/test/javascripts/acceptance/users-test.js b/app/assets/javascripts/discourse/tests/acceptance/users-test.js similarity index 92% rename from test/javascripts/acceptance/users-test.js rename to app/assets/javascripts/discourse/tests/acceptance/users-test.js index ecb7e4dc77a..f8a6df352a1 100644 --- a/test/javascripts/acceptance/users-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/users-test.js @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Directory"); QUnit.test("Visit Page", async (assert) => { diff --git a/test/javascripts/fixtures/about.js b/app/assets/javascripts/discourse/tests/fixtures/about.js similarity index 100% rename from test/javascripts/fixtures/about.js rename to app/assets/javascripts/discourse/tests/fixtures/about.js diff --git a/test/javascripts/fixtures/badges_fixture.js b/app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js similarity index 100% rename from test/javascripts/fixtures/badges_fixture.js rename to app/assets/javascripts/discourse/tests/fixtures/badges-fixture.js diff --git a/test/javascripts/fixtures/category-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/category-fixtures.js similarity index 100% rename from test/javascripts/fixtures/category-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/category-fixtures.js diff --git a/test/javascripts/fixtures/concerns/notification-types.js.erb b/app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js.erb similarity index 100% rename from test/javascripts/fixtures/concerns/notification-types.js.erb rename to app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js.erb diff --git a/test/javascripts/fixtures/dashboard-general.js b/app/assets/javascripts/discourse/tests/fixtures/dashboard-general.js similarity index 100% rename from test/javascripts/fixtures/dashboard-general.js rename to app/assets/javascripts/discourse/tests/fixtures/dashboard-general.js diff --git a/test/javascripts/fixtures/dashboard.js b/app/assets/javascripts/discourse/tests/fixtures/dashboard.js similarity index 100% rename from test/javascripts/fixtures/dashboard.js rename to app/assets/javascripts/discourse/tests/fixtures/dashboard.js diff --git a/test/javascripts/fixtures/directory-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/directory-fixtures.js similarity index 100% rename from test/javascripts/fixtures/directory-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/directory-fixtures.js diff --git a/test/javascripts/fixtures/discovery_fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js similarity index 100% rename from test/javascripts/fixtures/discovery_fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js diff --git a/test/javascripts/fixtures/draft.js b/app/assets/javascripts/discourse/tests/fixtures/draft.js similarity index 100% rename from test/javascripts/fixtures/draft.js rename to app/assets/javascripts/discourse/tests/fixtures/draft.js diff --git a/test/javascripts/fixtures/drafts.js b/app/assets/javascripts/discourse/tests/fixtures/drafts.js similarity index 100% rename from test/javascripts/fixtures/drafts.js rename to app/assets/javascripts/discourse/tests/fixtures/drafts.js diff --git a/test/javascripts/fixtures/group-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/group-fixtures.js similarity index 100% rename from test/javascripts/fixtures/group-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/group-fixtures.js diff --git a/test/javascripts/fixtures/groups-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/groups-fixtures.js similarity index 100% rename from test/javascripts/fixtures/groups-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/groups-fixtures.js diff --git a/test/javascripts/fixtures/notification_fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/notification-fixtures.js similarity index 79% rename from test/javascripts/fixtures/notification_fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/notification-fixtures.js index 9ab4d8d76ef..ac2fe07fe97 100644 --- a/test/javascripts/fixtures/notification_fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/notification-fixtures.js @@ -1,5 +1,5 @@ /*jshint maxlen:10000000 */ -import { NOTIFICATION_TYPES } from "fixtures/concerns/notification-types"; +import { NOTIFICATION_TYPES } from "./concerns/notification-types"; export default { "/notifications": { @@ -11,13 +11,13 @@ export default { post_number: 2, topic_id: 1234, slug: "a-slug", - data: { topic_title: "some title", display_username: "velesin" } + data: { topic_title: "some title", display_username: "velesin" }, }, { id: 456, notification_type: NOTIFICATION_TYPES.liked_consolidated, read: false, - data: { display_username: "aquaman", count: "5" } + data: { display_username: "aquaman", count: "5" }, }, { id: 789, @@ -30,8 +30,8 @@ export default { group_id: 41, group_name: "test", inbox_count: 5, - username: "test2" - } + username: "test2", + }, }, { id: 1234, @@ -40,7 +40,7 @@ export default { post_number: null, topic_id: null, slug: null, - data: { display_username: "test1" } + data: { display_username: "test1" }, }, { id: 5678, @@ -49,8 +49,8 @@ export default { post_number: null, topic_id: null, slug: null, - data: { group_id: 41, group_name: "test" } - } - ] - } + data: { group_id: 41, group_name: "test" }, + }, + ], + }, }; diff --git a/test/javascripts/fixtures/poll.js b/app/assets/javascripts/discourse/tests/fixtures/poll.js similarity index 100% rename from test/javascripts/fixtures/poll.js rename to app/assets/javascripts/discourse/tests/fixtures/poll.js diff --git a/test/javascripts/fixtures/post.js b/app/assets/javascripts/discourse/tests/fixtures/post.js similarity index 100% rename from test/javascripts/fixtures/post.js rename to app/assets/javascripts/discourse/tests/fixtures/post.js diff --git a/test/javascripts/fixtures/private_messages_fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/private-messages-fixtures.js similarity index 100% rename from test/javascripts/fixtures/private_messages_fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/private-messages-fixtures.js diff --git a/test/javascripts/fixtures/problems.js b/app/assets/javascripts/discourse/tests/fixtures/problems.js similarity index 100% rename from test/javascripts/fixtures/problems.js rename to app/assets/javascripts/discourse/tests/fixtures/problems.js diff --git a/test/javascripts/fixtures/reports_bulk.js b/app/assets/javascripts/discourse/tests/fixtures/reports-bulk.js similarity index 100% rename from test/javascripts/fixtures/reports_bulk.js rename to app/assets/javascripts/discourse/tests/fixtures/reports-bulk.js diff --git a/test/javascripts/fixtures/reports.js b/app/assets/javascripts/discourse/tests/fixtures/reports.js similarity index 100% rename from test/javascripts/fixtures/reports.js rename to app/assets/javascripts/discourse/tests/fixtures/reports.js diff --git a/test/javascripts/fixtures/search-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js similarity index 100% rename from test/javascripts/fixtures/search-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js diff --git a/test/javascripts/fixtures/session-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/session-fixtures.js similarity index 100% rename from test/javascripts/fixtures/session-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/session-fixtures.js diff --git a/test/javascripts/fixtures/site-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js similarity index 91% rename from test/javascripts/fixtures/site-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js index bdb8504b8f3..2cd86c81e56 100644 --- a/test/javascripts/fixtures/site-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/site-fixtures.js @@ -1,4 +1,4 @@ -import { NOTIFICATION_TYPES } from "fixtures/concerns/notification-types"; +import { NOTIFICATION_TYPES } from "./concerns/notification-types"; export default { "site.json": { @@ -11,7 +11,7 @@ export default { regular: 1, moderator_action: 2, small_action: 3, - whisper: 4 + whisper: 4, }, groups: [ { id: 1, name: "admins" }, @@ -22,7 +22,7 @@ export default { { id: 11, name: "trust_level_1" }, { id: 12, name: "trust_level_2" }, { id: 13, name: "trust_level_3" }, - { id: 14, name: "trust_level_4" } + { id: 14, name: "trust_level_4" }, ], filters: [ "latest", @@ -32,7 +32,7 @@ export default { "read", "posted", "search", - "bookmarks" + "bookmarks", ], periods: ["all", "yearly", "quarterly", "monthly", "weekly", "daily"], top_menu_items: [ @@ -44,7 +44,7 @@ export default { "posted", "categories", "top", - "bookmarks" + "bookmarks", ], anonymous_top_menu_items: ["latest", "top", "categories"], uncategorized_category_id: 17, @@ -67,7 +67,7 @@ export default { background_url: null, show_subcategory_list: false, default_view: "latest", - topic_template: "my topic template" + topic_template: "my topic template", }, { id: 10, @@ -85,7 +85,7 @@ export default { notification_level: null, background_url: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 26, @@ -102,7 +102,7 @@ export default { permission: 1, parent_category_id: 2, notification_level: null, - background_url: null + background_url: null, }, { id: 7, @@ -121,7 +121,7 @@ export default { background_url: null, show_subcategory_list: true, default_view: "latest", - subcategory_list_style: "boxes_with_featured_topics" + subcategory_list_style: "boxes_with_featured_topics", }, { id: 6, @@ -139,7 +139,7 @@ export default { notification_level: null, background_url: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 24, @@ -154,7 +154,7 @@ export default { read_restricted: true, permission: 1, notification_level: null, - background_url: null + background_url: null, }, { id: 28, @@ -171,7 +171,7 @@ export default { permission: 1, parent_category_id: 7, notification_level: null, - background_url: null + background_url: null, }, { id: 27, @@ -188,7 +188,7 @@ export default { permission: 1, parent_category_id: 7, notification_level: null, - background_url: null + background_url: null, }, { id: 4, @@ -206,7 +206,7 @@ export default { notification_level: null, background_url: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 14, @@ -224,7 +224,7 @@ export default { notification_level: null, background_url: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 12, @@ -241,7 +241,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 13, @@ -258,7 +258,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 5, @@ -275,7 +275,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 11, @@ -292,7 +292,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 22, @@ -308,7 +308,7 @@ export default { read_restricted: false, permission: 1, parent_category_id: 5, - notification_level: null + notification_level: null, }, { id: 1, @@ -326,7 +326,7 @@ export default { notification_level: null, can_edit: true, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 17, @@ -343,7 +343,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 21, @@ -359,7 +359,7 @@ export default { read_restricted: false, permission: 1, parent_category_id: 6, - notification_level: null + notification_level: null, }, { id: 8, @@ -376,7 +376,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 9, @@ -393,7 +393,7 @@ export default { permission: 1, notification_level: null, show_subcategory_list: false, - default_view: "latest" + default_view: "latest", }, { id: 2, @@ -411,8 +411,8 @@ export default { notification_level: null, show_subcategory_list: true, default_view: "latest", - subcategory_list_style: "boxes" - } + subcategory_list_style: "boxes", + }, ], post_action_types: [ { @@ -424,7 +424,7 @@ export default { is_flag: false, icon: null, id: 1, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "like", @@ -435,7 +435,7 @@ export default { is_flag: false, icon: "heart", id: 2, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "off_topic", @@ -447,7 +447,7 @@ export default { is_flag: true, icon: null, id: 3, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "inappropriate", @@ -460,7 +460,7 @@ export default { is_flag: true, icon: null, id: 4, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "vote", @@ -471,7 +471,7 @@ export default { is_flag: false, icon: null, id: 5, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "spam", @@ -483,7 +483,7 @@ export default { is_flag: true, icon: null, id: 8, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "notify_user", @@ -496,7 +496,7 @@ export default { is_flag: true, icon: null, id: 6, - is_custom_flag: true + is_custom_flag: true, }, { name_key: "notify_moderators", @@ -508,8 +508,8 @@ export default { is_flag: true, icon: null, id: 7, - is_custom_flag: true - } + is_custom_flag: true, + }, ], topic_flag_types: [ { @@ -521,7 +521,7 @@ export default { is_flag: true, icon: null, id: 4, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "spam", @@ -532,7 +532,7 @@ export default { is_flag: true, icon: null, id: 8, - is_custom_flag: false + is_custom_flag: false, }, { name_key: "notify_moderators", @@ -543,42 +543,42 @@ export default { is_flag: true, icon: null, id: 7, - is_custom_flag: true - } + is_custom_flag: true, + }, ], trust_levels: [ { id: 0, - name: "new user" + name: "new user", }, { id: 1, - name: "basic user" + name: "basic user", }, { id: 2, - name: "member" + name: "member", }, { id: 3, - name: "regular" + name: "regular", }, { id: 4, - name: "leader" - } + name: "leader", + }, ], archetypes: [ { id: "regular", name: "Regular Topic", - options: [] + options: [], }, { id: "banner", name: "translation missing: en.archetypes.banner.title", - options: [] - } + options: [], + }, ], auth_providers: [ { @@ -590,9 +590,9 @@ export default { frame_width: 580, frame_height: 400, can_connect: true, - can_revoke: true - } - ] - } - } + can_revoke: true, + }, + ], + }, + }, }; diff --git a/test/javascripts/fixtures/site_settings.js b/app/assets/javascripts/discourse/tests/fixtures/site-settings.js similarity index 100% rename from test/javascripts/fixtures/site_settings.js rename to app/assets/javascripts/discourse/tests/fixtures/site-settings.js diff --git a/test/javascripts/fixtures/static_fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/static-fixtures.js similarity index 100% rename from test/javascripts/fixtures/static_fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/static-fixtures.js diff --git a/test/javascripts/fixtures/top_fixture.js b/app/assets/javascripts/discourse/tests/fixtures/top-fixtures.js similarity index 100% rename from test/javascripts/fixtures/top_fixture.js rename to app/assets/javascripts/discourse/tests/fixtures/top-fixtures.js diff --git a/test/javascripts/fixtures/topic.js b/app/assets/javascripts/discourse/tests/fixtures/topic.js similarity index 100% rename from test/javascripts/fixtures/topic.js rename to app/assets/javascripts/discourse/tests/fixtures/topic.js diff --git a/test/javascripts/fixtures/user-badges.js b/app/assets/javascripts/discourse/tests/fixtures/user-badges.js similarity index 100% rename from test/javascripts/fixtures/user-badges.js rename to app/assets/javascripts/discourse/tests/fixtures/user-badges.js diff --git a/test/javascripts/fixtures/user_fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js similarity index 100% rename from test/javascripts/fixtures/user_fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js diff --git a/test/javascripts/fixtures/watched-words-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/watched-words-fixtures.js similarity index 100% rename from test/javascripts/fixtures/watched-words-fixtures.js rename to app/assets/javascripts/discourse/tests/fixtures/watched-words-fixtures.js diff --git a/test/javascripts/helpers/assertions.js b/app/assets/javascripts/discourse/tests/helpers/assertions.js similarity index 100% rename from test/javascripts/helpers/assertions.js rename to app/assets/javascripts/discourse/tests/helpers/assertions.js diff --git a/test/javascripts/helpers/component-test.js b/app/assets/javascripts/discourse/tests/helpers/component-test.js similarity index 94% rename from test/javascripts/helpers/component-test.js rename to app/assets/javascripts/discourse/tests/helpers/component-test.js index 7fd57275446..813b72b7039 100644 --- a/test/javascripts/helpers/component-test.js +++ b/app/assets/javascripts/discourse/tests/helpers/component-test.js @@ -1,11 +1,11 @@ import EmberObject from "@ember/object"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import { autoLoadModules } from "discourse/initializers/auto-load-modules"; import TopicTrackingState from "discourse/models/topic-tracking-state"; import User from "discourse/models/user"; import Site from "discourse/models/site"; import Session from "discourse/models/session"; -import { currentSettings } from "helpers/site-settings"; +import { currentSettings } from "discourse/tests/helpers/site-settings"; export default function (name, opts) { opts = opts || {}; diff --git a/test/javascripts/helpers/create-pretender.js b/app/assets/javascripts/discourse/tests/helpers/create-pretender.js similarity index 100% rename from test/javascripts/helpers/create-pretender.js rename to app/assets/javascripts/discourse/tests/helpers/create-pretender.js diff --git a/test/javascripts/helpers/create-store.js b/app/assets/javascripts/discourse/tests/helpers/create-store.js similarity index 96% rename from test/javascripts/helpers/create-store.js rename to app/assets/javascripts/discourse/tests/helpers/create-store.js index 4556e8011cd..80eb23704ce 100644 --- a/test/javascripts/helpers/create-store.js +++ b/app/assets/javascripts/discourse/tests/helpers/create-store.js @@ -4,7 +4,7 @@ import KeyValueStore from "discourse/lib/key-value-store"; import TopicListAdapter from "discourse/adapters/topic-list"; import TopicTrackingState from "discourse/models/topic-tracking-state"; import { buildResolver } from "discourse-common/resolver"; -import { currentSettings } from "helpers/site-settings"; +import { currentSettings } from "discourse/tests/helpers/site-settings"; const CatAdapter = RestAdapter.extend({ primaryKey: "cat_id", diff --git a/test/javascripts/helpers/d-editor-helper.js b/app/assets/javascripts/discourse/tests/helpers/d-editor-helper.js similarity index 100% rename from test/javascripts/helpers/d-editor-helper.js rename to app/assets/javascripts/discourse/tests/helpers/d-editor-helper.js diff --git a/test/javascripts/helpers/fixture-pretender.js b/app/assets/javascripts/discourse/tests/helpers/fixture-pretender.js similarity index 90% rename from test/javascripts/helpers/fixture-pretender.js rename to app/assets/javascripts/discourse/tests/helpers/fixture-pretender.js index 8ed9babff43..32ad7ef595a 100644 --- a/test/javascripts/helpers/fixture-pretender.js +++ b/app/assets/javascripts/discourse/tests/helpers/fixture-pretender.js @@ -4,7 +4,7 @@ export default function (helpers) { // Load any fixtures automatically Object.keys(require._eak_seen).forEach((entry) => { - if (/^fixtures/.test(entry)) { + if (/^discourse\/tests\/fixtures/.test(entry)) { const fixture = require(entry, null, null, true); if (fixture && fixture.default) { const obj = fixture.default; diff --git a/test/javascripts/helpers/html-helper.js b/app/assets/javascripts/discourse/tests/helpers/html-helper.js similarity index 100% rename from test/javascripts/helpers/html-helper.js rename to app/assets/javascripts/discourse/tests/helpers/html-helper.js diff --git a/test/javascripts/helpers/qunit-helpers.js b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js similarity index 97% rename from test/javascripts/helpers/qunit-helpers.js rename to app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js index 668ef6db30a..edb00c964b0 100644 --- a/test/javascripts/helpers/qunit-helpers.js +++ b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js @@ -3,7 +3,7 @@ import { isEmpty } from "@ember/utils"; import { later } from "@ember/runloop"; /* global QUnit, resetSite */ -import sessionFixtures from "fixtures/session-fixtures"; +import sessionFixtures from "discourse/tests/fixtures/session-fixtures"; import HeaderComponent from "discourse/components/site-header"; import { forceMobile, resetMobile } from "discourse/lib/mobile"; import { resetPluginApi } from "discourse/lib/plugin-api"; @@ -26,7 +26,10 @@ import { resetCustomPostMessageCallbacks } from "discourse/controllers/topic"; import { _clearSnapshots } from "select-kit/components/composer-actions"; import User from "discourse/models/user"; import { mapRoutes } from "discourse/mapping-router"; -import { currentSettings, mergeSettings } from "helpers/site-settings"; +import { + currentSettings, + mergeSettings, +} from "discourse/tests/helpers/site-settings"; import { getOwner } from "discourse-common/lib/get-owner"; import { setTopicList } from "discourse/lib/topic-list-tracker"; import { setURLContainer } from "discourse/lib/url"; diff --git a/test/javascripts/helpers/review-pretender.js b/app/assets/javascripts/discourse/tests/helpers/review-pretender.js similarity index 100% rename from test/javascripts/helpers/review-pretender.js rename to app/assets/javascripts/discourse/tests/helpers/review-pretender.js diff --git a/test/javascripts/helpers/select-kit-helper.js b/app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js similarity index 100% rename from test/javascripts/helpers/select-kit-helper.js rename to app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js diff --git a/test/javascripts/helpers/site-settings.js b/app/assets/javascripts/discourse/tests/helpers/site-settings.js similarity index 100% rename from test/javascripts/helpers/site-settings.js rename to app/assets/javascripts/discourse/tests/helpers/site-settings.js diff --git a/test/javascripts/helpers/site.js b/app/assets/javascripts/discourse/tests/helpers/site.js similarity index 100% rename from test/javascripts/helpers/site.js rename to app/assets/javascripts/discourse/tests/helpers/site.js diff --git a/test/javascripts/helpers/store-pretender.js b/app/assets/javascripts/discourse/tests/helpers/store-pretender.js similarity index 100% rename from test/javascripts/helpers/store-pretender.js rename to app/assets/javascripts/discourse/tests/helpers/store-pretender.js diff --git a/test/javascripts/helpers/textarea-selection-helper.js b/app/assets/javascripts/discourse/tests/helpers/textarea-selection-helper.js similarity index 100% rename from test/javascripts/helpers/textarea-selection-helper.js rename to app/assets/javascripts/discourse/tests/helpers/textarea-selection-helper.js diff --git a/test/javascripts/helpers/widget-test.js b/app/assets/javascripts/discourse/tests/helpers/widget-test.js similarity index 82% rename from test/javascripts/helpers/widget-test.js rename to app/assets/javascripts/discourse/tests/helpers/widget-test.js index 6cd3fbd16f3..30f689552ed 100644 --- a/test/javascripts/helpers/widget-test.js +++ b/app/assets/javascripts/discourse/tests/helpers/widget-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; export function moduleForWidget(name, options = {}) { moduleForComponent( diff --git a/test/javascripts/integration/components/ace-editor-test.js b/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.js similarity index 94% rename from test/javascripts/integration/components/ace-editor-test.js rename to app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.js index b5ed8303fb4..e6ece18dd34 100644 --- a/test/javascripts/integration/components/ace-editor-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("ace-editor", { integration: true }); diff --git a/test/javascripts/integration/components/admin-report-test.js b/app/assets/javascripts/discourse/tests/integration/components/admin-report-test.js similarity index 96% rename from test/javascripts/integration/components/admin-report-test.js rename to app/assets/javascripts/discourse/tests/integration/components/admin-report-test.js index 56ac97de5a2..756dbda3b86 100644 --- a/test/javascripts/integration/components/admin-report-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/admin-report-test.js @@ -1,5 +1,5 @@ -import componentTest from "helpers/component-test"; -import pretender from "helpers/create-pretender"; +import componentTest from "discourse/tests/helpers/component-test"; +import pretender from "discourse/tests/helpers/create-pretender"; moduleForComponent("admin-report", { integration: true, diff --git a/test/javascripts/integration/components/badge-title-test.js b/app/assets/javascripts/discourse/tests/integration/components/badge-title-test.js similarity index 80% rename from test/javascripts/integration/components/badge-title-test.js rename to app/assets/javascripts/discourse/tests/integration/components/badge-title-test.js index 33a2f1eac97..ad88301a709 100644 --- a/test/javascripts/integration/components/badge-title-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/badge-title-test.js @@ -1,7 +1,7 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +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 "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; moduleForComponent("badge-title", { integration: true }); diff --git a/test/javascripts/integration/components/cook-text-test.js b/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js similarity index 88% rename from test/javascripts/integration/components/cook-text-test.js rename to app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js index 051e6efdb79..25ef333677d 100644 --- a/test/javascripts/integration/components/cook-text-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/cook-text-test.js @@ -1,5 +1,5 @@ -import componentTest from "helpers/component-test"; -import pretender from "helpers/create-pretender"; +import componentTest from "discourse/tests/helpers/component-test"; +import pretender from "discourse/tests/helpers/create-pretender"; import { resetCache } from "pretty-text/upload-short-url"; moduleForComponent("cook-text", { integration: true }); diff --git a/test/javascripts/integration/components/d-button-test.js b/app/assets/javascripts/discourse/tests/integration/components/d-button-test.js similarity index 98% rename from test/javascripts/integration/components/d-button-test.js rename to app/assets/javascripts/discourse/tests/integration/components/d-button-test.js index ce41d194289..5d66dd8e3dd 100644 --- a/test/javascripts/integration/components/d-button-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/d-button-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("d-button", { integration: true }); componentTest("icon only button", { diff --git a/test/javascripts/integration/components/d-editor-test.js b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js similarity index 99% rename from test/javascripts/integration/components/d-editor-test.js rename to app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js index fec3ae228a3..f3ddb8e2288 100644 --- a/test/javascripts/integration/components/d-editor-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/d-editor-test.js @@ -1,13 +1,13 @@ import I18n from "I18n"; import { next } from "@ember/runloop"; import { clearToolbarCallbacks } from "discourse/components/d-editor"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; import { withPluginApi } from "discourse/lib/plugin-api"; -import formatTextWithSelection from "helpers/d-editor-helper"; +import formatTextWithSelection from "discourse/tests/helpers/d-editor-helper"; import { setTextareaSelection, getTextareaSelection, -} from "helpers/textarea-selection-helper"; +} from "discourse/tests/helpers/textarea-selection-helper"; moduleForComponent("d-editor", { integration: true }); diff --git a/test/javascripts/integration/components/d-icon-test.js b/app/assets/javascripts/discourse/tests/integration/components/d-icon-test.js similarity index 91% rename from test/javascripts/integration/components/d-icon-test.js rename to app/assets/javascripts/discourse/tests/integration/components/d-icon-test.js index 7ee20a999ad..737aa45d117 100644 --- a/test/javascripts/integration/components/d-icon-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/d-icon-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("d-icon", { integration: true }); diff --git a/test/javascripts/integration/components/date-input-test.js b/app/assets/javascripts/discourse/tests/integration/components/date-input-test.js similarity index 95% rename from test/javascripts/integration/components/date-input-test.js rename to app/assets/javascripts/discourse/tests/integration/components/date-input-test.js index 769f9354292..bdaea1d2ca4 100644 --- a/test/javascripts/integration/components/date-input-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/date-input-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("date-input", { integration: true }); diff --git a/test/javascripts/integration/components/date-time-input-range-test.js b/app/assets/javascripts/discourse/tests/integration/components/date-time-input-range-test.js similarity index 93% rename from test/javascripts/integration/components/date-time-input-range-test.js rename to app/assets/javascripts/discourse/tests/integration/components/date-time-input-range-test.js index 7e0f76f461e..24207d60748 100644 --- a/test/javascripts/integration/components/date-time-input-range-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/date-time-input-range-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("date-time-input-range", { integration: true }); diff --git a/test/javascripts/integration/components/date-time-input-test.js b/app/assets/javascripts/discourse/tests/integration/components/date-time-input-test.js similarity index 96% rename from test/javascripts/integration/components/date-time-input-test.js rename to app/assets/javascripts/discourse/tests/integration/components/date-time-input-test.js index c859fe26e3c..5df768217ee 100644 --- a/test/javascripts/integration/components/date-time-input-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/date-time-input-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("date-time-input", { integration: true }); diff --git a/test/javascripts/integration/components/group-membership-button-test.js b/app/assets/javascripts/discourse/tests/integration/components/group-membership-button-test.js similarity index 100% rename from test/javascripts/integration/components/group-membership-button-test.js rename to app/assets/javascripts/discourse/tests/integration/components/group-membership-button-test.js diff --git a/test/javascripts/integration/components/highlighted-code-test.js b/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.js similarity index 92% rename from test/javascripts/integration/components/highlighted-code-test.js rename to app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.js index 5159a22af7c..f51b3531acf 100644 --- a/test/javascripts/integration/components/highlighted-code-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; const LONG_CODE_BLOCK = "puts a\n".repeat(15000); diff --git a/test/javascripts/integration/components/html-safe-helper-test.js b/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js similarity index 82% rename from test/javascripts/integration/components/html-safe-helper-test.js rename to app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js index 08fbb28e3c4..7170283c7cb 100644 --- a/test/javascripts/integration/components/html-safe-helper-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/html-safe-helper-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("html-safe-helper", { integration: true }); componentTest("default", { diff --git a/test/javascripts/integration/components/iframed-html-test.js b/app/assets/javascripts/discourse/tests/integration/components/iframed-html-test.js similarity index 90% rename from test/javascripts/integration/components/iframed-html-test.js rename to app/assets/javascripts/discourse/tests/integration/components/iframed-html-test.js index d95e045429b..678d5fe2aca 100644 --- a/test/javascripts/integration/components/iframed-html-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/iframed-html-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("iframed-html", { integration: true }); diff --git a/test/javascripts/integration/components/image-uploader-test.js b/app/assets/javascripts/discourse/tests/integration/components/image-uploader-test.js similarity index 96% rename from test/javascripts/integration/components/image-uploader-test.js rename to app/assets/javascripts/discourse/tests/integration/components/image-uploader-test.js index ffe1d28285e..332274773e2 100644 --- a/test/javascripts/integration/components/image-uploader-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/image-uploader-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("image-uploader", { integration: true }); componentTest("with image", { diff --git a/test/javascripts/integration/components/keyboard-shortcuts-test.js b/app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js similarity index 100% rename from test/javascripts/integration/components/keyboard-shortcuts-test.js rename to app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js diff --git a/test/javascripts/integration/components/load-more-test.js b/app/assets/javascripts/discourse/tests/integration/components/load-more-test.js similarity index 89% rename from test/javascripts/integration/components/load-more-test.js rename to app/assets/javascripts/discourse/tests/integration/components/load-more-test.js index 0d10793ee65..6d2fbcd1acb 100644 --- a/test/javascripts/integration/components/load-more-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/load-more-test.js @@ -1,5 +1,5 @@ import { configureEyeline } from "discourse/lib/eyeline"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("load-more", { integration: true }); diff --git a/test/javascripts/integration/components/secret-value-list-test.js b/app/assets/javascripts/discourse/tests/integration/components/secret-value-list-test.js similarity index 97% rename from test/javascripts/integration/components/secret-value-list-test.js rename to app/assets/javascripts/discourse/tests/integration/components/secret-value-list-test.js index 7ee2f9b0042..a1dc8c6fc7b 100644 --- a/test/javascripts/integration/components/secret-value-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/secret-value-list-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("secret-value-list", { integration: true }); componentTest("adding a value", { diff --git a/test/javascripts/integration/components/select-kit/api-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/api-test.js similarity index 96% rename from test/javascripts/integration/components/select-kit/api-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/api-test.js index 1b4efdae399..3954ba077cf 100644 --- a/test/javascripts/integration/components/select-kit/api-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/api-test.js @@ -1,9 +1,9 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; import selectKit, { testSelectKitModule, setDefaultState, DEFAULT_CONTENT, -} from "helpers/select-kit-helper"; +} from "discourse/tests/helpers/select-kit-helper"; import { withPluginApi } from "discourse/lib/plugin-api"; import { clearCallbacks } from "select-kit/mixins/plugin-api"; diff --git a/test/javascripts/integration/components/select-kit/category-chooser-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js similarity index 96% rename from test/javascripts/integration/components/select-kit/category-chooser-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js index 57e3fe68609..ff9ba7c5043 100644 --- a/test/javascripts/integration/components/select-kit/category-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("category-chooser"); diff --git a/test/javascripts/integration/components/select-kit/category-drop-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-drop-test.js similarity index 98% rename from test/javascripts/integration/components/select-kit/category-drop-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/category-drop-test.js index 914f68d1550..c52cbe38507 100644 --- a/test/javascripts/integration/components/select-kit/category-drop-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-drop-test.js @@ -1,8 +1,8 @@ import I18n from "I18n"; import DiscourseURL from "discourse/lib/url"; import Category from "discourse/models/category"; -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; import { NO_CATEGORIES_ID, ALL_CATEGORIES_ID, diff --git a/test/javascripts/integration/components/select-kit/combo-box-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js similarity index 93% rename from test/javascripts/integration/components/select-kit/combo-box-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js index 7ceb8599acd..b945832ceaa 100644 --- a/test/javascripts/integration/components/select-kit/combo-box-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/combo-box-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("select-kit/combo-box", { integration: true, diff --git a/test/javascripts/integration/components/select-kit/dropdown-select-box-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js similarity index 94% rename from test/javascripts/integration/components/select-kit/dropdown-select-box-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js index 4819533d136..cf44ea60110 100644 --- a/test/javascripts/integration/components/select-kit/dropdown-select-box-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/dropdown-select-box-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("select-kit/dropdown-select-box", { integration: true, diff --git a/test/javascripts/integration/components/select-kit/list-setting-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/list-setting-test.js similarity index 82% rename from test/javascripts/integration/components/select-kit/list-setting-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/list-setting-test.js index b1f0571624e..a7028596848 100644 --- a/test/javascripts/integration/components/select-kit/list-setting-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/list-setting-test.js @@ -1,5 +1,5 @@ -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("list-setting"); diff --git a/test/javascripts/integration/components/select-kit/mini-tag-chooser-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/mini-tag-chooser-test.js similarity index 91% rename from test/javascripts/integration/components/select-kit/mini-tag-chooser-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/mini-tag-chooser-test.js index 24ecb7c5d06..8c54e0cd5d1 100644 --- a/test/javascripts/integration/components/select-kit/mini-tag-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/mini-tag-chooser-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("mini-tag-chooser"); diff --git a/test/javascripts/integration/components/select-kit/multi-select-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/multi-select-test.js similarity index 88% rename from test/javascripts/integration/components/select-kit/multi-select-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/multi-select-test.js index f501fa3a19a..1f97c1fdecd 100644 --- a/test/javascripts/integration/components/select-kit/multi-select-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/multi-select-test.js @@ -1,5 +1,5 @@ -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("multi-select"); diff --git a/test/javascripts/integration/components/select-kit/notifications-button-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/notifications-button-test.js similarity index 87% rename from test/javascripts/integration/components/select-kit/notifications-button-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/notifications-button-test.js index 50c168d19bf..463a75ff389 100644 --- a/test/javascripts/integration/components/select-kit/notifications-button-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/notifications-button-test.js @@ -1,8 +1,8 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; import { testSelectKitModule, setDefaultState, -} from "helpers/select-kit-helper"; +} from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("notifications-button"); diff --git a/test/javascripts/integration/components/select-kit/pinned-options-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/pinned-options-test.js similarity index 90% rename from test/javascripts/integration/components/select-kit/pinned-options-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/pinned-options-test.js index e5503c43078..4199ff7d3be 100644 --- a/test/javascripts/integration/components/select-kit/pinned-options-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/pinned-options-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; import Topic from "discourse/models/topic"; const buildTopic = function (pinned = true) { diff --git a/test/javascripts/integration/components/select-kit/single-select-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/single-select-test.js similarity index 97% rename from test/javascripts/integration/components/select-kit/single-select-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/single-select-test.js index 7e81a1f74bf..e7473b0c1d3 100644 --- a/test/javascripts/integration/components/select-kit/single-select-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/single-select-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("single-select"); diff --git a/test/javascripts/integration/components/select-kit/tag-drop-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js similarity index 90% rename from test/javascripts/integration/components/select-kit/tag-drop-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js index 65f77024363..be6223d8317 100644 --- a/test/javascripts/integration/components/select-kit/tag-drop-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.js @@ -1,9 +1,9 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; import Site from "discourse/models/site"; import { set } from "@ember/object"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; testSelectKitModule("tag-drop", { beforeEach() { diff --git a/test/javascripts/integration/components/select-kit/topic-notifications-button-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.js similarity index 92% rename from test/javascripts/integration/components/select-kit/topic-notifications-button-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.js index 16567159b8f..64cd90a7387 100644 --- a/test/javascripts/integration/components/select-kit/topic-notifications-button-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; import Topic from "discourse/models/topic"; const buildTopic = function (level, archetype = "regular") { diff --git a/test/javascripts/integration/components/select-kit/topic-notifications-options-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-options-test.js similarity index 93% rename from test/javascripts/integration/components/select-kit/topic-notifications-options-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-options-test.js index fb30a393db8..12bdc5f9419 100644 --- a/test/javascripts/integration/components/select-kit/topic-notifications-options-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-options-test.js @@ -1,6 +1,6 @@ import I18n from "I18n"; -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; import Topic from "discourse/models/topic"; const buildTopic = function (archetype) { diff --git a/test/javascripts/integration/components/select-kit/user-chooser-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/user-chooser-test.js similarity index 79% rename from test/javascripts/integration/components/select-kit/user-chooser-test.js rename to app/assets/javascripts/discourse/tests/integration/components/select-kit/user-chooser-test.js index eed4e3b659f..c3d006fa3b9 100644 --- a/test/javascripts/integration/components/select-kit/user-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/user-chooser-test.js @@ -1,5 +1,5 @@ -import componentTest from "helpers/component-test"; -import { testSelectKitModule } from "helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; +import { testSelectKitModule } from "discourse/tests/helpers/select-kit-helper"; testSelectKitModule("user-chooser"); diff --git a/test/javascripts/integration/components/share-button-test.js b/app/assets/javascripts/discourse/tests/integration/components/share-button-test.js similarity index 85% rename from test/javascripts/integration/components/share-button-test.js rename to app/assets/javascripts/discourse/tests/integration/components/share-button-test.js index e8bac153d79..53d75645018 100644 --- a/test/javascripts/integration/components/share-button-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/share-button-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("share-button", { integration: true }); diff --git a/test/javascripts/integration/components/share-button.js b/app/assets/javascripts/discourse/tests/integration/components/share-button.js similarity index 100% rename from test/javascripts/integration/components/share-button.js rename to app/assets/javascripts/discourse/tests/integration/components/share-button.js diff --git a/test/javascripts/integration/components/simple-list-test.js b/app/assets/javascripts/discourse/tests/integration/components/simple-list-test.js similarity index 96% rename from test/javascripts/integration/components/simple-list-test.js rename to app/assets/javascripts/discourse/tests/integration/components/simple-list-test.js index 4150381898e..93d21a312d6 100644 --- a/test/javascripts/integration/components/simple-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/simple-list-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("simple-list", { integration: true }); componentTest("adding a value", { diff --git a/test/javascripts/integration/components/text-field-test.js b/app/assets/javascripts/discourse/tests/integration/components/text-field-test.js similarity index 97% rename from test/javascripts/integration/components/text-field-test.js rename to app/assets/javascripts/discourse/tests/integration/components/text-field-test.js index 11d43bd2111..e6b8d49549d 100644 --- a/test/javascripts/integration/components/text-field-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/text-field-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("text-field", { integration: true }); diff --git a/test/javascripts/integration/components/time-input-test.js b/app/assets/javascripts/discourse/tests/integration/components/time-input-test.js similarity index 89% rename from test/javascripts/integration/components/time-input-test.js rename to app/assets/javascripts/discourse/tests/integration/components/time-input-test.js index eed1195b413..e2d2a259fe1 100644 --- a/test/javascripts/integration/components/time-input-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/time-input-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("time-input", { integration: true, diff --git a/test/javascripts/integration/components/user-selector-test.js b/app/assets/javascripts/discourse/tests/integration/components/user-selector-test.js similarity index 95% rename from test/javascripts/integration/components/user-selector-test.js rename to app/assets/javascripts/discourse/tests/integration/components/user-selector-test.js index d09816e3cf6..ab070b4fc68 100644 --- a/test/javascripts/integration/components/user-selector-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/user-selector-test.js @@ -1,4 +1,4 @@ -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("user-selector", { integration: true }); diff --git a/test/javascripts/integration/components/value-list-test.js b/app/assets/javascripts/discourse/tests/integration/components/value-list-test.js similarity index 95% rename from test/javascripts/integration/components/value-list-test.js rename to app/assets/javascripts/discourse/tests/integration/components/value-list-test.js index e0769901da6..67ffa4b6974 100644 --- a/test/javascripts/integration/components/value-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/value-list-test.js @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import componentTest from "helpers/component-test"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import componentTest from "discourse/tests/helpers/component-test"; moduleForComponent("value-list", { integration: true }); componentTest("adding a value", { diff --git a/test/javascripts/integration/widgets/actions-summary-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/actions-summary-test.js similarity index 86% rename from test/javascripts/integration/widgets/actions-summary-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/actions-summary-test.js index 038ab9ac37b..9a484435906 100644 --- a/test/javascripts/integration/widgets/actions-summary-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/actions-summary-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("actions-summary"); diff --git a/test/javascripts/integration/widgets/avatar-flair-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/avatar-flair-test.js similarity index 91% rename from test/javascripts/integration/widgets/avatar-flair-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/avatar-flair-test.js index 99e1556b645..7d435a63a3e 100644 --- a/test/javascripts/integration/widgets/avatar-flair-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/avatar-flair-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("avatar-flair"); diff --git a/test/javascripts/integration/widgets/button-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/button-test.js similarity index 93% rename from test/javascripts/integration/widgets/button-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/button-test.js index 51574c5e524..b0bcab35e1b 100644 --- a/test/javascripts/integration/widgets/button-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/button-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("button"); diff --git a/test/javascripts/integration/widgets/default-notification-item-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/default-notification-item-test.js similarity index 90% rename from test/javascripts/integration/widgets/default-notification-item-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/default-notification-item-test.js index 1c0c4fa364d..993785323a9 100644 --- a/test/javascripts/integration/widgets/default-notification-item-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/default-notification-item-test.js @@ -1,6 +1,9 @@ import EmberObject from "@ember/object"; -import pretender from "helpers/create-pretender"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import pretender from "discourse/tests/helpers/create-pretender"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("default-notification-item"); diff --git a/test/javascripts/integration/widgets/hamburger-menu-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/hamburger-menu-test.js similarity index 98% rename from test/javascripts/integration/widgets/hamburger-menu-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/hamburger-menu-test.js index 661b8e662af..b4ad25bdc66 100644 --- a/test/javascripts/integration/widgets/hamburger-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/hamburger-menu-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import { NotificationLevels } from "discourse/lib/notification-levels"; moduleForWidget("hamburger-menu"); diff --git a/test/javascripts/integration/widgets/header-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/header-test.js similarity index 96% rename from test/javascripts/integration/widgets/header-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/header-test.js index ddd699ef10b..14350d12e60 100644 --- a/test/javascripts/integration/widgets/header-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/header-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("header"); diff --git a/test/javascripts/integration/widgets/home-logo-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/home-logo-test.js similarity index 98% rename from test/javascripts/integration/widgets/home-logo-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/home-logo-test.js index d12a376c6fd..021057bd3b4 100644 --- a/test/javascripts/integration/widgets/home-logo-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/home-logo-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import Session from "discourse/models/session"; moduleForWidget("home-logo"); diff --git a/test/javascripts/integration/widgets/post-links-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/post-links-test.js similarity index 94% rename from test/javascripts/integration/widgets/post-links-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/post-links-test.js index 1eea33c9972..1062a74dcd3 100644 --- a/test/javascripts/integration/widgets/post-links-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/post-links-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("post-links"); diff --git a/test/javascripts/integration/widgets/post-menu-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/post-menu-test.js similarity index 92% rename from test/javascripts/integration/widgets/post-menu-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/post-menu-test.js index f95776f1b11..c20c8d251a9 100644 --- a/test/javascripts/integration/widgets/post-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/post-menu-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import { withPluginApi } from "discourse/lib/plugin-api"; moduleForWidget("post-menu"); diff --git a/test/javascripts/integration/widgets/post-stream-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/post-stream-test.js similarity index 97% rename from test/javascripts/integration/widgets/post-stream-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/post-stream-test.js index c9b58e98af5..daff6490ea1 100644 --- a/test/javascripts/integration/widgets/post-stream-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/post-stream-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import Topic from "discourse/models/topic"; import Post from "discourse/models/post"; diff --git a/test/javascripts/integration/widgets/post-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js similarity index 99% rename from test/javascripts/integration/widgets/post-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/post-test.js index 802b5e76ce3..1e888b0e28d 100644 --- a/test/javascripts/integration/widgets/post-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; import EmberObject from "@ember/object"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("post"); diff --git a/test/javascripts/integration/widgets/poster-name-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/poster-name-test.js similarity index 95% rename from test/javascripts/integration/widgets/poster-name-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/poster-name-test.js index 8f308f409d5..30a72e7c2ca 100644 --- a/test/javascripts/integration/widgets/poster-name-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/poster-name-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("poster-name"); diff --git a/test/javascripts/integration/widgets/quick-access-item-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/quick-access-item-test.js similarity index 89% rename from test/javascripts/integration/widgets/quick-access-item-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/quick-access-item-test.js index 5101d2a481c..5300656f595 100644 --- a/test/javascripts/integration/widgets/quick-access-item-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/quick-access-item-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("quick-access-item"); diff --git a/test/javascripts/integration/widgets/small-user-list-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js similarity index 86% rename from test/javascripts/integration/widgets/small-user-list-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js index 2e6ef1ea1fd..f955df662d8 100644 --- a/test/javascripts/integration/widgets/small-user-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("small-user-list"); diff --git a/test/javascripts/integration/widgets/topic-admin-menu-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js similarity index 95% rename from test/javascripts/integration/widgets/topic-admin-menu-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js index 3351e3ee1a5..07b6f21d64f 100644 --- a/test/javascripts/integration/widgets/topic-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import Topic from "discourse/models/topic"; import Category from "discourse/models/category"; diff --git a/test/javascripts/integration/widgets/topic-participant-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js similarity index 93% rename from test/javascripts/integration/widgets/topic-participant-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js index 4aafd112bf2..51ae5d2ac04 100644 --- a/test/javascripts/integration/widgets/topic-participant-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("topic-participant"); diff --git a/test/javascripts/integration/widgets/topic-status-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/topic-status-test.js similarity index 91% rename from test/javascripts/integration/widgets/topic-status-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/topic-status-test.js index d9a677dda42..31c7786cc11 100644 --- a/test/javascripts/integration/widgets/topic-status-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/topic-status-test.js @@ -1,4 +1,7 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import TopicStatusIcons from "discourse/helpers/topic-status-icons"; moduleForWidget("topic-status"); diff --git a/test/javascripts/integration/widgets/user-menu-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/user-menu-test.js similarity index 98% rename from test/javascripts/integration/widgets/user-menu-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/user-menu-test.js index 3a286dd838b..601be8a4556 100644 --- a/test/javascripts/integration/widgets/user-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/user-menu-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; import DiscourseURL from "discourse/lib/url"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("user-menu"); diff --git a/test/javascripts/integration/widgets/widget-dropdown-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/widget-dropdown-test.js similarity index 98% rename from test/javascripts/integration/widgets/widget-dropdown-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/widget-dropdown-test.js index 09796d5dc89..f3d58c37671 100644 --- a/test/javascripts/integration/widgets/widget-dropdown-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/widget-dropdown-test.js @@ -1,5 +1,8 @@ import I18n from "I18n"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; moduleForWidget("widget-dropdown"); diff --git a/test/javascripts/integration/widgets/widget-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js similarity index 99% rename from test/javascripts/integration/widgets/widget-test.js rename to app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js index 01ff5f57967..1d807bfdbf9 100644 --- a/test/javascripts/integration/widgets/widget-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js @@ -1,6 +1,9 @@ import I18n from "I18n"; import { next } from "@ember/runloop"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { + moduleForWidget, + widgetTest, +} from "discourse/tests/helpers/widget-test"; import { createWidget } from "discourse/widgets/widget"; import { withPluginApi } from "discourse/lib/plugin-api"; import { Promise } from "rsvp"; diff --git a/test/javascripts/plugin_tests.js.erb b/app/assets/javascripts/discourse/tests/plugin_tests.js.erb similarity index 100% rename from test/javascripts/plugin_tests.js.erb rename to app/assets/javascripts/discourse/tests/plugin_tests.js.erb diff --git a/test/javascripts/test_helper.js b/app/assets/javascripts/discourse/tests/test_helper.js similarity index 91% rename from test/javascripts/test_helper.js rename to app/assets/javascripts/discourse/tests/test_helper.js index ef833ad84a7..28b646a2b20 100644 --- a/test/javascripts/test_helper.js +++ b/app/assets/javascripts/discourse/tests/test_helper.js @@ -38,14 +38,15 @@ //= require_tree ./acceptance //= require_tree ./integration //= require_tree ./unit -//= require_tree ./admin +//= require_tree ../../admin/tests/admin //= require plugin_tests //= require_self // //= require jquery.magnific-popup.min.js let App = window.Discourse; -let resetSettings = require("helpers/site-settings").resetSettings; +let resetSettings = require("discourse/tests/helpers/site-settings") + .resetSettings; let createHelperContext = require("discourse-common/lib/helpers") .createHelperContext; @@ -86,13 +87,14 @@ if (window.Logster) { window.Logster = { enabled: false }; } -var createPretender = require("helpers/create-pretender", null, null, false), - fixtures = require("fixtures/site-fixtures", null, null, false).default, +var createPretender = require("discourse/tests/helpers/create-pretender", null, null, false), + siteFixtures = require("discourse/tests/fixtures/site-fixtures", null, null, false) + .default, flushMap = require("discourse/models/store", null, null, false).flushMap, ScrollingDOMMethods = require("discourse/mixins/scrolling", null, null, false) .ScrollingDOMMethods, _DiscourseURL = require("discourse/lib/url", null, null, false).default, - applyPretender = require("helpers/qunit-helpers", null, null, false) + applyPretender = require("discourse/tests/helpers/qunit-helpers", null, null, false) .applyPretender, getOwner = require("discourse-common/lib/get-owner").getOwner, setDefaultOwner = require("discourse-common/lib/get-owner").setDefaultOwner, @@ -104,8 +106,8 @@ function dup(obj) { } function resetSite(siteSettings, extras) { - let createStore = require("helpers/create-store").default; - let siteAttrs = $.extend({}, fixtures["site.json"].site, extras || {}); + let createStore = require("discourse/tests/helpers/create-store").default; + let siteAttrs = $.extend({}, siteFixtures["site.json"].site, extras || {}); let Site = require("discourse/models/site").default; siteAttrs.store = createStore(); siteAttrs.siteSettings = siteSettings; @@ -210,7 +212,7 @@ QUnit.testDone(function () { }); // Load ES6 tests -var helpers = require("helpers/qunit-helpers"); +var helpers = require("discourse/tests/helpers/qunit-helpers"); function getUrlParameter(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); diff --git a/test/javascripts/unit/controllers/avatar-selector-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/avatar-selector-test.js similarity index 100% rename from test/javascripts/unit/controllers/avatar-selector-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/avatar-selector-test.js diff --git a/test/javascripts/unit/controllers/bookmark-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js similarity index 98% rename from test/javascripts/unit/controllers/bookmark-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js index 3f26e9abd59..9d23fc11218 100644 --- a/test/javascripts/unit/controllers/bookmark-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js @@ -1,8 +1,8 @@ -import { logIn } from "helpers/qunit-helpers"; +import { logIn } from "discourse/tests/helpers/qunit-helpers"; import User from "discourse/models/user"; import KeyboardShortcutInitializer from "discourse/initializers/keyboard-shortcuts"; import { REMINDER_TYPES } from "discourse/lib/bookmark"; -import { fakeTime } from "helpers/qunit-helpers"; +import { fakeTime } from "discourse/tests/helpers/qunit-helpers"; let BookmarkController; diff --git a/test/javascripts/unit/controllers/create-account-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js similarity index 97% rename from test/javascripts/unit/controllers/create-account-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js index 1ab7aebf3bf..fa66fb93180 100644 --- a/test/javascripts/unit/controllers/create-account-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js @@ -1,5 +1,5 @@ import I18n from "I18n"; -import { controllerModule } from "helpers/qunit-helpers"; +import { controllerModule } from "discourse/tests/helpers/qunit-helpers"; controllerModule("controller:create-account", { needs: ["controller:modal", "controller:login"], diff --git a/test/javascripts/unit/controllers/history-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/history-test.js similarity index 100% rename from test/javascripts/unit/controllers/history-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/history-test.js diff --git a/test/javascripts/unit/controllers/preferences-account-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/preferences-account-test.js similarity index 100% rename from test/javascripts/unit/controllers/preferences-account-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/preferences-account-test.js diff --git a/test/javascripts/unit/controllers/preferences-second-factor-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/preferences-second-factor-test.js similarity index 100% rename from test/javascripts/unit/controllers/preferences-second-factor-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/preferences-second-factor-test.js diff --git a/test/javascripts/unit/controllers/reorder-categories-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/reorder-categories-test.js similarity index 98% rename from test/javascripts/unit/controllers/reorder-categories-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/reorder-categories-test.js index 019bd63c8a6..becd110326c 100644 --- a/test/javascripts/unit/controllers/reorder-categories-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/reorder-categories-test.js @@ -1,6 +1,6 @@ import EmberObject from "@ember/object"; import { mapRoutes } from "discourse/mapping-router"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; moduleFor("controller:reorder-categories", "controller:reorder-categories", { beforeEach() { diff --git a/test/javascripts/unit/controllers/topic-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js similarity index 99% rename from test/javascripts/unit/controllers/topic-test.js rename to app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js index 197b6b11b0c..cefa233494f 100644 --- a/test/javascripts/unit/controllers/topic-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js @@ -4,7 +4,7 @@ import Topic from "discourse/models/topic"; import { Placeholder } from "discourse/lib/posts-with-placeholders"; import User from "discourse/models/user"; import { Promise } from "rsvp"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; moduleFor("controller:topic", "controller:topic", { needs: [ diff --git a/test/javascripts/unit/ember/resolver-test.js b/app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js similarity index 100% rename from test/javascripts/unit/ember/resolver-test.js rename to app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js diff --git a/test/javascripts/unit/lib/bbcode-test.js b/app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js similarity index 100% rename from test/javascripts/unit/lib/bbcode-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js diff --git a/test/javascripts/unit/lib/bookmark-test.js b/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js similarity index 95% rename from test/javascripts/unit/lib/bookmark-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js index 2670248c025..16857a8b732 100644 --- a/test/javascripts/unit/lib/bookmark-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js @@ -1,5 +1,5 @@ import { formattedReminderTime } from "discourse/lib/bookmark"; -import { fakeTime } from "helpers/qunit-helpers"; +import { fakeTime } from "discourse/tests/helpers/qunit-helpers"; QUnit.module("lib:bookmark", { beforeEach() { diff --git a/test/javascripts/unit/lib/break-string-test.js b/app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js similarity index 100% rename from test/javascripts/unit/lib/break-string-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js diff --git a/test/javascripts/unit/lib/category-badge-test.js b/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js similarity index 96% rename from test/javascripts/unit/lib/category-badge-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js index 35dd2318501..d767147c629 100644 --- a/test/javascripts/unit/lib/category-badge-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js @@ -1,5 +1,5 @@ -import createStore from "helpers/create-store"; -import { discourseModule } from "helpers/qunit-helpers"; +import createStore from "discourse/tests/helpers/create-store"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; import Site from "discourse/models/site"; discourseModule("lib:category-link"); diff --git a/test/javascripts/unit/lib/click-track-edit-history-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js similarity index 96% rename from test/javascripts/unit/lib/click-track-edit-history-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js index c0e10fabbd8..713bcb3997b 100644 --- a/test/javascripts/unit/lib/click-track-edit-history-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js @@ -1,8 +1,8 @@ import DiscourseURL from "discourse/lib/url"; import ClickTrack from "discourse/lib/click-track"; -import { fixture, logIn } from "helpers/qunit-helpers"; +import { fixture, logIn } from "discourse/tests/helpers/qunit-helpers"; import User from "discourse/models/user"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("lib:click-track-edit-history", { beforeEach() { diff --git a/test/javascripts/unit/lib/click-track-profile-page-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js similarity index 96% rename from test/javascripts/unit/lib/click-track-profile-page-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js index 84c0c437cdb..441a9b1a769 100644 --- a/test/javascripts/unit/lib/click-track-profile-page-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js @@ -1,7 +1,7 @@ import DiscourseURL from "discourse/lib/url"; import ClickTrack from "discourse/lib/click-track"; -import { fixture, logIn } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { fixture, logIn } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("lib:click-track-profile-page", { beforeEach() { diff --git a/test/javascripts/unit/lib/click-track-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js similarity index 98% rename from test/javascripts/unit/lib/click-track-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js index 55d29ee425f..3ec9f35f40e 100644 --- a/test/javascripts/unit/lib/click-track-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js @@ -1,9 +1,9 @@ import { later } from "@ember/runloop"; import DiscourseURL from "discourse/lib/url"; import ClickTrack from "discourse/lib/click-track"; -import { fixture, logIn } from "helpers/qunit-helpers"; +import { fixture, logIn } from "discourse/tests/helpers/qunit-helpers"; import User from "discourse/models/user"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("lib:click-track", { beforeEach() { diff --git a/test/javascripts/unit/lib/computed-test.js b/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js similarity index 98% rename from test/javascripts/unit/lib/computed-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/computed-test.js index 6bb386fdba3..10429f3bf0e 100644 --- a/test/javascripts/unit/lib/computed-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js @@ -10,7 +10,7 @@ import { htmlSafe, } from "discourse/lib/computed"; import { setPrefix } from "discourse-common/lib/get-url"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("lib:computed", { beforeEach() { diff --git a/test/javascripts/unit/lib/emoji-store-test.js b/app/assets/javascripts/discourse/tests/unit/lib/emoji-store-test.js similarity index 92% rename from test/javascripts/unit/lib/emoji-store-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/emoji-store-test.js index 8068b2b5063..14066a74c9d 100644 --- a/test/javascripts/unit/lib/emoji-store-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/emoji-store-test.js @@ -1,4 +1,4 @@ -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("lib:emoji-emojiStore", { beforeEach() { diff --git a/test/javascripts/unit/lib/emoji-test.js b/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js similarity index 98% rename from test/javascripts/unit/lib/emoji-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js index 5fa7ea99861..19fabb83e1c 100644 --- a/test/javascripts/unit/lib/emoji-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js @@ -1,7 +1,7 @@ import { emojiSearch } from "pretty-text/emoji"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; import { emojiUnescape } from "discourse/lib/text"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("lib:emoji"); diff --git a/test/javascripts/unit/lib/formatter-test.js b/app/assets/javascripts/discourse/tests/unit/lib/formatter-test.js similarity index 99% rename from test/javascripts/unit/lib/formatter-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/formatter-test.js index 14becfdcf6c..0c490f2c017 100644 --- a/test/javascripts/unit/lib/formatter-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/formatter-test.js @@ -6,7 +6,7 @@ import { longDate, durationTiny, } from "discourse/lib/formatter"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("lib:formatter", { beforeEach() { diff --git a/test/javascripts/unit/lib/get-url-test.js b/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js similarity index 100% rename from test/javascripts/unit/lib/get-url-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js diff --git a/test/javascripts/unit/lib/highlight-search-test.js.es6 b/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js.es6 similarity index 93% rename from test/javascripts/unit/lib/highlight-search-test.js.es6 rename to app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js.es6 index 47c1ab3ed6b..a677ab25fdb 100644 --- a/test/javascripts/unit/lib/highlight-search-test.js.es6 +++ b/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js.es6 @@ -1,5 +1,5 @@ import highlightSearch, { CLASS_NAME } from "discourse/lib/highlight-search"; -import { fixture } from "helpers/qunit-helpers"; +import { fixture } from "discourse/tests/helpers/qunit-helpers"; QUnit.module("lib:highlight-search"); diff --git a/test/javascripts/unit/lib/i18n-test.js b/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js similarity index 100% rename from test/javascripts/unit/lib/i18n-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js diff --git a/test/javascripts/unit/lib/icon-library-test.js b/app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js similarity index 100% rename from test/javascripts/unit/lib/icon-library-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js diff --git a/test/javascripts/unit/lib/key-value-store-test.js b/app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js similarity index 100% rename from test/javascripts/unit/lib/key-value-store-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js diff --git a/test/javascripts/unit/lib/link-mentions-test.js b/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js similarity index 95% rename from test/javascripts/unit/lib/link-mentions-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js index 5f4908d4575..1adcf985148 100644 --- a/test/javascripts/unit/lib/link-mentions-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js @@ -3,7 +3,7 @@ import { linkSeenMentions, } from "discourse/lib/link-mentions"; import { Promise } from "rsvp"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("lib:link-mentions"); diff --git a/test/javascripts/unit/lib/load-script-test.js b/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js similarity index 100% rename from test/javascripts/unit/lib/load-script-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js diff --git a/test/javascripts/unit/lib/oneboxer-test.js b/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js similarity index 96% rename from test/javascripts/unit/lib/oneboxer-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js index 512f2fc3049..93ca35eed4f 100644 --- a/test/javascripts/unit/lib/oneboxer-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js @@ -1,7 +1,7 @@ import { load } from "pretty-text/oneboxer"; import { ajax } from "discourse/lib/ajax"; import { failedCache, localCache } from "pretty-text/oneboxer-cache"; -import { stringToHTML } from "helpers/html-helper"; +import { stringToHTML } from "discourse/tests/helpers/html-helper"; function loadOnebox(element) { return load({ diff --git a/test/javascripts/unit/lib/preload-store-test.js b/app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js similarity index 100% rename from test/javascripts/unit/lib/preload-store-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js diff --git a/test/javascripts/unit/lib/pretty-text-test.js b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js similarity index 100% rename from test/javascripts/unit/lib/pretty-text-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js diff --git a/test/javascripts/unit/lib/sanitizer-test.js b/app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js similarity index 100% rename from test/javascripts/unit/lib/sanitizer-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js diff --git a/test/javascripts/unit/lib/search-test.js b/app/assets/javascripts/discourse/tests/unit/lib/search-test.js similarity index 100% rename from test/javascripts/unit/lib/search-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/search-test.js diff --git a/test/javascripts/unit/lib/sharing-test.js b/app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js similarity index 100% rename from test/javascripts/unit/lib/sharing-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js diff --git a/test/javascripts/unit/lib/text-direction-test.js b/app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js similarity index 100% rename from test/javascripts/unit/lib/text-direction-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js diff --git a/test/javascripts/unit/lib/to-markdown-test.js b/app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js similarity index 100% rename from test/javascripts/unit/lib/to-markdown-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js diff --git a/test/javascripts/unit/lib/upload-short-url-test.js b/app/assets/javascripts/discourse/tests/unit/lib/upload-short-url-test.js similarity index 97% rename from test/javascripts/unit/lib/upload-short-url-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/upload-short-url-test.js index 183c28440ce..2d113ccee7e 100644 --- a/test/javascripts/unit/lib/upload-short-url-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/upload-short-url-test.js @@ -4,8 +4,8 @@ import { resetCache, } from "pretty-text/upload-short-url"; import { ajax } from "discourse/lib/ajax"; -import { fixture } from "helpers/qunit-helpers"; -import pretender from "helpers/create-pretender"; +import { fixture } from "discourse/tests/helpers/qunit-helpers"; +import pretender from "discourse/tests/helpers/create-pretender"; function stubUrls(imageSrcs, attachmentSrcs, otherMediaSrcs) { const response = (object) => { diff --git a/test/javascripts/unit/lib/uploads-test.js b/app/assets/javascripts/discourse/tests/unit/lib/uploads-test.js similarity index 99% rename from test/javascripts/unit/lib/uploads-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/uploads-test.js index f707b5bb60a..8b7973fc1d9 100644 --- a/test/javascripts/unit/lib/uploads-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/uploads-test.js @@ -9,7 +9,7 @@ import { } from "discourse/lib/uploads"; import * as Utilities from "discourse/lib/utilities"; import User from "discourse/models/user"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; import bootbox from "bootbox"; discourseModule("lib:uploads"); diff --git a/test/javascripts/unit/lib/url-test.js b/app/assets/javascripts/discourse/tests/unit/lib/url-test.js similarity index 97% rename from test/javascripts/unit/lib/url-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/url-test.js index 3bb298303e9..99c2cf244ca 100644 --- a/test/javascripts/unit/lib/url-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/url-test.js @@ -1,6 +1,6 @@ import DiscourseURL, { userPath } from "discourse/lib/url"; import { setPrefix } from "discourse-common/lib/get-url"; -import { logIn } from "helpers/qunit-helpers"; +import { logIn } from "discourse/tests/helpers/qunit-helpers"; import User from "discourse/models/user"; QUnit.module("lib:url"); diff --git a/test/javascripts/unit/lib/user-search-test.js b/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js similarity index 98% rename from test/javascripts/unit/lib/user-search-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js index 90e39fc110f..d2be24fc018 100644 --- a/test/javascripts/unit/lib/user-search-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js @@ -1,6 +1,6 @@ import userSearch from "discourse/lib/user-search"; import { CANCELLED_STATUS } from "discourse/lib/autocomplete"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("lib:user-search", { beforeEach() { diff --git a/test/javascripts/unit/lib/utilities-test.js b/app/assets/javascripts/discourse/tests/unit/lib/utilities-test.js similarity index 99% rename from test/javascripts/unit/lib/utilities-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/utilities-test.js index 70668fbec9d..cca4509df2f 100644 --- a/test/javascripts/unit/lib/utilities-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/utilities-test.js @@ -16,7 +16,7 @@ import { inCodeBlock, } from "discourse/lib/utilities"; import Handlebars from "handlebars"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("lib:utilities"); diff --git a/test/javascripts/unit/lib/white-lister-test.js b/app/assets/javascripts/discourse/tests/unit/lib/white-lister-test.js similarity index 100% rename from test/javascripts/unit/lib/white-lister-test.js rename to app/assets/javascripts/discourse/tests/unit/lib/white-lister-test.js diff --git a/test/javascripts/unit/localization-test.js b/app/assets/javascripts/discourse/tests/unit/localization-test.js similarity index 100% rename from test/javascripts/unit/localization-test.js rename to app/assets/javascripts/discourse/tests/unit/localization-test.js diff --git a/test/javascripts/unit/mixins/grant-badge-controller-test.js b/app/assets/javascripts/discourse/tests/unit/mixins/grant-badge-controller-test.js similarity index 100% rename from test/javascripts/unit/mixins/grant-badge-controller-test.js rename to app/assets/javascripts/discourse/tests/unit/mixins/grant-badge-controller-test.js diff --git a/test/javascripts/unit/mixins/setting-object-test.js b/app/assets/javascripts/discourse/tests/unit/mixins/setting-object-test.js similarity index 100% rename from test/javascripts/unit/mixins/setting-object-test.js rename to app/assets/javascripts/discourse/tests/unit/mixins/setting-object-test.js diff --git a/test/javascripts/unit/mixins/singleton-test.js b/app/assets/javascripts/discourse/tests/unit/mixins/singleton-test.js similarity index 100% rename from test/javascripts/unit/mixins/singleton-test.js rename to app/assets/javascripts/discourse/tests/unit/mixins/singleton-test.js diff --git a/test/javascripts/unit/models/badge-test.js b/app/assets/javascripts/discourse/tests/unit/models/badge-test.js similarity index 100% rename from test/javascripts/unit/models/badge-test.js rename to app/assets/javascripts/discourse/tests/unit/models/badge-test.js diff --git a/test/javascripts/unit/models/category-test.js b/app/assets/javascripts/discourse/tests/unit/models/category-test.js similarity index 99% rename from test/javascripts/unit/models/category-test.js rename to app/assets/javascripts/discourse/tests/unit/models/category-test.js index 301c42a0f2e..62c4cc92145 100644 --- a/test/javascripts/unit/models/category-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/category-test.js @@ -1,4 +1,4 @@ -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import Category from "discourse/models/category"; QUnit.module("model:category"); diff --git a/test/javascripts/unit/models/composer-test.js b/app/assets/javascripts/discourse/tests/unit/models/composer-test.js similarity index 98% rename from test/javascripts/unit/models/composer-test.js rename to app/assets/javascripts/discourse/tests/unit/models/composer-test.js index 737775d1ef5..bf0dcba37ba 100644 --- a/test/javascripts/unit/models/composer-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/composer-test.js @@ -1,5 +1,8 @@ import EmberObject from "@ember/object"; -import { discourseModule, currentUser } from "helpers/qunit-helpers"; +import { + discourseModule, + currentUser, +} from "discourse/tests/helpers/qunit-helpers"; import AppEvents from "discourse/services/app-events"; import { EDIT, @@ -8,7 +11,7 @@ import { PRIVATE_MESSAGE, } from "discourse/models/composer"; import Post from "discourse/models/post"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; discourseModule("model:composer"); diff --git a/test/javascripts/unit/models/email-log-test.js b/app/assets/javascripts/discourse/tests/unit/models/email-log-test.js similarity index 100% rename from test/javascripts/unit/models/email-log-test.js rename to app/assets/javascripts/discourse/tests/unit/models/email-log-test.js diff --git a/test/javascripts/unit/models/group-test.js b/app/assets/javascripts/discourse/tests/unit/models/group-test.js similarity index 100% rename from test/javascripts/unit/models/group-test.js rename to app/assets/javascripts/discourse/tests/unit/models/group-test.js diff --git a/test/javascripts/unit/models/invite-test.js b/app/assets/javascripts/discourse/tests/unit/models/invite-test.js similarity index 100% rename from test/javascripts/unit/models/invite-test.js rename to app/assets/javascripts/discourse/tests/unit/models/invite-test.js diff --git a/test/javascripts/unit/models/nav-item-test.js b/app/assets/javascripts/discourse/tests/unit/models/nav-item-test.js similarity index 94% rename from test/javascripts/unit/models/nav-item-test.js rename to app/assets/javascripts/discourse/tests/unit/models/nav-item-test.js index 68c7876dbee..b7a515f39e2 100644 --- a/test/javascripts/unit/models/nav-item-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/nav-item-test.js @@ -1,5 +1,5 @@ import { run } from "@ember/runloop"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import NavItem from "discourse/models/nav-item"; import Category from "discourse/models/category"; import Site from "discourse/models/site"; diff --git a/test/javascripts/unit/models/post-stream-test.js b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js similarity index 99% rename from test/javascripts/unit/models/post-stream-test.js rename to app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js index 4cfa3aee68f..487c29ed7b9 100644 --- a/test/javascripts/unit/models/post-stream-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js @@ -1,9 +1,9 @@ import ArrayProxy from "@ember/array/proxy"; import Post from "discourse/models/post"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import User from "discourse/models/user"; import { Promise } from "rsvp"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("model:post-stream"); diff --git a/test/javascripts/unit/models/post-test.js b/app/assets/javascripts/discourse/tests/unit/models/post-test.js similarity index 100% rename from test/javascripts/unit/models/post-test.js rename to app/assets/javascripts/discourse/tests/unit/models/post-test.js diff --git a/test/javascripts/unit/models/report-test.js b/app/assets/javascripts/discourse/tests/unit/models/report-test.js similarity index 100% rename from test/javascripts/unit/models/report-test.js rename to app/assets/javascripts/discourse/tests/unit/models/report-test.js diff --git a/test/javascripts/unit/models/rest-model-test.js b/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js similarity index 98% rename from test/javascripts/unit/models/rest-model-test.js rename to app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js index a7a4ed8bdfa..fa839e0db3d 100644 --- a/test/javascripts/unit/models/rest-model-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js @@ -1,6 +1,6 @@ QUnit.module("rest-model"); -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import RestModel from "discourse/models/rest"; import RestAdapter from "discourse/adapters/rest"; diff --git a/test/javascripts/unit/models/result-set-test.js b/app/assets/javascripts/discourse/tests/unit/models/result-set-test.js similarity index 96% rename from test/javascripts/unit/models/result-set-test.js rename to app/assets/javascripts/discourse/tests/unit/models/result-set-test.js index 657db0db7e5..1fad4e952f9 100644 --- a/test/javascripts/unit/models/result-set-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/result-set-test.js @@ -1,7 +1,7 @@ QUnit.module("result-set"); import ResultSet from "discourse/models/result-set"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; QUnit.test("defaults", (assert) => { const resultSet = ResultSet.create({ content: [] }); diff --git a/test/javascripts/unit/models/session-test.js b/app/assets/javascripts/discourse/tests/unit/models/session-test.js similarity index 100% rename from test/javascripts/unit/models/session-test.js rename to app/assets/javascripts/discourse/tests/unit/models/session-test.js diff --git a/test/javascripts/unit/models/site-test.js b/app/assets/javascripts/discourse/tests/unit/models/site-test.js similarity index 96% rename from test/javascripts/unit/models/site-test.js rename to app/assets/javascripts/discourse/tests/unit/models/site-test.js index b62c09857ee..1bb6a02ed54 100644 --- a/test/javascripts/unit/models/site-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/site-test.js @@ -1,4 +1,4 @@ -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import Site from "discourse/models/site"; QUnit.module("model:site"); diff --git a/test/javascripts/unit/models/staff-action-log-test.js b/app/assets/javascripts/discourse/tests/unit/models/staff-action-log-test.js similarity index 100% rename from test/javascripts/unit/models/staff-action-log-test.js rename to app/assets/javascripts/discourse/tests/unit/models/staff-action-log-test.js diff --git a/test/javascripts/unit/models/store-test.js b/app/assets/javascripts/discourse/tests/unit/models/store-test.js similarity index 98% rename from test/javascripts/unit/models/store-test.js rename to app/assets/javascripts/discourse/tests/unit/models/store-test.js index 1a1780587d2..da9c49e212b 100644 --- a/test/javascripts/unit/models/store-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/store-test.js @@ -1,6 +1,6 @@ QUnit.module("service:store"); -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; QUnit.test("createRecord", (assert) => { const store = createStore(); diff --git a/test/javascripts/unit/models/topic-details-test.js b/app/assets/javascripts/discourse/tests/unit/models/topic-details-test.js similarity index 100% rename from test/javascripts/unit/models/topic-details-test.js rename to app/assets/javascripts/discourse/tests/unit/models/topic-details-test.js diff --git a/test/javascripts/unit/models/topic-test.js b/app/assets/javascripts/discourse/tests/unit/models/topic-test.js similarity index 98% rename from test/javascripts/unit/models/topic-test.js rename to app/assets/javascripts/discourse/tests/unit/models/topic-test.js index 47ecd51f5b1..8b60c846a40 100644 --- a/test/javascripts/unit/models/topic-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/topic-test.js @@ -3,7 +3,7 @@ import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; import Category from "discourse/models/category"; import Topic from "discourse/models/topic"; import User from "discourse/models/user"; -import { discourseModule } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; discourseModule("model:topic"); diff --git a/test/javascripts/unit/models/topic-tracking-state-test.js b/app/assets/javascripts/discourse/tests/unit/models/topic-tracking-state-test.js similarity index 99% rename from test/javascripts/unit/models/topic-tracking-state-test.js rename to app/assets/javascripts/discourse/tests/unit/models/topic-tracking-state-test.js index 9e2b0f60df7..5a83b9b99d0 100644 --- a/test/javascripts/unit/models/topic-tracking-state-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/topic-tracking-state-test.js @@ -1,5 +1,5 @@ import TopicTrackingState from "discourse/models/topic-tracking-state"; -import createStore from "helpers/create-store"; +import createStore from "discourse/tests/helpers/create-store"; import Category from "discourse/models/category"; import { NotificationLevels } from "discourse/lib/notification-levels"; import User from "discourse/models/user"; diff --git a/test/javascripts/unit/models/user-action-test.js b/app/assets/javascripts/discourse/tests/unit/models/user-action-test.js similarity index 100% rename from test/javascripts/unit/models/user-action-test.js rename to app/assets/javascripts/discourse/tests/unit/models/user-action-test.js diff --git a/test/javascripts/unit/models/user-badge-test.js b/app/assets/javascripts/discourse/tests/unit/models/user-badge-test.js similarity index 96% rename from test/javascripts/unit/models/user-badge-test.js rename to app/assets/javascripts/discourse/tests/unit/models/user-badge-test.js index 4a5dbd62d09..cc7df97cca5 100644 --- a/test/javascripts/unit/models/user-badge-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/user-badge-test.js @@ -1,5 +1,5 @@ import UserBadge from "discourse/models/user-badge"; -import badgeFixtures from "fixtures/user-badges"; +import badgeFixtures from "discourse/tests/fixtures/user-badges"; QUnit.module("model:user-badge"); diff --git a/test/javascripts/unit/models/user-drafts-test.js b/app/assets/javascripts/discourse/tests/unit/models/user-drafts-test.js similarity index 100% rename from test/javascripts/unit/models/user-drafts-test.js rename to app/assets/javascripts/discourse/tests/unit/models/user-drafts-test.js diff --git a/test/javascripts/unit/models/user-stream-test.js b/app/assets/javascripts/discourse/tests/unit/models/user-stream-test.js similarity index 100% rename from test/javascripts/unit/models/user-stream-test.js rename to app/assets/javascripts/discourse/tests/unit/models/user-stream-test.js diff --git a/test/javascripts/unit/models/user-test.js b/app/assets/javascripts/discourse/tests/unit/models/user-test.js similarity index 98% rename from test/javascripts/unit/models/user-test.js rename to app/assets/javascripts/discourse/tests/unit/models/user-test.js index b5d32c97a5e..aa36461aef1 100644 --- a/test/javascripts/unit/models/user-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/user-test.js @@ -1,7 +1,7 @@ import User from "discourse/models/user"; import Group from "discourse/models/group"; import * as ajaxlib from "discourse/lib/ajax"; -import pretender from "helpers/create-pretender"; +import pretender from "discourse/tests/helpers/create-pretender"; QUnit.module("model:user"); diff --git a/test/javascripts/unit/services/document-title-test.js b/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js similarity index 93% rename from test/javascripts/unit/services/document-title-test.js rename to app/assets/javascripts/discourse/tests/unit/services/document-title-test.js index 6cfc157e1a2..0d150df4c1f 100644 --- a/test/javascripts/unit/services/document-title-test.js +++ b/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js @@ -1,5 +1,5 @@ -import { discourseModule } from "helpers/qunit-helpers"; -import { currentUser } from "helpers/qunit-helpers"; +import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; +import { currentUser } from "discourse/tests/helpers/qunit-helpers"; discourseModule("service:document-title", { beforeEach() { diff --git a/test/javascripts/unit/utils/decorators-test.js b/app/assets/javascripts/discourse/tests/unit/utils/decorators-test.js similarity index 93% rename from test/javascripts/unit/utils/decorators-test.js rename to app/assets/javascripts/discourse/tests/unit/utils/decorators-test.js index 4e1dd9d3dd1..d9b58410571 100644 --- a/test/javascripts/unit/utils/decorators-test.js +++ b/app/assets/javascripts/discourse/tests/unit/utils/decorators-test.js @@ -1,6 +1,6 @@ import { afterRender } from "discourse-common/utils/decorators"; import Component from "@ember/component"; -import componentTest from "helpers/component-test"; +import componentTest from "discourse/tests/helpers/component-test"; const fooComponent = Component.extend({ layoutName: "foo-component", diff --git a/test/stylesheets/test_helper.css b/app/assets/stylesheets/test_helper.css similarity index 100% rename from test/stylesheets/test_helper.css rename to app/assets/stylesheets/test_helper.css diff --git a/config/application.rb b/config/application.rb index d84148df119..a55a24e27a7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -134,8 +134,7 @@ module Discourse config.assets.paths += %W(#{config.root}/config/locales #{config.root}/public/javascripts) if Rails.env == "development" || Rails.env == "test" - config.assets.paths << "#{config.root}/test/javascripts" - config.assets.paths << "#{config.root}/test/stylesheets" + config.assets.paths << "#{config.root}/app/assets/javascripts/discourse/tests" config.assets.paths << "#{config.root}/node_modules" end @@ -356,7 +355,7 @@ module Discourse %w{qunit.js qunit.css test_helper.css - test_helper.js + discourse/tests/test_helper.js wizard/test/test_helper.js }.include?(logical_path) || logical_path =~ /\/node_modules/ || diff --git a/config/environments/test.rb b/config/environments/test.rb index bbb7614e80f..0d753f4ed8b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -13,7 +13,7 @@ Discourse::Application.configure do config.public_file_server.enabled = true # don't consider reqs local so we can properly handle exceptions like we do in prd - config.consider_all_requests_local = false + config.consider_all_requests_local = false # disable caching config.action_controller.perform_caching = false diff --git a/lib/autospec/qunit_runner.rb b/lib/autospec/qunit_runner.rb index 579e6834cea..ff97d9896c4 100644 --- a/lib/autospec/qunit_runner.rb +++ b/lib/autospec/qunit_runner.rb @@ -29,9 +29,9 @@ module Autospec end # Discourse specific - reload(%r{^test/javascripts/fixtures/.+_fixtures\.js(\.es6)?$}) - reload(%r{^test/javascripts/(helpers|mixins)/.+\.js(\.es6)?$}) - reload("test/javascripts/test_helper.js") + reload(%r{^discourse/tests/javascripts/fixtures/.+_fixtures\.js(\.es6)?$}) + reload(%r{^discourse/tests/javascripts/(helpers|mixins)/.+\.js(\.es6)?$}) + reload("app/assets/javascripts/discoruse/tests/javascripts/test_helper.js") watch(%r{^plugins/.*/test/.+\.js(\.es6)?$}) diff --git a/lib/generators/plugin/templates/acceptance-test.js.es6.erb b/lib/generators/plugin/templates/acceptance-test.js.es6.erb index 85da8e9791f..472650a2666 100644 --- a/lib/generators/plugin/templates/acceptance-test.js.es6.erb +++ b/lib/generators/plugin/templates/acceptance-test.js.es6.erb @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("<%= name %>", { loggedIn: true }); diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index 1d658eb987f..a09a41e2210 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -75,7 +75,7 @@ task 'docker:test' do else @good &&= run_or_fail("bundle exec rake plugin:update_all") unless ENV["SKIP_PLUGINS"] @good &&= run_or_fail("bundle exec rubocop --parallel") unless ENV["SKIP_CORE"] - @good &&= run_or_fail("yarn eslint app/assets/javascripts test/javascripts") unless ENV["SKIP_CORE"] + @good &&= run_or_fail("yarn eslint app/assets/javascripts") unless ENV["SKIP_CORE"] # TODO: remove --global I18n once plugins can be updated @good &&= run_or_fail("yarn eslint --global I18n --ext .js,.js.es6 --no-error-on-unmatched-pattern plugins") unless ENV["SKIP_PLUGINS"] @@ -85,7 +85,7 @@ task 'docker:test' do unless ENV["SKIP_CORE"] puts "Listing prettier offenses in core:" - @good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.{js,es6}" "test/javascripts/**/*.{js,es6}"') + @good &&= run_or_fail('yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.{js,es6}"') end unless ENV["SKIP_PLUGINS"] diff --git a/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 b/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 index d8fe217648f..48a14e8a41f 100644 --- a/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 +++ b/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js.es6 @@ -1,7 +1,7 @@ import I18n from "I18n"; -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import selectKit from "helpers/select-kit-helper"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("Details Button", { loggedIn: true, diff --git a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 index 5ab6ecf6324..dfb3298e9e5 100644 --- a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 +++ b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Local Dates - composer", { loggedIn: true, diff --git a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 index edbfd29fee9..521805ce2e8 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; import { Promise } from "rsvp"; diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 index f22228244ec..f91c492dbfa 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import { acceptance, updateCurrentUser } from "discourse/tests/helpers/qunit-helpers"; import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 index 2229ad5c77f..ea632322054 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 @@ -1,5 +1,5 @@ -import selectKit from "helpers/select-kit-helper"; -import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; +import { acceptance, updateCurrentUser } from "discourse/tests/helpers/qunit-helpers"; import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; diff --git a/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 index d0ae61b13f6..60762e2da87 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Rendering polls with pie charts - desktop", { loggedIn: true, diff --git a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 index 9105e5e9766..ffee71a0d3b 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; import { Promise } from "rsvp"; diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 index a8dc1f4701a..2fef5874c21 100644 --- a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; acceptance("Rendering polls with bar charts - desktop", { diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 index 0e0ffffb1bb..35f5ea55eab 100644 --- a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 @@ -1,4 +1,4 @@ -import { acceptance } from "helpers/qunit-helpers"; +import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; acceptance("Rendering polls with bar charts - mobile", { diff --git a/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 b/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 index 1721967e68b..00906a1b1a2 100644 --- a/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 +++ b/plugins/poll/test/javascripts/controllers/poll-ui-builder-test.js.es6 @@ -1,4 +1,4 @@ -import { controllerModule } from "helpers/qunit-helpers"; +import { controllerModule } from "discourse/tests/helpers/qunit-helpers"; controllerModule("controller:poll-ui-builder", { setupController(controller) { diff --git a/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 b/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 index 5288ed9b95d..8d9318cba7e 100644 --- a/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 +++ b/plugins/poll/test/javascripts/helpers/display-poll-builder-button.js.es6 @@ -1,4 +1,4 @@ -import selectKit from "helpers/select-kit-helper"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; export async function displayPollBuilderButton() { await visit("/"); diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 index 8fde7df280f..5643f5f262c 100644 --- a/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 +++ b/plugins/poll/test/javascripts/widgets/discourse-poll-option-test.js.es6 @@ -1,4 +1,4 @@ -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { moduleForWidget, widgetTest } from "discourse/tests/helpers/widget-test"; moduleForWidget("discourse-poll-option"); const template = `{{mount-widget diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 index 6bc9cb892c5..39556b20f72 100644 --- a/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 +++ b/plugins/poll/test/javascripts/widgets/discourse-poll-standard-results-test.js.es6 @@ -1,5 +1,5 @@ import EmberObject from "@ember/object"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { moduleForWidget, widgetTest } from "discourse/tests/helpers/widget-test"; moduleForWidget("discourse-poll-standard-results"); diff --git a/plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 b/plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 index 984b99d0cde..de1fe97067d 100644 --- a/plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 +++ b/plugins/poll/test/javascripts/widgets/discourse-poll-test.js.es6 @@ -1,6 +1,6 @@ import I18n from "I18n"; import EmberObject from "@ember/object"; -import { moduleForWidget, widgetTest } from "helpers/widget-test"; +import { moduleForWidget, widgetTest } from "discourse/tests/helpers/widget-test"; moduleForWidget("discourse-poll");