REFACTOR: Move javascript tests inside discourse app

This is where they should be as far as ember is concerned. Note this is
a huge commit and we should be really careful everything continues to
work properly.
This commit is contained in:
Robin Ward 2020-10-01 13:25:58 -04:00
parent 99181bb3b8
commit 23f24bfb51
325 changed files with 554 additions and 417 deletions

View File

@ -10,8 +10,8 @@ lib/highlight_js/
plugins/**/lib/javascripts/locale plugins/**/lib/javascripts/locale
public/ public/
vendor/ vendor/
test/javascripts/test_helper.js app/assets/javascripts/discourse/tests/test_helper.js
test/javascripts/fixtures app/assets/javascripts/discourse/tests/fixtures
test/javascripts/helpers/assertions.js app/assets/javascripts/discourse/tests/helpers/assertions.js
node_modules/ node_modules/
dist/ dist/

View File

@ -147,7 +147,7 @@ jobs:
- name: ESLint (core) - name: ESLint (core)
if: env.BUILD_TYPE == 'LINT' && env.TARGET == '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) - name: ESLint (core plugins)
if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'CORE' if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'CORE'
@ -164,7 +164,6 @@ jobs:
yarn prettier --list-different \ yarn prettier --list-different \
"app/assets/stylesheets/**/*.scss" \ "app/assets/stylesheets/**/*.scss" \
"app/assets/javascripts/**/*.{js,es6}" \ "app/assets/javascripts/**/*.{js,es6}" \
"test/javascripts/**/*.{js,es6}" \
"plugins/**/assets/stylesheets/**/*.scss" \ "plugins/**/assets/stylesheets/**/*.scss" \
"plugins/**/assets/javascripts/**/*.{js,es6}" "plugins/**/assets/javascripts/**/*.{js,es6}"

View File

@ -18,8 +18,8 @@ lib/highlight_js/
plugins/**/lib/javascripts/locale plugins/**/lib/javascripts/locale
public/ public/
vendor/ vendor/
test/javascripts/test_helper.js app/assets/javascripts/discourse/tests/test_helper.js
test/javascripts/fixtures app/assets/javascripts/discourse/tests/fixtures
test/javascripts/helpers/assertions.js app/assets/javascripts/discourse/tests/helpers/assertions.js
node_modules/ node_modules/
dist/ dist/

View File

@ -1,6 +1,6 @@
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import componentTest from "helpers/component-test"; import componentTest from "discourse/tests/helpers/component-test";
moduleForComponent("group-list", { integration: true }); moduleForComponent("group-list", { integration: true });

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import componentTest from "helpers/component-test"; import componentTest from "discourse/tests/helpers/component-test";
import Theme from "admin/models/theme"; import Theme from "admin/models/theme";
moduleForComponent("themes-list-item", { integration: true }); moduleForComponent("themes-list-item", { integration: true });

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; 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"; import Theme, { THEMES, COMPONENTS } from "admin/models/theme";
moduleForComponent("themes-list", { integration: true }); moduleForComponent("themes-list", { integration: true });

View File

