DEV: Tidy up imports. (#11364)

Only allow one import definition per file and add a new eslint rule to enforce it.
This commit is contained in:
Roman Rizzi 2020-11-27 11:30:16 -03:00 committed by GitHub
parent 2e5e4dbf19
commit 1c2358ba16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
178 changed files with 394 additions and 408 deletions

View File

@ -1,7 +1,8 @@
{ {
"extends": "eslint-config-discourse", "extends": "eslint-config-discourse",
"rules": { "rules": {
"discourse-ember/global-ember": 2 "discourse-ember/global-ember": 2,
"no-duplicate-imports": 2
}, },
"globals": { "globals": {
"moduleFor": "off", "moduleFor": "off",

View File

@ -6,8 +6,7 @@ import Component from "@ember/component";
import UserField from "admin/models/user-field"; import UserField from "admin/models/user-field";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { propertyEqual } from "discourse/lib/computed"; import { propertyEqual, i18n } from "discourse/lib/computed";
import { i18n } from "discourse/lib/computed";
import discourseComputed, { import discourseComputed, {
observes, observes,
on, on,

View File

@ -1,11 +1,13 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, {
on,
observes,
} from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { or } from "@ember/object/computed"; import { or } from "@ember/object/computed";
import { schedule } from "@ember/runloop"; import { schedule } from "@ember/runloop";
import Component from "@ember/component"; import Component from "@ember/component";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import { on, observes } from "discourse-common/utils/decorators";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import bootbox from "bootbox"; import bootbox from "bootbox";

View File

@ -1,8 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, {
afterRender,
} from "discourse-common/utils/decorators";
import { equal } from "@ember/object/computed"; import { equal } from "@ember/object/computed";
import Component from "@ember/component"; import Component from "@ember/component";
import { afterRender } from "discourse-common/utils/decorators";
const ACTIONS = ["delete", "delete_replies", "edit", "none"]; const ACTIONS = ["delete", "delete_replies", "edit", "none"];

View File

@ -1,8 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { on } from "discourse-common/utils/decorators";
import { schedule } from "@ember/runloop"; import { schedule } from "@ember/runloop";
import Component from "@ember/component"; import Component from "@ember/component";
import bootbox from "bootbox"; import bootbox from "bootbox";
import ScreenedIpAddress from "admin/models/screened-ip-address";
/** /**
A form to create an IP address that will be blocked or allowed. A form to create an IP address that will be blocked or allowed.
@ -15,9 +16,6 @@ import bootbox from "bootbox";
as an argument. as an argument.
**/ **/
import ScreenedIpAddress from "admin/models/screened-ip-address";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({ export default Component.extend({
classNames: ["screened-ip-address-form"], classNames: ["screened-ip-address-form"],
formSubmitted: false, formSubmitted: false,

View File

@ -1,8 +1,7 @@
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { on } from "discourse-common/utils/decorators";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse-common/lib/helpers";
import { empty, reads } from "@ember/object/computed"; import { empty, reads } from "@ember/object/computed";
import Component from "@ember/component"; import Component from "@ember/component";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({ export default Component.extend({
classNameBindings: [":value-list"], classNameBindings: [":value-list"],

View File

@ -1,10 +1,9 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import Controller from "@ember/controller"; import Controller, { inject as controller } from "@ember/controller";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { inject as controller } from "@ember/controller";
import bootbox from "bootbox"; import bootbox from "bootbox";
export default Controller.extend(bufferedProperty("emailTemplate"), { export default Controller.extend(bufferedProperty("emailTemplate"), {

View File

@ -1,8 +1,7 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse-common/lib/helpers";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { setting } from "discourse/lib/computed"; import { setting } from "discourse/lib/computed";
import AdminDashboard from "admin/models/admin-dashboard"; import AdminDashboard from "admin/models/admin-dashboard";
import Report from "admin/models/report"; import Report from "admin/models/report";

View File

@ -4,11 +4,10 @@ import { inject as service } from "@ember/service";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import CanCheckEmails from "discourse/mixins/can-check-emails"; import CanCheckEmails from "discourse/mixins/can-check-emails";
import { propertyNotEqual, setting } from "discourse/lib/computed"; import { propertyNotEqual, setting, fmt } from "discourse/lib/computed";
import { userPath } from "discourse/lib/url"; import { userPath } from "discourse/lib/url";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { fmt } from "discourse/lib/computed";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
import bootbox from "bootbox"; import bootbox from "bootbox";

View File

@ -4,13 +4,13 @@ import discourseComputed from "discourse-common/utils/decorators";
import { makeArray } from "discourse-common/lib/helpers"; import { makeArray } from "discourse-common/lib/helpers";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import EmberObject from "@ember/object"; import EmberObject from "@ember/object";
import { escapeExpression } from "discourse/lib/utilities";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import round from "discourse/lib/round"; import round from "discourse/lib/round";
import { import {
fillMissingDates, fillMissingDates,
formatUsername, formatUsername,
toNumber, toNumber,
escapeExpression,
} from "discourse/lib/utilities"; } from "discourse/lib/utilities";
import { number, durationTiny } from "discourse/lib/formatter"; import { number, durationTiny } from "discourse/lib/formatter";
import { renderAvatar } from "discourse/helpers/user-avatar"; import { renderAvatar } from "discourse/helpers/user-avatar";

View File

@ -3,8 +3,7 @@ import isDescriptor from "discourse-common/utils/is-descriptor";
import extractValue from "discourse-common/utils/extract-value"; import extractValue from "discourse-common/utils/extract-value";
import decoratorAlias from "discourse-common/utils/decorator-alias"; import decoratorAlias from "discourse-common/utils/decorator-alias";
import macroAlias from "discourse-common/utils/macro-alias"; import macroAlias from "discourse-common/utils/macro-alias";
import { schedule, next } from "@ember/runloop"; import { schedule, next, bind as emberBind } from "@ember/runloop";
import { bind as emberBind } from "@ember/runloop";
export default function discourseComputedDecorator(...params) { export default function discourseComputedDecorator(...params) {
// determine if user called as @discourseComputed('blah', 'blah') or @discourseComputed // determine if user called as @discourseComputed('blah', 'blah') or @discourseComputed

View File

@ -1,6 +1,5 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import RestAdapter from "discourse/adapters/rest"; import RestAdapter, { Result } from "discourse/adapters/rest";
import { Result } from "discourse/adapters/rest";
import { underscore } from "@ember/string"; import { underscore } from "@ember/string";
export default RestAdapter.extend({ export default RestAdapter.extend({

View File

@ -1,7 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import { computed } from "@ember/object"; import { computed, action } from "@ember/object";
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box"; import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
import { action } from "@ember/object";
export default DropdownSelectBoxComponent.extend({ export default DropdownSelectBoxComponent.extend({
classNames: ["bookmark-actions-dropdown"], classNames: ["bookmark-actions-dropdown"],

View File

@ -3,8 +3,7 @@ import { next } from "@ember/runloop";
import Component from "@ember/component"; import Component from "@ember/component";
import discourseDebounce from "discourse/lib/debounce"; import discourseDebounce from "discourse/lib/debounce";
import { searchForTerm } from "discourse/lib/search"; import { searchForTerm } from "discourse/lib/search";
import { observes } from "discourse-common/utils/decorators"; import discourseComputed, { observes } from "discourse-common/utils/decorators";
import discourseComputed from "discourse-common/utils/decorators";
export default Component.extend({ export default Component.extend({
loading: null, loading: null,

View File

@ -1,8 +1,7 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import Component from "@ember/component"; import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
import LivePostCounts from "discourse/models/live-post-counts"; import LivePostCounts from "discourse/models/live-post-counts";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";

View File

@ -10,7 +10,6 @@ import discourseComputed, {
} from "discourse-common/utils/decorators"; } from "discourse-common/utils/decorators";
import { categoryHashtagTriggerRule } from "discourse/lib/category-hashtags"; import { categoryHashtagTriggerRule } from "discourse/lib/category-hashtags";
import { search as searchCategoryTag } from "discourse/lib/category-tag-search"; import { search as searchCategoryTag } from "discourse/lib/category-tag-search";
import { generateCookFunction } from "discourse/lib/text";
import { getRegister } from "discourse-common/lib/get-owner"; import { getRegister } from "discourse-common/lib/get-owner";
import { findRawTemplate } from "discourse-common/lib/raw-templates"; import { findRawTemplate } from "discourse-common/lib/raw-templates";
import { siteDir } from "discourse/lib/text-direction"; import { siteDir } from "discourse/lib/text-direction";
@ -26,7 +25,7 @@ import deprecated from "discourse-common/lib/deprecated";
import { wantsNewWindow } from "discourse/lib/intercept-click"; import { wantsNewWindow } from "discourse/lib/intercept-click";
import { translations } from "pretty-text/emoji/data"; import { translations } from "pretty-text/emoji/data";
import { emojiSearch, isSkinTonableEmoji } from "pretty-text/emoji"; import { emojiSearch, isSkinTonableEmoji } from "pretty-text/emoji";
import { emojiUrlFor } from "discourse/lib/text"; import { emojiUrlFor, generateCookFunction } from "discourse/lib/text";
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import { isTesting } from "discourse-common/config/environment"; import { isTesting } from "discourse-common/config/environment";

View File

@ -1,7 +1,6 @@
import { buildCategoryPanel } from "discourse/components/edit-category-panel"; import { buildCategoryPanel } from "discourse/components/edit-category-panel";
import PermissionType from "discourse/models/permission-type"; import PermissionType from "discourse/models/permission-type";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { not } from "@ember/object/computed"; import { not } from "@ember/object/computed";
export default buildCategoryPanel("security", { export default buildCategoryPanel("security", {

View File

@ -1,20 +1,17 @@
import { observes } from "discourse-common/utils/decorators"; import { observes, bind } from "discourse-common/utils/decorators";
import { bind } from "discourse-common/utils/decorators";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import { emojiUnescape } from "discourse/lib/text"; import { emojiUnescape, emojiUrlFor } from "discourse/lib/text";
import { escapeExpression } from "discourse/lib/utilities";
import { action, computed } from "@ember/object"; import { action, computed } from "@ember/object";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
import { schedule, later } from "@ember/runloop"; import { schedule, later } from "@ember/runloop";
import Component from "@ember/component"; import Component from "@ember/component";
import { emojiUrlFor } from "discourse/lib/text";
import { createPopper } from "@popperjs/core"; import { createPopper } from "@popperjs/core";
import { import {
extendedEmojiList, extendedEmojiList,
isSkinTonableEmoji, isSkinTonableEmoji,
emojiSearch, emojiSearch,
} from "pretty-text/emoji"; } from "pretty-text/emoji";
import { safariHacksDisabled } from "discourse/lib/utilities"; import { safariHacksDisabled, escapeExpression } from "discourse/lib/utilities";
function customEmojis() { function customEmojis() {
const list = extendedEmojiList(); const list = extendedEmojiList();

View File

@ -1,9 +1,11 @@
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse-common/lib/get-url";
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, {
on,
observes,
} from "discourse-common/utils/decorators";
import { debounce } from "@ember/runloop"; import { debounce } from "@ember/runloop";
import Component from "@ember/component"; import Component from "@ember/component";
import { on, observes } from "discourse-common/utils/decorators";
import { escapeExpression } from "discourse/lib/utilities"; import { escapeExpression } from "discourse/lib/utilities";
import { convertIconClass } from "discourse-common/lib/icon-library"; import { convertIconClass } from "discourse-common/lib/icon-library";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";

View File

@ -1,6 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { on } from "discourse-common/utils/decorators";
import { on } from "discourse-common/utils/decorators";
import TextField from "discourse/components/text-field"; import TextField from "discourse/components/text-field";
import { applySearchAutocomplete } from "discourse/lib/search"; import { applySearchAutocomplete } from "discourse/lib/search";

View File

@ -7,7 +7,6 @@ import DiscourseURL from "discourse/lib/url";
import { findRawTemplate } from "discourse-common/lib/raw-templates"; import { findRawTemplate } from "discourse-common/lib/raw-templates";
import { wantsNewWindow } from "discourse/lib/intercept-click"; import { wantsNewWindow } from "discourse/lib/intercept-click";
import { on } from "@ember/object/evented"; import { on } from "@ember/object/evented";
import { topicTitleDecorators } from "discourse/components/topic-title"; import { topicTitleDecorators } from "discourse/components/topic-title";
export function showEntrance(e) { export function showEntrance(e) {

View File

@ -1,9 +1,8 @@
import I18n from "I18n"; import I18n from "I18n";
import { schedule } from "@ember/runloop"; import { schedule, next } from "@ember/runloop";
import { and, or } from "@ember/object/computed"; import { and, or } from "@ember/object/computed";
import { next } from "@ember/runloop";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { isPresent } from "@ember/utils"; import { isPresent, isEmpty } from "@ember/utils";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
@ -14,7 +13,6 @@ import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts";
import { formattedReminderTime, REMINDER_TYPES } from "discourse/lib/bookmark"; import { formattedReminderTime, REMINDER_TYPES } from "discourse/lib/bookmark";
import { AUTO_DELETE_PREFERENCES } from "discourse/models/bookmark"; import { AUTO_DELETE_PREFERENCES } from "discourse/models/bookmark";
import bootbox from "bootbox"; import bootbox from "bootbox";
import { isEmpty } from "@ember/utils";
// global shortcuts that interfere with these modal shortcuts, they are rebound when the // global shortcuts that interfere with these modal shortcuts, they are rebound when the
// modal is closed // modal is closed

View File

@ -3,8 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import Topic from "discourse/models/topic"; import Topic from "discourse/models/topic";

View File

@ -2,8 +2,7 @@ import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import Topic from "discourse/models/topic"; import Topic from "discourse/models/topic";

View File

@ -4,12 +4,10 @@ import { isEmpty } from "@ember/utils";
import { and, or, alias, reads } from "@ember/object/computed"; import { and, or, alias, reads } from "@ember/object/computed";
import { cancel, debounce, run } from "@ember/runloop"; import { cancel, debounce, run } from "@ember/runloop";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import { buildQuote } from "discourse/lib/quote"; import { buildQuote } from "discourse/lib/quote";
import Draft from "discourse/models/draft"; import Draft from "discourse/models/draft";
import Composer from "discourse/models/composer";
import discourseComputed, { import discourseComputed, {
observes, observes,
on, on,
@ -22,7 +20,7 @@ import {
} from "discourse/lib/uploads"; } from "discourse/lib/uploads";
import { emojiUnescape } from "discourse/lib/text"; import { emojiUnescape } from "discourse/lib/text";
import { shortDate } from "discourse/lib/formatter"; import { shortDate } from "discourse/lib/formatter";
import { SAVE_LABELS, SAVE_ICONS } from "discourse/models/composer"; import Composer, { SAVE_LABELS, SAVE_ICONS } from "discourse/models/composer";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import { isTesting } from "discourse-common/config/environment"; import { isTesting } from "discourse-common/config/environment";
import EmberObject, { computed, action } from "@ember/object"; import EmberObject, { computed, action } from "@ember/object";

View File

@ -1,5 +1,4 @@
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
// Just add query params here to have them automatically passed to topic list filters. // Just add query params here to have them automatically passed to topic list filters.
export const queryParams = { export const queryParams = {

View File

@ -1,7 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import { categoryLinkHTML } from "discourse/helpers/category-link"; import { categoryLinkHTML } from "discourse/helpers/category-link";

View File

@ -1,7 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { extractError } from "discourse/lib/ajax-error"; import { extractError } from "discourse/lib/ajax-error";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import GrantBadgeController from "discourse/mixins/grant-badge-controller"; import GrantBadgeController from "discourse/mixins/grant-badge-controller";

View File

@ -1,11 +1,13 @@
import I18n from "I18n"; import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, {
on,
observes,
} from "discourse-common/utils/decorators";
import { alias, gt, not, or, equal } from "@ember/object/computed"; import { alias, gt, not, or, equal } from "@ember/object/computed";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import { categoryBadgeHTML } from "discourse/helpers/category-link"; import { categoryBadgeHTML } from "discourse/helpers/category-link";
import { propertyGreaterThan, propertyLessThan } from "discourse/lib/computed"; import { propertyGreaterThan, propertyLessThan } from "discourse/lib/computed";
import { on, observes } from "discourse-common/utils/decorators";
import { sanitizeAsync } from "discourse/lib/text"; import { sanitizeAsync } from "discourse/lib/text";
import { iconHTML } from "discourse-common/lib/icon-library"; import { iconHTML } from "discourse-common/lib/icon-library";
import Post from "discourse/models/post"; import Post from "discourse/models/post";

View File

@ -2,8 +2,7 @@ import I18n from "I18n";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
import { alias, equal } from "@ember/object/computed"; import { alias, equal } from "@ember/object/computed";
import { next } from "@ember/runloop"; import { next } from "@ember/runloop";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality"; import ModalFunctionality from "discourse/mixins/modal-functionality";
import { movePosts, mergeTopic } from "discourse/models/topic"; import { movePosts, mergeTopic } from "discourse/models/topic";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";

View File

@ -3,10 +3,9 @@ import I18n from "I18n";
import { alias, or, readOnly } from "@ember/object/computed"; import { alias, or, readOnly } from "@ember/object/computed";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL, { userPath } from "discourse/lib/url";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import PasswordValidation from "discourse/mixins/password-validation"; import PasswordValidation from "discourse/mixins/password-validation";
import { userPath } from "discourse/lib/url";
import { SECOND_FACTOR_METHODS } from "discourse/models/user"; import { SECOND_FACTOR_METHODS } from "discourse/models/user";
import { getWebauthnCredential } from "discourse/lib/webauthn"; import { getWebauthnCredential } from "discourse/lib/webauthn";

View File

@ -1,7 +1,5 @@
import I18n from "I18n"; import I18n from "I18n";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { setDefaultHomepage } from "discourse/lib/utilities";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { listThemes, setLocalTheme } from "discourse/lib/theme-selector"; import { listThemes, setLocalTheme } from "discourse/lib/theme-selector";
import { import {
@ -15,6 +13,7 @@ import {
safariHacksDisabled, safariHacksDisabled,
isiPad, isiPad,
iOSWithVisualViewport, iOSWithVisualViewport,
setDefaultHomepage,
} from "discourse/lib/utilities"; } from "discourse/lib/utilities";
import { computed } from "@ember/object"; import { computed } from "@ember/object";
import { reads } from "@ember/object/computed"; import { reads } from "@ember/object/computed";

View File

@ -4,8 +4,7 @@ import { empty, or } from "@ember/object/computed";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import discourseComputed, { observes } from "discourse-common/utils/decorators"; import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { setting, propertyEqual } from "discourse/lib/computed"; import { setting, propertyEqual } from "discourse/lib/computed";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL, { userPath } from "discourse/lib/url";
import { userPath } from "discourse/lib/url";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import User from "discourse/models/user"; import User from "discourse/models/user";
import bootbox from "bootbox"; import bootbox from "bootbox";

View File

@ -6,7 +6,7 @@ import { next, schedule, later } from "@ember/runloop";
import Controller, { inject as controller } from "@ember/controller"; import Controller, { inject as controller } from "@ember/controller";
import { bufferedProperty } from "discourse/mixins/buffered-content"; import { bufferedProperty } from "discourse/mixins/buffered-content";
import Composer from "discourse/models/composer"; import Composer from "discourse/models/composer";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL, { userPath } from "discourse/lib/url";
import Post from "discourse/models/post"; import Post from "discourse/models/post";
import { buildQuote } from "discourse/lib/quote"; import { buildQuote } from "discourse/lib/quote";
import QuoteState from "discourse/lib/quote-state"; import QuoteState from "discourse/lib/quote-state";
@ -18,7 +18,6 @@ import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { extractLinkMeta } from "discourse/lib/render-topic-featured-link"; import { extractLinkMeta } from "discourse/lib/render-topic-featured-link";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import { spinnerHTML } from "discourse/helpers/loading-spinner"; import { spinnerHTML } from "discourse/helpers/loading-spinner";
import { userPath } from "discourse/lib/url";
import showModal from "discourse/lib/show-modal"; import showModal from "discourse/lib/show-modal";
import TopicTimer from "discourse/models/topic-timer"; import TopicTimer from "discourse/models/topic-timer";
import { Promise } from "rsvp"; import { Promise } from "rsvp";

View File

@ -1,7 +1,6 @@
import I18n from "I18n"; import I18n from "I18n";
import Controller from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import { inject } from "@ember/controller";
import { action } from "@ember/object"; import { action } from "@ember/object";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import Bookmark from "discourse/models/bookmark"; import Bookmark from "discourse/models/bookmark";

View File

@ -1,7 +1,6 @@
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import { alias } from "@ember/object/computed"; import { alias } from "@ember/object/computed";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { durationTiny } from "discourse/lib/formatter"; import { durationTiny } from "discourse/lib/formatter";
// should be kept in sync with 'UserSummary::MAX_BADGES' // should be kept in sync with 'UserSummary::MAX_BADGES'

View File

@ -3,8 +3,7 @@ import { isEmpty } from "@ember/utils";
import { alias, or, gt, not, and } from "@ember/object/computed"; import { alias, or, gt, not, and } from "@ember/object/computed";
import EmberObject, { set, computed } from "@ember/object"; import EmberObject, { set, computed } from "@ember/object";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
import { inject } from "@ember/controller"; import Controller, { inject } from "@ember/controller";
import Controller from "@ember/controller";
import CanCheckEmails from "discourse/mixins/can-check-emails"; import CanCheckEmails from "discourse/mixins/can-check-emails";
import User from "discourse/models/user"; import User from "discourse/models/user";
import optionalService from "discourse/lib/optional-service"; import optionalService from "discourse/lib/optional-service";

View File

@ -1,6 +1,5 @@
import { h } from "virtual-dom"; import { h } from "virtual-dom";
import { relativeAge, longDate } from "discourse/lib/formatter"; import { relativeAge, longDate, number } from "discourse/lib/formatter";
import { number } from "discourse/lib/formatter";
export function dateNode(dt) { export function dateNode(dt) {
if (typeof dt === "string") { if (typeof dt === "string") {

View File

@ -1,5 +1,4 @@
import { isAbsoluteURL } from "discourse-common/lib/get-url"; import getAbsoluteURL, { isAbsoluteURL } from "discourse-common/lib/get-url";
import getAbsoluteURL from "discourse-common/lib/get-url";
export default { export default {
name: "register-service-worker", name: "register-service-worker",

View File

@ -1,9 +1,8 @@
import { later, run } from "@ember/runloop"; import { later, run, throttle, schedule } from "@ember/runloop";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import Composer from "discourse/models/composer"; import Composer from "discourse/models/composer";
import { minimumOffset } from "discourse/lib/offset-calculator"; import { minimumOffset } from "discourse/lib/offset-calculator";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { throttle, schedule } from "@ember/runloop";
import { INPUT_DELAY } from "discourse-common/config/environment"; import { INPUT_DELAY } from "discourse-common/config/environment";
import { import {
nextTopicUrl, nextTopicUrl,

View File

@ -1,8 +1,11 @@
import I18n from "I18n"; import I18n from "I18n";
import loadScript from "discourse/lib/load-script"; import loadScript from "discourse/lib/load-script";
import { escapeExpression } from "discourse/lib/utilities"; import {
escapeExpression,
isAppWebview,
postRNWebviewMessage,
} from "discourse/lib/utilities";
import { renderIcon } from "discourse-common/lib/icon-library"; import { renderIcon } from "discourse-common/lib/icon-library";
import { isAppWebview, postRNWebviewMessage } from "discourse/lib/utilities";
import { spinnerHTML } from "discourse/helpers/loading-spinner"; import { spinnerHTML } from "discourse/helpers/loading-spinner";
import User from "discourse/models/user"; import User from "discourse/models/user";

View File

@ -1,4 +1,4 @@
import { default as getURL, getURLWithCDN } from "discourse-common/lib/get-url"; import getURL, { getURLWithCDN } from "discourse-common/lib/get-url";
import { run } from "@ember/runloop"; import { run } from "@ember/runloop";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { PUBLIC_JS_VERSIONS } from "discourse/lib/public-js-versions"; import { PUBLIC_JS_VERSIONS } from "discourse/lib/public-js-versions";

View File

@ -1,9 +1,7 @@
import deprecated from "discourse-common/lib/deprecated"; import deprecated from "discourse-common/lib/deprecated";
import { iconNode } from "discourse-common/lib/icon-library";
import { addDecorator } from "discourse/widgets/post-cooked"; import { addDecorator } from "discourse/widgets/post-cooked";
import { addPluginOutletDecorator } from "discourse/components/plugin-connector"; import { addPluginOutletDecorator } from "discourse/components/plugin-connector";
import { addTopicTitleDecorator } from "discourse/components/topic-title"; import { addTopicTitleDecorator } from "discourse/components/topic-title";
import ComposerEditor from "discourse/components/composer-editor";
import DiscourseBanner from "discourse/components/discourse-banner"; import DiscourseBanner from "discourse/components/discourse-banner";
import { addButton, removeButton } from "discourse/widgets/post-menu"; import { addButton, removeButton } from "discourse/widgets/post-menu";
import { includeAttributes } from "discourse/lib/transform-post"; import { includeAttributes } from "discourse/lib/transform-post";
@ -16,8 +14,12 @@ import {
reopenWidget, reopenWidget,
decorateWidget, decorateWidget,
changeSetting, changeSetting,
queryRegistry,
} from "discourse/widgets/widget"; } from "discourse/widgets/widget";
import { preventCloak } from "discourse/widgets/post-stream"; import {
preventCloak,
addPostTransformCallback,
} from "discourse/widgets/post-stream";
import { h } from "virtual-dom"; import { h } from "virtual-dom";
import { addPopupMenuOptionsCallback } from "discourse/controllers/composer"; import { addPopupMenuOptionsCallback } from "discourse/controllers/composer";
import { extraConnectorClass } from "discourse/lib/plugin-connectors"; import { extraConnectorClass } from "discourse/lib/plugin-connectors";
@ -27,7 +29,6 @@ import { addDiscoveryQueryParam } from "discourse/controllers/discovery-sortable
import { addTagsHtmlCallback } from "discourse/lib/render-tags"; import { addTagsHtmlCallback } from "discourse/lib/render-tags";
import { addUserMenuGlyph } from "discourse/widgets/user-menu"; import { addUserMenuGlyph } from "discourse/widgets/user-menu";
import { addPostClassesCallback } from "discourse/widgets/post"; import { addPostClassesCallback } from "discourse/widgets/post";
import { addPostTransformCallback } from "discourse/widgets/post-stream";
import { import {
attachAdditionalPanel, attachAdditionalPanel,
addToHeaderIcons, addToHeaderIcons,
@ -35,8 +36,8 @@ import {
import { import {
registerIconRenderer, registerIconRenderer,
replaceIcon, replaceIcon,
iconNode,
} from "discourse-common/lib/icon-library"; } from "discourse-common/lib/icon-library";
import { replaceCategoryLinkRenderer } from "discourse/helpers/category-link";
import { replaceTagRenderer } from "discourse/lib/render-tag"; import { replaceTagRenderer } from "discourse/lib/render-tag";
import { addNavItem } from "discourse/models/nav-item"; import { addNavItem } from "discourse/models/nav-item";
import { replaceFormatter } from "discourse/lib/utilities"; import { replaceFormatter } from "discourse/lib/utilities";
@ -47,13 +48,15 @@ import { addUsernameSelectorDecorator } from "discourse/helpers/decorate-usernam
import { disableNameSuppression } from "discourse/widgets/poster-name"; import { disableNameSuppression } from "discourse/widgets/poster-name";
import { registerCustomPostMessageCallback as registerCustomPostMessageCallback1 } from "discourse/controllers/topic"; import { registerCustomPostMessageCallback as registerCustomPostMessageCallback1 } from "discourse/controllers/topic";
import Sharing from "discourse/lib/sharing"; import Sharing from "discourse/lib/sharing";
import { import ComposerEditor, {
addComposerUploadHandler, addComposerUploadHandler,
addComposerUploadMarkdownResolver, addComposerUploadMarkdownResolver,
} from "discourse/components/composer-editor"; } from "discourse/components/composer-editor";
import { addCategorySortCriteria } from "discourse/components/edit-category-settings"; import { addCategorySortCriteria } from "discourse/components/edit-category-settings";
import { addExtraIconRenderer } from "discourse/helpers/category-link"; import {
import { queryRegistry } from "discourse/widgets/widget"; addExtraIconRenderer,
replaceCategoryLinkRenderer,
} from "discourse/helpers/category-link";
import Composer from "discourse/models/composer"; import Composer from "discourse/models/composer";
import { on } from "@ember/object/evented"; import { on } from "@ember/object/evented";
import { addQuickAccessProfileItem } from "discourse/widgets/quick-access-profile"; import { addQuickAccessProfileItem } from "discourse/widgets/quick-access-profile";

View File

@ -5,7 +5,7 @@ import offsetCalculator from "discourse/lib/offset-calculator";
import LockOn from "discourse/lib/lock-on"; import LockOn from "discourse/lib/lock-on";
import { defaultHomepage } from "discourse/lib/utilities"; import { defaultHomepage } from "discourse/lib/utilities";
import User from "discourse/models/user"; import User from "discourse/models/user";
import { default as getURL, withoutPrefix } from "discourse-common/lib/get-url"; import getURL, { withoutPrefix } from "discourse-common/lib/get-url";
import Session from "discourse/models/session"; import Session from "discourse/models/session";
import { setOwner } from "@ember/application"; import { setOwner } from "@ember/application";

View File

@ -2,7 +2,7 @@ import I18n from "I18n";
import { escape } from "pretty-text/sanitizer"; import { escape } from "pretty-text/sanitizer";
import toMarkdown from "discourse/lib/to-markdown"; import toMarkdown from "discourse/lib/to-markdown";
import Handlebars from "handlebars"; import Handlebars from "handlebars";
import { default as getURL, getURLWithCDN } from "discourse-common/lib/get-url"; import getURL, { getURLWithCDN } from "discourse-common/lib/get-url";
import { helperContext } from "discourse-common/lib/helpers"; import { helperContext } from "discourse-common/lib/helpers";
import { deepMerge } from "discourse-common/lib/object"; import { deepMerge } from "discourse-common/lib/object";

View File

@ -1,9 +1,8 @@
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse-common/lib/get-url";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { on } from "discourse-common/utils/decorators";
import { get } from "@ember/object"; import { get } from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import { on } from "discourse-common/utils/decorators";
import PermissionType from "discourse/models/permission-type"; import PermissionType from "discourse/models/permission-type";
import { NotificationLevels } from "discourse/lib/notification-levels"; import { NotificationLevels } from "discourse/lib/notification-levels";
import Site from "discourse/models/site"; import Site from "discourse/models/site";

View File

@ -1,7 +1,6 @@
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed, { on } from "discourse-common/utils/decorators";
import { or, equal, and } from "@ember/object/computed"; import { or, equal, and } from "@ember/object/computed";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import { on } from "discourse-common/utils/decorators";
import UserActionGroup from "discourse/models/user-action-group"; import UserActionGroup from "discourse/models/user-action-group";
import { postUrl } from "discourse/lib/utilities"; import { postUrl } from "discourse/lib/utilities";
import { userPath } from "discourse/lib/url"; import { userPath } from "discourse/lib/url";

View File

@ -1,5 +1,4 @@
import { getURLWithCDN } from "discourse-common/lib/get-url"; import getURL, { getURLWithCDN } from "discourse-common/lib/get-url";
import getURL from "discourse-common/lib/get-url";
import I18n from "I18n"; import I18n from "I18n";
import { A } from "@ember/array"; import { A } from "@ember/array";
import { isEmpty } from "@ember/utils"; import { isEmpty } from "@ember/utils";
@ -22,14 +21,13 @@ import UserDraftsStream from "discourse/models/user-drafts-stream";
import Group from "discourse/models/group"; import Group from "discourse/models/group";
import { emojiUnescape } from "discourse/lib/text"; import { emojiUnescape } from "discourse/lib/text";
import PreloadStore from "discourse/lib/preload-store"; import PreloadStore from "discourse/lib/preload-store";
import { defaultHomepage } from "discourse/lib/utilities"; import { defaultHomepage, escapeExpression } from "discourse/lib/utilities";
import { userPath } from "discourse/lib/url"; import { userPath } from "discourse/lib/url";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import deprecated from "discourse-common/lib/deprecated"; import deprecated from "discourse-common/lib/deprecated";
import Site from "discourse/models/site"; import Site from "discourse/models/site";
import { NotificationLevels } from "discourse/lib/notification-levels"; import { NotificationLevels } from "discourse/lib/notification-levels";
import { escapeExpression } from "discourse/lib/utilities";
import { getOwner } from "discourse-common/lib/get-owner"; import { getOwner } from "discourse-common/lib/get-owner";
import cookie, { removeCookie } from "discourse/lib/cookie"; import cookie, { removeCookie } from "discourse/lib/cookie";

View File

@ -6,11 +6,10 @@ import DiscourseURL from "discourse/lib/url";
import { ID_CONSTRAINT } from "discourse/models/topic"; import { ID_CONSTRAINT } from "discourse/models/topic";
import { setTopicId } from "discourse/lib/topic-list-tracker"; import { setTopicId } from "discourse/lib/topic-list-tracker";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
import showModal from "discourse/lib/show-modal";
const SCROLL_DELAY = 500; const SCROLL_DELAY = 500;
import showModal from "discourse/lib/show-modal";
const TopicRoute = DiscourseRoute.extend({ const TopicRoute = DiscourseRoute.extend({
screenTrack: service(), screenTrack: service(),

View File

@ -1,5 +1,4 @@
import Service from "@ember/service"; import Service, { inject as service } from "@ember/service";
import { inject as service } from "@ember/service";
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse-common/lib/get-url";
import updateTabCount from "discourse/lib/update-tab-count"; import updateTabCount from "discourse/lib/update-tab-count";

View File

@ -3,7 +3,6 @@ import { isEmpty } from "@ember/utils";
import { wantsNewWindow } from "discourse/lib/intercept-click"; import { wantsNewWindow } from "discourse/lib/intercept-click";
import RawHtml from "discourse/widgets/raw-html"; import RawHtml from "discourse/widgets/raw-html";
import { createWidget } from "discourse/widgets/widget"; import { createWidget } from "discourse/widgets/widget";
import DiscourseURL from "discourse/lib/url";
import { h } from "virtual-dom"; import { h } from "virtual-dom";
import { emojiUnescape } from "discourse/lib/text"; import { emojiUnescape } from "discourse/lib/text";
import { import {
@ -11,10 +10,9 @@ import {
escapeExpression, escapeExpression,
formatUsername, formatUsername,
} from "discourse/lib/utilities"; } from "discourse/lib/utilities";
import { setTransientHeader } from "discourse/lib/ajax"; import DiscourseURL, { userPath } from "discourse/lib/url";
import { userPath } from "discourse/lib/url";
import { iconNode } from "discourse-common/lib/icon-library"; import { iconNode } from "discourse-common/lib/icon-library";
import { ajax } from "discourse/lib/ajax"; import { ajax, setTransientHeader } from "discourse/lib/ajax";
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse-common/lib/get-url";
export const DefaultNotificationItem = createWidget( export const DefaultNotificationItem = createWidget(

View File

@ -3,9 +3,8 @@ import I18n from "I18n";
import { later } from "@ember/runloop"; import { later } from "@ember/runloop";
import { createWidget, applyDecorators } from "discourse/widgets/widget"; import { createWidget, applyDecorators } from "discourse/widgets/widget";
import { h } from "virtual-dom"; import { h } from "virtual-dom";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL, { userPath } from "discourse/lib/url";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { userPath } from "discourse/lib/url";
import { wantsNewWindow } from "discourse/lib/intercept-click"; import { wantsNewWindow } from "discourse/lib/intercept-click";
import { NotificationLevels } from "discourse/lib/notification-levels"; import { NotificationLevels } from "discourse/lib/notification-levels";

View File

@ -4,10 +4,7 @@ import { ajax } from "discourse/lib/ajax";
import { isValidLink } from "discourse/lib/click-track"; import { isValidLink } from "discourse/lib/click-track";
import { number } from "discourse/lib/formatter"; import { number } from "discourse/lib/formatter";
import highlightSearch from "discourse/lib/highlight-search"; import highlightSearch from "discourse/lib/highlight-search";
import { import highlightHTML, { unhighlightHTML } from "discourse/lib/highlight-html";
default as highlightHTML,
unhighlightHTML,
} from "discourse/lib/highlight-html";
import { spinnerHTML } from "discourse/helpers/loading-spinner"; import { spinnerHTML } from "discourse/helpers/loading-spinner";
let _beforeAdoptDecorators = []; let _beforeAdoptDecorators = [];

View File

@ -1,4 +1,4 @@
import { default as getURL, getURLWithCDN } from "discourse-common/lib/get-url"; import getURL, { getURLWithCDN } from "discourse-common/lib/get-url";
import I18n from "I18n"; import I18n from "I18n";
import PostCooked from "discourse/widgets/post-cooked"; import PostCooked from "discourse/widgets/post-cooked";
import DecoratorHelper from "discourse/widgets/decorator-helper"; import DecoratorHelper from "discourse/widgets/decorator-helper";

View File

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

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { visit, click, fillIn, currentRouteName } from "@ember/test-helpers"; import { visit, click, fillIn, currentRouteName } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
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", function () { acceptance("Account Created", function () {

View File

@ -1,7 +1,6 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { fillIn, click, visit } from "@ember/test-helpers"; import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
const EMAIL = ` const EMAIL = `
From: "somebody" <somebody@example.com> From: "somebody" <somebody@example.com>

View File

@ -1,7 +1,6 @@
import { exists } from "discourse/tests/helpers/qunit-helpers"; import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Log Term", function (needs) { acceptance("Admin - Search Log Term", function (needs) {
needs.user(); needs.user();

View File

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

View File

@ -1,5 +1,3 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { exists } from "discourse/tests/helpers/qunit-helpers";
import { import {
fillIn, fillIn,
click, click,
@ -8,7 +6,12 @@ import {
currentURL, currentURL,
} from "@ember/test-helpers"; } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers"; import {
acceptance,
count,
queryAll,
exists,
} from "discourse/tests/helpers/qunit-helpers";
import siteSettingFixture from "discourse/tests/fixtures/site-settings"; import siteSettingFixture from "discourse/tests/fixtures/site-settings";
acceptance("Admin - Site Settings", function (needs) { acceptance("Admin - Site Settings", function (needs) {

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { fillIn, click, visit, currentURL } from "@ember/test-helpers"; import { fillIn, click, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Site Texts", function (needs) { acceptance("Admin - Site Texts", function (needs) {
needs.user(); needs.user();

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { visit, click, fillIn } from "@ember/test-helpers"; import { visit, click, fillIn } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Suspend User", function (needs) { acceptance("Admin - Suspend User", function (needs) {
needs.user(); needs.user();

View File

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

View File

@ -1,8 +1,7 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
function assertNoSecondary(assert) { function assertNoSecondary(assert) {
assert.equal( assert.equal(

View File

@ -1,8 +1,7 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - User Index", function (needs) { acceptance("Admin - User Index", function (needs) {
needs.user(); needs.user();

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Users List", function (needs) { acceptance("Admin - Users List", function (needs) {
needs.user(); needs.user();

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { fillIn, click, visit } from "@ember/test-helpers"; import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Watched Words", function (needs) { acceptance("Admin - Watched Words", function (needs) {
needs.user(); needs.user();

View File

@ -1,7 +1,6 @@
import { exists } from "discourse/tests/helpers/qunit-helpers"; import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit, currentRouteName } from "@ember/test-helpers"; import { visit, currentRouteName } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Auth Complete", function (needs) { acceptance("Auth Complete", function (needs) {
needs.hooks.beforeEach(() => { needs.hooks.beforeEach(() => {

View File

@ -1,8 +1,7 @@
import { exists } from "discourse/tests/helpers/qunit-helpers"; import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Badges", function (needs) { acceptance("Badges", function (needs) {
needs.user(); needs.user();

View File

@ -1,5 +1,3 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { exists } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
@ -7,6 +5,8 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import { import {
acceptance, acceptance,
loggedInUser, loggedInUser,
queryAll,
exists,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
async function openBookmarkModal() { async function openBookmarkModal() {

View File

@ -1,7 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
queryAll,
acceptance,
visible,
} from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
acceptance("Category Banners", function (needs) { acceptance("Category Banners", function (needs) {

View File

@ -1,8 +1,7 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import I18n from "I18n"; import I18n from "I18n";
acceptance("Category Edit - security", function (needs) { acceptance("Category Edit - security", function (needs) {

View File

@ -1,10 +1,13 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
queryAll,
acceptance,
visible,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers"; import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import sinon from "sinon"; import sinon from "sinon";
import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers";
acceptance("Category Edit", function (needs) { acceptance("Category Edit", function (needs) {
needs.user(); needs.user();

View File

@ -1,7 +1,6 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { fillIn, click, visit } from "@ember/test-helpers"; import { fillIn, click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import I18n from "I18n"; import I18n from "I18n";
import DiscourseURL from "discourse/lib/url"; import DiscourseURL from "discourse/lib/url";
import sinon from "sinon"; import sinon from "sinon";

View File

@ -1,7 +1,6 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, visit, currentURL } from "@ember/test-helpers"; import { click, visit, currentURL } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Click Track", function (needs) { acceptance("Click Track", function (needs) {
let tracked = false; let tracked = false;

View File

@ -1,5 +1,3 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { exists } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
@ -7,6 +5,8 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import { import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
queryAll,
exists,
} from "discourse/tests/helpers/qunit-helpers"; } 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";

View File

@ -1,7 +1,6 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
function pretender(server, helper) { function pretender(server, helper) {
server.post("/uploads/lookup-urls", () => { server.post("/uploads/lookup-urls", () => {

View File

@ -1,8 +1,7 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer - Edit conflict", function (needs) { acceptance("Composer - Edit conflict", function (needs) {
needs.user(); needs.user();

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers"; import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer - Hyperlink", function (needs) { acceptance("Composer - Hyperlink", function (needs) {
needs.user(); needs.user();

View File

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

View File

@ -1,5 +1,3 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { exists } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit, currentURL } from "@ember/test-helpers"; import { click, fillIn, visit, currentURL } from "@ember/test-helpers";
import { skip, test } from "qunit"; import { skip, test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
@ -9,6 +7,8 @@ import {
acceptance, acceptance,
invisible, invisible,
visible, visible,
queryAll,
exists,
} from "discourse/tests/helpers/qunit-helpers"; } 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";

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer topic featured links", function (needs) { acceptance("Composer topic featured links", function (needs) {
needs.user(); needs.user();

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
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,7 +1,6 @@
import { exists } from "discourse/tests/helpers/qunit-helpers"; import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Create Account - external auth", function (needs) { acceptance("Create Account - external auth", function (needs) {
needs.hooks.beforeEach(() => { needs.hooks.beforeEach(() => {

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Create Account - User Fields", function (needs) { acceptance("Create Account - User Fields", function (needs) {
needs.site({ needs.site({

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { 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,7 +1,6 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import Ember from "ember"; import Ember from "ember";
import hbs from "htmlbars-inline-precompile"; import hbs from "htmlbars-inline-precompile";

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Dashboard", function (needs) { acceptance("Dashboard", function (needs) {
needs.user(); needs.user();

View File

@ -1,9 +1,9 @@
import { exists } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
exists,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
acceptance("Email Disabled Banner", function (needs) { acceptance("Email Disabled Banner", function (needs) {

View File

@ -1,8 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("EmojiPicker", function (needs) { acceptance("EmojiPicker", function (needs) {
needs.user(); needs.user();

View File

@ -1,8 +1,7 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Emoji", function (needs) { acceptance("Emoji", function (needs) {
needs.user(); needs.user();

View File

@ -1,7 +1,6 @@
import { exists } from "discourse/tests/helpers/qunit-helpers"; import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
acceptance("Encoded Sub Category Discovery", function (needs) { acceptance("Encoded Sub Category Discovery", function (needs) {

View File

@ -1,9 +1,9 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
queryAll,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
acceptance("Enforce Second Factor", function (needs) { acceptance("Enforce Second Factor", function (needs) {

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import selectKit from "discourse/tests/helpers/select-kit-helper"; import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import userFixtures from "discourse/tests/fixtures/user-fixtures"; import userFixtures from "discourse/tests/fixtures/user-fixtures";
async function openFlagModal() { async function openFlagModal() {

View File

@ -1,9 +1,11 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import {
import { exists } from "discourse/tests/helpers/qunit-helpers"; queryAll,
exists,
acceptance,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
let userFound = false; let userFound = false;

View File

@ -1,4 +1,3 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { click, visit } from "@ember/test-helpers"; import { click, visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import I18n from "I18n"; import I18n from "I18n";
@ -6,6 +5,7 @@ import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
count, count,
queryAll,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
acceptance("Group Members - Anonymous", function () { acceptance("Group Members - Anonymous", function () {

View File

@ -1,10 +1,10 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
count, count,
queryAll,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Category Notification Defaults", function () { acceptance("Managing Group Category Notification Defaults", function () {

View File

@ -1,9 +1,9 @@
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
import { visit } from "@ember/test-helpers"; import { visit } from "@ember/test-helpers";
import { test } from "qunit"; import { test } from "qunit";
import { import {
acceptance, acceptance,
updateCurrentUser, updateCurrentUser,
queryAll,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Interaction Settings", function (needs) { acceptance("Managing Group Interaction Settings", function (needs) {

View File

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

View File

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

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