@ -1,12 +1,17 @@
var define, requirejs; var define, requirejs;
(function () { (function () {
var JS_MODULES = {}; let JS_MODULES = {};
var ALIASES = { const ALIASES = {
"ember-addons/ember-computed-decorators": "ember-addons/ember-computed-decorators":
"discourse-common/utils/decorators", "discourse-common/utils/decorators",
"discourse/lib/raw-templates": "discourse-common/lib/raw-templates", "discourse/lib/raw-templates": "discourse-common/lib/raw-templates",
"preload-store": "discourse/lib/preload-store", "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 // In future versions of ember we don't need this
@ -299,11 +304,15 @@ var define, requirejs;
} }
function transformForAliases(name) { function transformForAliases(name) {
var alias = ALIASES[name]; let alias = ALIASES[name];
if (!alias) { if (!alias) {
let segment = name.split("/")[0];
let prepend = ALIAS_PREPEND[segment];
if (!prepend) {
return name; return name;
} }
alias = prepend + name;
}
deprecatedModule(name, alias); deprecatedModule(name, alias);
return alias; return alias;
} }

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("About"); acceptance("About");
QUnit.test("viewing", async (assert) => { QUnit.test("viewing", async (assert) => {

View File

@ -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"; import PreloadStore from "discourse/lib/preload-store";
acceptance("Account Created"); acceptance("Account Created");

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
acceptance("Admin - Emails", { loggedIn: true }); acceptance("Admin - Emails", { loggedIn: true });

View File

@ -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 }); acceptance("Admin - Search Log Term", { loggedIn: true });
QUnit.skip("show search log term details", async (assert) => { QUnit.skip("show search log term details", async (assert) => {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Logs", { loggedIn: true }); acceptance("Admin - Search Logs", { loggedIn: true });
QUnit.skip("show search logs", async (assert) => { QUnit.skip("show search logs", async (assert) => {

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import siteSettingFixture from "fixtures/site_settings"; import siteSettingFixture from "discourse/tests/fixtures/site-settings";
var titleOverride = undefined; var titleOverride = undefined;

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Site Texts", { loggedIn: true }); acceptance("Admin - Site Texts", { loggedIn: true });

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Suspend User", { acceptance("Admin - Suspend User", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Users Badges", { loggedIn: true }); acceptance("Admin - Users Badges", { loggedIn: true });

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - User Emails", { loggedIn: true }); acceptance("Admin - User Emails", { loggedIn: true });

View File

@ -1,6 +1,6 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
acceptance("Admin - User Index", { acceptance("Admin - User Index", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Users List", { loggedIn: true }); acceptance("Admin - Users List", { loggedIn: true });

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Watched Words", { loggedIn: true }); acceptance("Admin - Watched Words", { loggedIn: true });
QUnit.test("list words in groups", async (assert) => { QUnit.test("list words in groups", async (assert) => {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Auth Complete", { acceptance("Auth Complete", {
beforeEach() { beforeEach() {
const node = document.createElement("meta"); const node = document.createElement("meta");

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Badges", { loggedIn: true }); acceptance("Badges", { loggedIn: true });

View File

@ -1,12 +1,13 @@
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { import {
acceptance, acceptance,
loggedInUser, loggedInUser,
acceptanceUseFakeClock, acceptanceUseFakeClock,
} from "helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender, {
import { parsePostData } from "helpers/create-pretender"; parsePostData,
} from "discourse/tests/helpers/create-pretender";
acceptance("Bookmarking", { acceptance("Bookmarking", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "fixtures/discovery_fixtures"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
acceptance("Category Banners", { acceptance("Category Banners", {
pretend(server, helper) { pretend(server, helper) {

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("CategoryChooser", { acceptance("CategoryChooser", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Category Edit - security", { acceptance("Category Edit - security", {
loggedIn: true, loggedIn: true,

View File

@ -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 DiscourseURL from "discourse/lib/url";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Category Edit", { acceptance("Category Edit", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Click Track", {}); acceptance("Click Track", {});

View File

@ -1,6 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import { _clearSnapshots } from "select-kit/components/composer-actions"; import { _clearSnapshots } from "select-kit/components/composer-actions";
import { toggleCheckDraftPopup } from "discourse/controllers/composer"; import { toggleCheckDraftPopup } from "discourse/controllers/composer";
import Draft from "discourse/models/draft"; import Draft from "discourse/models/draft";

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
function setupPretender(server, helper) { function setupPretender(server, helper) {
server.post("/uploads/lookup-urls", () => { server.post("/uploads/lookup-urls", () => {

View File

@ -1,6 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
acceptance("Composer - Edit conflict", { acceptance("Composer - Edit conflict", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer - Hyperlink", { acceptance("Composer - Hyperlink", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer - Onebox", { acceptance("Composer - Onebox", {
loggedIn: true, loggedIn: true,

View File

@ -1,6 +1,9 @@
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
import selectKit from "helpers/select-kit-helper"; acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Composer - Tags", { acceptance("Composer - Tags", {
loggedIn: true, loggedIn: true,

View File

@ -1,7 +1,7 @@
import I18n from "I18n"; import I18n from "I18n";
import { run } from "@ember/runloop"; import { run } from "@ember/runloop";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { toggleCheckDraftPopup } from "discourse/controllers/composer"; import { toggleCheckDraftPopup } from "discourse/controllers/composer";
import Draft from "discourse/models/draft"; import Draft from "discourse/models/draft";
import { Promise } from "rsvp"; import { Promise } from "rsvp";

View File

@ -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", { acceptance("Composer topic featured links", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,8 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
acceptance( acceptance(
"Composer disabled, uncategorized not allowed when any topic_template present", "Composer disabled, uncategorized not allowed when any topic_template present",

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Create Account - external auth", { acceptance("Create Account - external auth", {
beforeEach() { beforeEach() {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Create Account - User Fields", { acceptance("Create Account - User Fields", {
site: { site: {

View File

@ -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 { setCustomHTML } from "discourse/helpers/custom-html";
import PreloadStore from "discourse/lib/preload-store"; import PreloadStore from "discourse/lib/preload-store";

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("CustomHTML template", { acceptance("CustomHTML template", {
beforeEach() { beforeEach() {

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Dashboard", { acceptance("Dashboard", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,7 @@
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Email Disabled Banner", { acceptance("Email Disabled Banner", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("EmojiPicker", { acceptance("EmojiPicker", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; 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 }); acceptance("Emoji", { loggedIn: true });

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "fixtures/discovery_fixtures"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
acceptance("Encoded Sub Category Discovery", { acceptance("Encoded Sub Category Discovery", {
pretend(server, helper) { pretend(server, helper) {

View File

@ -1,4 +1,7 @@
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Enforce Second Factor", { acceptance("Enforce Second Factor", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
let userFound = false; let userFound = false;

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
acceptance("Group Card - Mobile", { mobileView: true }); acceptance("Group Card - Mobile", { mobileView: true });

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
acceptance("Group Card"); acceptance("Group Card");

View File

@ -1,5 +1,8 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Group Members"); acceptance("Group Members");

View File

@ -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"); acceptance("Managing Group Category Notification Defaults");
QUnit.test("As an anonymous user", async (assert) => { QUnit.test("As an anonymous user", async (assert) => {

View File

@ -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", { acceptance("Managing Group Interaction Settings", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Group logs", { acceptance("Group logs", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,8 @@
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
import selectKit from "helpers/select-kit-helper"; acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Managing Group Membership", { acceptance("Managing Group Membership", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,7 @@
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Profile"); acceptance("Managing Group Profile");
QUnit.test("As an anonymous user", async (assert) => { QUnit.test("As an anonymous user", async (assert) => {

View File

@ -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"); acceptance("Managing Group Tag Notification Defaults");
QUnit.test("As an anonymous user", async (assert) => { QUnit.test("As an anonymous user", async (assert) => {

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { parsePostData } from "helpers/create-pretender"; import { parsePostData } from "discourse/tests/helpers/create-pretender";
let requests = []; let requests = [];

View File

@ -1,7 +1,7 @@
import I18n from "I18n"; import I18n from "I18n";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
let groupArgs = { let groupArgs = {
settings: { settings: {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Groups"); acceptance("Groups");

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Group"); acceptance("New Group");

View File

@ -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", { acceptance("Opening the hamburger menu with some reviewables", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Category and Tag Hashtags", { acceptance("Category and Tag Hashtags", {
loggedIn: true, loggedIn: true,

View File

@ -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"; import PreloadStore from "discourse/lib/preload-store";
acceptance("Invite Accept", { acceptance("Invite Accept", {

View File

@ -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"; import PreloadStore from "discourse/lib/preload-store";
acceptance("Accept Invite - User Fields", { acceptance("Accept Invite - User Fields", {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Jump to", { acceptance("Jump to", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
acceptance("Keyboard Shortcuts", { loggedIn: true }); acceptance("Keyboard Shortcuts", { loggedIn: true });

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Login redirect"); acceptance("Login redirect");
QUnit.test("redirects login to default homepage", async function (assert) { QUnit.test("redirects login to default homepage", async function (assert) {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Login Required", { acceptance("Login Required", {
settings: { settings: {

View File

@ -1,6 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import pretender from "helpers/create-pretender"; import pretender from "discourse/tests/helpers/create-pretender";
acceptance("Login with email - hide email address taken", { acceptance("Login with email - hide email address taken", {
settings: { settings: {

View File

@ -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", { acceptance("Login with email - no social logins", {
settings: { settings: {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Login with email disabled", { acceptance("Login with email disabled", {
settings: { settings: {

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
let userFound = false; let userFound = false;

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic Discovery - Mobile", { mobileView: true }); acceptance("Topic Discovery - Mobile", { mobileView: true });
QUnit.test("Visit Discovery Pages", async (assert) => { QUnit.test("Visit Discovery Pages", async (assert) => {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Signing In - Mobile", { mobileView: true }); acceptance("Signing In - Mobile", { mobileView: true });

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("User Directory - Mobile", { mobileView: true }); acceptance("User Directory - Mobile", { mobileView: true });

View File

@ -1,6 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import { run } from "@ember/runloop"; 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"; import showModal from "discourse/lib/show-modal";
acceptance("Modal", { acceptance("Modal", {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Message"); acceptance("New Message");

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Topic"); acceptance("New Topic");

View File

@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("NotificationsFilter", { acceptance("NotificationsFilter", {
loggedIn: true, loggedIn: true,

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Page Publishing", { acceptance("Page Publishing", {
loggedIn: true, loggedIn: true,

View File

@ -1,7 +1,7 @@
import I18n from "I18n"; 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 PreloadStore from "discourse/lib/preload-store";
import { parsePostData } from "helpers/create-pretender"; import { parsePostData } from "discourse/tests/helpers/create-pretender";
acceptance("Password Reset", { acceptance("Password Reset", {
pretend(server, helper) { pretend(server, helper) {

View File

@ -1,5 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Personal Message", { acceptance("Personal Message", {
loggedIn: true, loggedIn: true,

View File

@ -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 { withPluginApi } from "discourse/lib/plugin-api";
import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts"; import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts";
import KeyboardShortcutInitializer from "discourse/initializers/keyboard-shortcuts"; import KeyboardShortcutInitializer from "discourse/initializers/keyboard-shortcuts";

View File

@ -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 { extraConnectorClass } from "discourse/lib/plugin-connectors";
import { action } from "@ember/object"; import { action } from "@ember/object";

View File

@ -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 { withPluginApi } from "discourse/lib/plugin-api";
const PREFIX = "javascripts/single-test/connectors"; const PREFIX = "javascripts/single-test/connectors";

View File

@ -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"; import { clearCache } from "discourse/lib/plugin-connectors";
const HELLO = "javascripts/multi-test/connectors/user-profile-primary/hello"; const HELLO = "javascripts/multi-test/connectors/user-profile-primary/hello";

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
const CONNECTOR = const CONNECTOR =
"javascripts/single-test/connectors/user-profile-primary/hello"; "javascripts/single-test/connectors/user-profile-primary/hello";

View File

@ -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 }); acceptance("Post - Admin Menu Anonymous Users", { loggedIn: false });

View File

@ -1,6 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
import selectKit from "helpers/select-kit-helper"; acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import selectKit from "discourse/tests/helpers/select-kit-helper";
import User from "discourse/models/user"; import User from "discourse/models/user";
function preferencesPretender(server, helper) { function preferencesPretender(server, helper) {

View File

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

View File

@ -1,5 +1,8 @@
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers"; import {
import DiscoveryFixtures from "fixtures/discovery_fixtures"; acceptance,
updateCurrentUser,
} from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
acceptance("Redirect to Top", { acceptance("Redirect to Top", {
pretend(server, helper) { pretend(server, helper) {

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Reports", { acceptance("Reports", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,5 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Review", { acceptance("Review", {
loggedIn: true, loggedIn: true,

View File

@ -1,5 +1,9 @@
import selectKit from "helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { selectDate, acceptance, waitFor } from "helpers/qunit-helpers"; import {
selectDate,
acceptance,
waitFor,
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Search - Full Page", { acceptance("Search - Full Page", {
settings: { tagging_enabled: true }, settings: { tagging_enabled: true },

View File

@ -1,4 +1,4 @@
import { acceptance } from "helpers/qunit-helpers"; import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Search - Mobile", { mobileView: true }); acceptance("Search - Mobile", { mobileView: true });

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