From 1c2358ba162eb9f9ba9095c9afe30cf51dd85e04 Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Fri, 27 Nov 2020 11:30:16 -0300 Subject: [PATCH] DEV: Tidy up imports. (#11364) Only allow one import definition per file and add a new eslint rule to enforce it. --- .eslintrc | 3 ++- .../addon/components/admin-user-field-item.js | 3 +-- .../admin/addon/components/embeddable-host.js | 6 ++++-- .../addon/components/penalty-post-action.js | 5 +++-- .../components/screened-ip-address-form.js | 6 ++---- .../admin/addon/components/value-list.js | 3 +-- .../admin-customize-email-templates-edit.js | 3 +-- .../controllers/admin-dashboard-general.js | 3 +-- .../addon/controllers/admin-user-index.js | 3 +-- .../javascripts/admin/addon/models/report.js | 2 +- .../addon/utils/decorators.js | 3 +-- .../discourse/app/adapters/post.js | 3 +-- .../components/bookmark-actions-dropdown.js | 3 +-- .../discourse/app/components/choose-topic.js | 3 +-- .../app/components/create-topics-notice.js | 3 +-- .../discourse/app/components/d-editor.js | 3 +-- .../app/components/edit-category-security.js | 1 - .../discourse/app/components/emoji-picker.js | 9 +++------ .../app/components/group-flair-inputs.js | 6 ++++-- .../app/components/search-text-field.js | 3 +-- .../app/components/topic-list-item.js | 1 - .../discourse/app/controllers/bookmark.js | 6 ++---- .../discourse/app/controllers/change-owner.js | 3 +-- .../app/controllers/change-timestamp.js | 3 +-- .../discourse/app/controllers/composer.js | 6 ++---- .../app/controllers/discovery-sortable.js | 3 +-- .../app/controllers/feature-topic.js | 3 +-- .../discourse/app/controllers/grant-badge.js | 3 +-- .../discourse/app/controllers/history.js | 6 ++++-- .../app/controllers/move-to-topic.js | 3 +-- .../app/controllers/password-reset.js | 3 +-- .../app/controllers/preferences/interface.js | 5 ++--- .../app/controllers/preferences/username.js | 3 +-- .../discourse/app/controllers/topic.js | 3 +-- .../controllers/user-activity-bookmarks.js | 3 +-- .../discourse/app/controllers/user-summary.js | 3 +-- .../discourse/app/controllers/user.js | 3 +-- .../javascripts/discourse/app/helpers/node.js | 3 +-- .../initializers/register-service-worker.js | 3 +-- .../discourse/app/lib/keyboard-shortcuts.js | 3 +-- .../javascripts/discourse/app/lib/lightbox.js | 7 +++++-- .../discourse/app/lib/load-script.js | 2 +- .../discourse/app/lib/plugin-api.js | 19 +++++++++++-------- .../javascripts/discourse/app/lib/url.js | 2 +- .../discourse/app/lib/utilities.js | 2 +- .../discourse/app/models/category.js | 3 +-- .../discourse/app/models/user-action.js | 3 +-- .../javascripts/discourse/app/models/user.js | 6 ++---- .../javascripts/discourse/app/routes/topic.js | 3 +-- .../discourse/app/services/document-title.js | 3 +-- .../app/widgets/default-notification-item.js | 6 ++---- .../discourse/app/widgets/hamburger-menu.js | 3 +-- .../discourse/app/widgets/post-cooked.js | 5 +---- .../javascripts/discourse/app/widgets/post.js | 2 +- .../discourse/tests/acceptance/about-test.js | 3 +-- .../tests/acceptance/account-created-test.js | 8 +++++--- .../tests/acceptance/admin-emails-test.js | 3 +-- .../acceptance/admin-search-log-term-test.js | 3 +-- .../acceptance/admin-search-logs-test.js | 3 +-- .../acceptance/admin-site-settings-test.js | 9 ++++++--- .../tests/acceptance/admin-site-text-test.js | 8 +++++--- .../acceptance/admin-suspend-user-test.js | 8 +++++--- .../acceptance/admin-user-badges-test.js | 3 +-- .../acceptance/admin-user-emails-test.js | 3 +-- .../tests/acceptance/admin-user-index-test.js | 3 +-- .../tests/acceptance/admin-users-list-test.js | 8 +++++--- .../acceptance/admin-watched-words-test.js | 8 +++++--- .../tests/acceptance/auth-complete-test.js | 3 +-- .../discourse/tests/acceptance/badges-test.js | 3 +-- .../tests/acceptance/bookmarks-test.js | 4 ++-- .../tests/acceptance/category-banner-test.js | 7 +++++-- .../acceptance/category-edit-security-test.js | 3 +-- .../tests/acceptance/category-edit-test.js | 7 +++++-- .../tests/acceptance/category-new-test.js | 3 +-- .../tests/acceptance/click-track-test.js | 3 +-- .../tests/acceptance/composer-actions-test.js | 4 ++-- .../acceptance/composer-attachment-test.js | 3 +-- .../acceptance/composer-edit-conflict-test.js | 3 +-- .../acceptance/composer-hyperlink-test.js | 8 +++++--- .../tests/acceptance/composer-onebox-test.js | 3 +-- .../tests/acceptance/composer-test.js | 4 ++-- .../acceptance/composer-topic-links-test.js | 8 +++++--- .../acceptance/composer-uncategorized-test.js | 8 +++++--- .../create-account-external-test.js | 3 +-- .../create-account-user-fields-test.js | 8 +++++--- .../tests/acceptance/custom-html-set-test.js | 8 +++++--- .../acceptance/custom-html-template-test.js | 3 +-- .../tests/acceptance/dashboard-test.js | 8 +++++--- .../tests/acceptance/email-notice-test.js | 2 +- .../tests/acceptance/emoji-picker-test.js | 8 +++++--- .../discourse/tests/acceptance/emoji-test.js | 3 +-- .../tests/acceptance/encoded-category-test.js | 3 +-- .../acceptance/enforce-second-factor-test.js | 2 +- .../tests/acceptance/flag-post-test.js | 8 +++++--- .../tests/acceptance/forgot-password-test.js | 8 +++++--- .../tests/acceptance/group-index-test.js | 2 +- .../group-manage-categories-test.js | 2 +- .../group-manage-interaction-test.js | 2 +- .../acceptance/group-manage-logs-test.js | 3 +-- .../group-manage-membership-test.js | 2 +- .../acceptance/group-manage-profile-test.js | 2 +- .../acceptance/group-manage-tags-test.js | 2 +- .../tests/acceptance/group-requests-test.js | 3 +-- .../discourse/tests/acceptance/group-test.js | 7 +++++-- .../tests/acceptance/groups-index-test.js | 4 ++-- .../tests/acceptance/groups-new-test.js | 3 +-- .../tests/acceptance/hamburger-menu-test.js | 2 +- .../tests/acceptance/hashtags-test.js | 3 +-- .../tests/acceptance/invite-accept-test.js | 8 +++++--- .../invite-show-user-fields-test.js | 3 +-- .../tests/acceptance/jump-to-test.js | 3 +-- .../tests/acceptance/login-required-test.js | 7 +++++-- ...email-and-hide-email-address-taken-test.js | 3 +-- ...in-with-email-and-no-social-logins-test.js | 8 +++++--- .../login-with-email-disabled-test.js | 3 +-- .../tests/acceptance/login-with-email-test.js | 8 +++++--- .../tests/acceptance/mobile-discovery-test.js | 3 +-- .../tests/acceptance/mobile-sign-in-test.js | 3 +-- .../tests/acceptance/mobile-users-test.js | 3 +-- .../discourse/tests/acceptance/modal-test.js | 2 +- .../tests/acceptance/new-message-test.js | 8 +++++--- .../tests/acceptance/new-topic-test.js | 8 +++++--- .../acceptance/notifications-filter-test.js | 3 +-- .../tests/acceptance/page-publishing-test.js | 3 +-- .../tests/acceptance/password-reset-test.js | 8 +++++--- .../tests/acceptance/personal-message-test.js | 8 +++++--- .../plugin-outlet-connector-class-test.js | 3 +-- .../plugin-outlet-decorator-test.js | 8 +++++--- .../plugin-outlet-multi-template-test.js | 3 +-- .../plugin-outlet-single-template-test.js | 3 +-- .../tests/acceptance/post-admin-menu-test.js | 3 +-- .../tests/acceptance/preferences-test.js | 4 ++-- .../acceptance/raw-plugin-outlet-test.js | 3 +-- .../tests/acceptance/reports-test.js | 3 +-- .../discourse/tests/acceptance/review-test.js | 3 +-- .../tests/acceptance/search-full-test.js | 4 ++-- .../tests/acceptance/search-mobile-test.js | 8 +++++--- .../discourse/tests/acceptance/search-test.js | 8 +++++--- .../share-and-invite-desktop-test.js | 8 +++++--- .../share-and-invite-mobile-test.js | 8 +++++--- .../tests/acceptance/shared-drafts-test.js | 3 +-- .../tests/acceptance/sign-in-test.js | 8 +++++--- .../tests/acceptance/tag-groups-test.js | 3 +-- .../acceptance/tags-intersection-test.js | 3 +-- .../discourse/tests/acceptance/tags-test.js | 4 ++-- .../tests/acceptance/topic-admin-menu-test.js | 6 +++--- .../tests/acceptance/topic-anonymous-test.js | 8 +++++--- .../tests/acceptance/topic-discovery-test.js | 8 +++++--- .../tests/acceptance/topic-edit-timer-test.js | 9 ++++----- .../tests/acceptance/topic-move-posts-test.js | 3 +-- .../acceptance/topic-quote-button-test.js | 8 +++++--- .../discourse/tests/acceptance/topic-test.js | 9 ++++++--- .../tests/acceptance/unknown-test.js | 3 +-- .../tests/acceptance/user-bookmarks-test.js | 8 +++++--- .../tests/acceptance/user-card-test.js | 6 ++---- .../acceptance/user-drafts-stream-test.js | 10 ++++++---- .../user-preferences-interface-test.js | 11 ++++++----- .../discourse/tests/acceptance/user-test.js | 3 +-- .../discourse/tests/acceptance/users-test.js | 3 +-- .../discourse/tests/helpers/qunit-helpers.js | 6 ++---- .../tests/helpers/select-kit-helper.js | 3 +-- .../tests/unit/controllers/bookmark-test.js | 8 +++++--- .../tests/unit/lib/click-track-test.js | 3 +-- .../discourse/tests/unit/lib/get-url-test.js | 3 +-- .../tests/unit/lib/load-script-test.js | 3 +-- .../tests/unit/lib/pretty-text-test.js | 4 +--- .../unit/services/document-title-test.js | 6 ++++-- .../pretty-text/addon/white-lister.js | 5 +++-- .../select-kit/addon/components/select-kit.js | 3 +-- .../addon/components/user-chooser.js | 3 +-- .../wizard/components/theme-preview.js | 3 +-- .../acceptance/poll-breakdown-test.js.es6 | 3 +-- .../poll-builder-disabled-test.js.es6 | 2 +- .../poll-builder-enabled-test.js.es6 | 4 ++-- .../acceptance/poll-pie-chart-test.js.es6 | 3 +-- .../acceptance/poll-quote-test.js.es6 | 3 +-- .../polls-bar-chart-test-desktop.js.es6 | 3 +-- .../polls-bar-chart-test-mobile.js.es6 | 3 +-- 178 files changed, 394 insertions(+), 408 deletions(-) diff --git a/.eslintrc b/.eslintrc index c46300ce646..58952b4eb3c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,8 @@ { "extends": "eslint-config-discourse", "rules": { - "discourse-ember/global-ember": 2 + "discourse-ember/global-ember": 2, + "no-duplicate-imports": 2 }, "globals": { "moduleFor": "off", diff --git a/app/assets/javascripts/admin/addon/components/admin-user-field-item.js b/app/assets/javascripts/admin/addon/components/admin-user-field-item.js index 999a07db583..17634d5c49c 100644 --- a/app/assets/javascripts/admin/addon/components/admin-user-field-item.js +++ b/app/assets/javascripts/admin/addon/components/admin-user-field-item.js @@ -6,8 +6,7 @@ import Component from "@ember/component"; import UserField from "admin/models/user-field"; import { bufferedProperty } from "discourse/mixins/buffered-content"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { propertyEqual } from "discourse/lib/computed"; -import { i18n } from "discourse/lib/computed"; +import { propertyEqual, i18n } from "discourse/lib/computed"; import discourseComputed, { observes, on, diff --git a/app/assets/javascripts/admin/addon/components/embeddable-host.js b/app/assets/javascripts/admin/addon/components/embeddable-host.js index 3ca70289420..9846c9fc7b8 100644 --- a/app/assets/javascripts/admin/addon/components/embeddable-host.js +++ b/app/assets/javascripts/admin/addon/components/embeddable-host.js @@ -1,11 +1,13 @@ 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 { or } from "@ember/object/computed"; import { schedule } from "@ember/runloop"; import Component from "@ember/component"; import { bufferedProperty } from "discourse/mixins/buffered-content"; -import { on, observes } from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import Category from "discourse/models/category"; import bootbox from "bootbox"; diff --git a/app/assets/javascripts/admin/addon/components/penalty-post-action.js b/app/assets/javascripts/admin/addon/components/penalty-post-action.js index 2b34703fb0c..4a46bbbea7e 100644 --- a/app/assets/javascripts/admin/addon/components/penalty-post-action.js +++ b/app/assets/javascripts/admin/addon/components/penalty-post-action.js @@ -1,8 +1,9 @@ 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 Component from "@ember/component"; -import { afterRender } from "discourse-common/utils/decorators"; const ACTIONS = ["delete", "delete_replies", "edit", "none"]; diff --git a/app/assets/javascripts/admin/addon/components/screened-ip-address-form.js b/app/assets/javascripts/admin/addon/components/screened-ip-address-form.js index 86bcc962af4..e738c81b852 100644 --- a/app/assets/javascripts/admin/addon/components/screened-ip-address-form.js +++ b/app/assets/javascripts/admin/addon/components/screened-ip-address-form.js @@ -1,8 +1,9 @@ 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 Component from "@ember/component"; 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. @@ -15,9 +16,6 @@ import bootbox from "bootbox"; as an argument. **/ -import ScreenedIpAddress from "admin/models/screened-ip-address"; -import { on } from "discourse-common/utils/decorators"; - export default Component.extend({ classNames: ["screened-ip-address-form"], formSubmitted: false, diff --git a/app/assets/javascripts/admin/addon/components/value-list.js b/app/assets/javascripts/admin/addon/components/value-list.js index bfba8f7dd19..9951eee3f4b 100644 --- a/app/assets/javascripts/admin/addon/components/value-list.js +++ b/app/assets/javascripts/admin/addon/components/value-list.js @@ -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 { empty, reads } from "@ember/object/computed"; import Component from "@ember/component"; -import { on } from "discourse-common/utils/decorators"; export default Component.extend({ classNameBindings: [":value-list"], diff --git a/app/assets/javascripts/admin/addon/controllers/admin-customize-email-templates-edit.js b/app/assets/javascripts/admin/addon/controllers/admin-customize-email-templates-edit.js index 85fc98a449f..f5f7a563efa 100644 --- a/app/assets/javascripts/admin/addon/controllers/admin-customize-email-templates-edit.js +++ b/app/assets/javascripts/admin/addon/controllers/admin-customize-email-templates-edit.js @@ -1,10 +1,9 @@ import I18n from "I18n"; 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 { bufferedProperty } from "discourse/mixins/buffered-content"; import { action } from "@ember/object"; -import { inject as controller } from "@ember/controller"; import bootbox from "bootbox"; export default Controller.extend(bufferedProperty("emailTemplate"), { diff --git a/app/assets/javascripts/admin/addon/controllers/admin-dashboard-general.js b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-general.js index 0384e06a0ab..fe97fb08555 100644 --- a/app/assets/javascripts/admin/addon/controllers/admin-dashboard-general.js +++ b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-general.js @@ -1,8 +1,7 @@ import I18n from "I18n"; import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse-common/lib/helpers"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import { setting } from "discourse/lib/computed"; import AdminDashboard from "admin/models/admin-dashboard"; import Report from "admin/models/report"; diff --git a/app/assets/javascripts/admin/addon/controllers/admin-user-index.js b/app/assets/javascripts/admin/addon/controllers/admin-user-index.js index 121324711c7..2bed595b3fa 100644 --- a/app/assets/javascripts/admin/addon/controllers/admin-user-index.js +++ b/app/assets/javascripts/admin/addon/controllers/admin-user-index.js @@ -4,11 +4,10 @@ import { inject as service } from "@ember/service"; import Controller from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; 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 { popupAjaxError } from "discourse/lib/ajax-error"; import discourseComputed from "discourse-common/utils/decorators"; -import { fmt } from "discourse/lib/computed"; import { htmlSafe } from "@ember/template"; import showModal from "discourse/lib/show-modal"; import bootbox from "bootbox"; diff --git a/app/assets/javascripts/admin/addon/models/report.js b/app/assets/javascripts/admin/addon/models/report.js index 811370547fc..a7b3d5786d7 100644 --- a/app/assets/javascripts/admin/addon/models/report.js +++ b/app/assets/javascripts/admin/addon/models/report.js @@ -4,13 +4,13 @@ import discourseComputed from "discourse-common/utils/decorators"; import { makeArray } from "discourse-common/lib/helpers"; import { isEmpty } from "@ember/utils"; import EmberObject from "@ember/object"; -import { escapeExpression } from "discourse/lib/utilities"; import { ajax } from "discourse/lib/ajax"; import round from "discourse/lib/round"; import { fillMissingDates, formatUsername, toNumber, + escapeExpression, } from "discourse/lib/utilities"; import { number, durationTiny } from "discourse/lib/formatter"; import { renderAvatar } from "discourse/helpers/user-avatar"; diff --git a/app/assets/javascripts/discourse-common/addon/utils/decorators.js b/app/assets/javascripts/discourse-common/addon/utils/decorators.js index feae9b293f8..98742a87911 100644 --- a/app/assets/javascripts/discourse-common/addon/utils/decorators.js +++ b/app/assets/javascripts/discourse-common/addon/utils/decorators.js @@ -3,8 +3,7 @@ import isDescriptor from "discourse-common/utils/is-descriptor"; import extractValue from "discourse-common/utils/extract-value"; import decoratorAlias from "discourse-common/utils/decorator-alias"; import macroAlias from "discourse-common/utils/macro-alias"; -import { schedule, next } from "@ember/runloop"; -import { bind as emberBind } from "@ember/runloop"; +import { schedule, next, bind as emberBind } from "@ember/runloop"; export default function discourseComputedDecorator(...params) { // determine if user called as @discourseComputed('blah', 'blah') or @discourseComputed diff --git a/app/assets/javascripts/discourse/app/adapters/post.js b/app/assets/javascripts/discourse/app/adapters/post.js index e16266bd92f..4318cc0d076 100644 --- a/app/assets/javascripts/discourse/app/adapters/post.js +++ b/app/assets/javascripts/discourse/app/adapters/post.js @@ -1,6 +1,5 @@ import { ajax } from "discourse/lib/ajax"; -import RestAdapter from "discourse/adapters/rest"; -import { Result } from "discourse/adapters/rest"; +import RestAdapter, { Result } from "discourse/adapters/rest"; import { underscore } from "@ember/string"; export default RestAdapter.extend({ diff --git a/app/assets/javascripts/discourse/app/components/bookmark-actions-dropdown.js b/app/assets/javascripts/discourse/app/components/bookmark-actions-dropdown.js index 4887d1943d9..21fe283f691 100644 --- a/app/assets/javascripts/discourse/app/components/bookmark-actions-dropdown.js +++ b/app/assets/javascripts/discourse/app/components/bookmark-actions-dropdown.js @@ -1,7 +1,6 @@ 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 { action } from "@ember/object"; export default DropdownSelectBoxComponent.extend({ classNames: ["bookmark-actions-dropdown"], diff --git a/app/assets/javascripts/discourse/app/components/choose-topic.js b/app/assets/javascripts/discourse/app/components/choose-topic.js index f9bd7da4960..84070125c28 100644 --- a/app/assets/javascripts/discourse/app/components/choose-topic.js +++ b/app/assets/javascripts/discourse/app/components/choose-topic.js @@ -3,8 +3,7 @@ import { next } from "@ember/runloop"; import Component from "@ember/component"; import discourseDebounce from "discourse/lib/debounce"; import { searchForTerm } from "discourse/lib/search"; -import { observes } from "discourse-common/utils/decorators"; -import discourseComputed from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; export default Component.extend({ loading: null, diff --git a/app/assets/javascripts/discourse/app/components/create-topics-notice.js b/app/assets/javascripts/discourse/app/components/create-topics-notice.js index 06a6671782a..54c1057afbf 100644 --- a/app/assets/javascripts/discourse/app/components/create-topics-notice.js +++ b/app/assets/javascripts/discourse/app/components/create-topics-notice.js @@ -1,8 +1,7 @@ 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 Component from "@ember/component"; -import { observes } from "discourse-common/utils/decorators"; import LivePostCounts from "discourse/models/live-post-counts"; import { htmlSafe } from "@ember/template"; diff --git a/app/assets/javascripts/discourse/app/components/d-editor.js b/app/assets/javascripts/discourse/app/components/d-editor.js index 1d0b8094122..2ac5201c807 100644 --- a/app/assets/javascripts/discourse/app/components/d-editor.js +++ b/app/assets/javascripts/discourse/app/components/d-editor.js @@ -10,7 +10,6 @@ import discourseComputed, { } from "discourse-common/utils/decorators"; import { categoryHashtagTriggerRule } from "discourse/lib/category-hashtags"; 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 { findRawTemplate } from "discourse-common/lib/raw-templates"; 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 { translations } from "pretty-text/emoji/data"; 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 { Promise } from "rsvp"; import { isTesting } from "discourse-common/config/environment"; diff --git a/app/assets/javascripts/discourse/app/components/edit-category-security.js b/app/assets/javascripts/discourse/app/components/edit-category-security.js index cd69ba50434..6f9e9309a32 100644 --- a/app/assets/javascripts/discourse/app/components/edit-category-security.js +++ b/app/assets/javascripts/discourse/app/components/edit-category-security.js @@ -1,7 +1,6 @@ import { buildCategoryPanel } from "discourse/components/edit-category-panel"; import PermissionType from "discourse/models/permission-type"; import discourseComputed from "discourse-common/utils/decorators"; - import { not } from "@ember/object/computed"; export default buildCategoryPanel("security", { diff --git a/app/assets/javascripts/discourse/app/components/emoji-picker.js b/app/assets/javascripts/discourse/app/components/emoji-picker.js index 3bf856aa4a7..b13c18f6a44 100644 --- a/app/assets/javascripts/discourse/app/components/emoji-picker.js +++ b/app/assets/javascripts/discourse/app/components/emoji-picker.js @@ -1,20 +1,17 @@ -import { observes } from "discourse-common/utils/decorators"; -import { bind } from "discourse-common/utils/decorators"; +import { observes, bind } from "discourse-common/utils/decorators"; import { htmlSafe } from "@ember/template"; -import { emojiUnescape } from "discourse/lib/text"; -import { escapeExpression } from "discourse/lib/utilities"; +import { emojiUnescape, emojiUrlFor } from "discourse/lib/text"; import { action, computed } from "@ember/object"; import { inject as service } from "@ember/service"; import { schedule, later } from "@ember/runloop"; import Component from "@ember/component"; -import { emojiUrlFor } from "discourse/lib/text"; import { createPopper } from "@popperjs/core"; import { extendedEmojiList, isSkinTonableEmoji, emojiSearch, } from "pretty-text/emoji"; -import { safariHacksDisabled } from "discourse/lib/utilities"; +import { safariHacksDisabled, escapeExpression } from "discourse/lib/utilities"; function customEmojis() { const list = extendedEmojiList(); diff --git a/app/assets/javascripts/discourse/app/components/group-flair-inputs.js b/app/assets/javascripts/discourse/app/components/group-flair-inputs.js index 1e4c43cd8d1..0c60c695d40 100644 --- a/app/assets/javascripts/discourse/app/components/group-flair-inputs.js +++ b/app/assets/javascripts/discourse/app/components/group-flair-inputs.js @@ -1,9 +1,11 @@ import getURL from "discourse-common/lib/get-url"; 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 Component from "@ember/component"; -import { on, observes } from "discourse-common/utils/decorators"; import { escapeExpression } from "discourse/lib/utilities"; import { convertIconClass } from "discourse-common/lib/icon-library"; import { ajax } from "discourse/lib/ajax"; diff --git a/app/assets/javascripts/discourse/app/components/search-text-field.js b/app/assets/javascripts/discourse/app/components/search-text-field.js index f35293a1431..2c78a6736da 100644 --- a/app/assets/javascripts/discourse/app/components/search-text-field.js +++ b/app/assets/javascripts/discourse/app/components/search-text-field.js @@ -1,6 +1,5 @@ import I18n from "I18n"; -import discourseComputed from "discourse-common/utils/decorators"; -import { on } from "discourse-common/utils/decorators"; +import discourseComputed, { on } from "discourse-common/utils/decorators"; import TextField from "discourse/components/text-field"; import { applySearchAutocomplete } from "discourse/lib/search"; diff --git a/app/assets/javascripts/discourse/app/components/topic-list-item.js b/app/assets/javascripts/discourse/app/components/topic-list-item.js index ad69848a75d..59d433da156 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list-item.js +++ b/app/assets/javascripts/discourse/app/components/topic-list-item.js @@ -7,7 +7,6 @@ import DiscourseURL from "discourse/lib/url"; import { findRawTemplate } from "discourse-common/lib/raw-templates"; import { wantsNewWindow } from "discourse/lib/intercept-click"; import { on } from "@ember/object/evented"; - import { topicTitleDecorators } from "discourse/components/topic-title"; export function showEntrance(e) { diff --git a/app/assets/javascripts/discourse/app/controllers/bookmark.js b/app/assets/javascripts/discourse/app/controllers/bookmark.js index e4c2bb22dba..0eb85d61958 100644 --- a/app/assets/javascripts/discourse/app/controllers/bookmark.js +++ b/app/assets/javascripts/discourse/app/controllers/bookmark.js @@ -1,9 +1,8 @@ import I18n from "I18n"; -import { schedule } from "@ember/runloop"; +import { schedule, next } from "@ember/runloop"; import { and, or } from "@ember/object/computed"; -import { next } from "@ember/runloop"; import { action } from "@ember/object"; -import { isPresent } from "@ember/utils"; +import { isPresent, isEmpty } from "@ember/utils"; import Controller from "@ember/controller"; import { Promise } from "rsvp"; 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 { AUTO_DELETE_PREFERENCES } from "discourse/models/bookmark"; import bootbox from "bootbox"; -import { isEmpty } from "@ember/utils"; // global shortcuts that interfere with these modal shortcuts, they are rebound when the // modal is closed diff --git a/app/assets/javascripts/discourse/app/controllers/change-owner.js b/app/assets/javascripts/discourse/app/controllers/change-owner.js index 3f1339e1d3e..df39e86c950 100644 --- a/app/assets/javascripts/discourse/app/controllers/change-owner.js +++ b/app/assets/javascripts/discourse/app/controllers/change-owner.js @@ -3,8 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators"; import { isEmpty } from "@ember/utils"; import { alias } from "@ember/object/computed"; import { next } from "@ember/runloop"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import DiscourseURL from "discourse/lib/url"; import Topic from "discourse/models/topic"; diff --git a/app/assets/javascripts/discourse/app/controllers/change-timestamp.js b/app/assets/javascripts/discourse/app/controllers/change-timestamp.js index 309555915fe..acc39aef156 100644 --- a/app/assets/javascripts/discourse/app/controllers/change-timestamp.js +++ b/app/assets/javascripts/discourse/app/controllers/change-timestamp.js @@ -2,8 +2,7 @@ import I18n from "I18n"; import discourseComputed from "discourse-common/utils/decorators"; import { isEmpty } from "@ember/utils"; import { next } from "@ember/runloop"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import DiscourseURL from "discourse/lib/url"; import Topic from "discourse/models/topic"; diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js index 77cc51584c6..7feb149ddbd 100644 --- a/app/assets/javascripts/discourse/app/controllers/composer.js +++ b/app/assets/javascripts/discourse/app/controllers/composer.js @@ -4,12 +4,10 @@ import { isEmpty } from "@ember/utils"; import { and, or, alias, reads } from "@ember/object/computed"; import { cancel, debounce, run } from "@ember/runloop"; import { inject as service } from "@ember/service"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import DiscourseURL from "discourse/lib/url"; import { buildQuote } from "discourse/lib/quote"; import Draft from "discourse/models/draft"; -import Composer from "discourse/models/composer"; import discourseComputed, { observes, on, @@ -22,7 +20,7 @@ import { } from "discourse/lib/uploads"; import { emojiUnescape } from "discourse/lib/text"; 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 { isTesting } from "discourse-common/config/environment"; import EmberObject, { computed, action } from "@ember/object"; diff --git a/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js b/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js index 73654634ae7..87e44d6c65f 100644 --- a/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js +++ b/app/assets/javascripts/discourse/app/controllers/discovery-sortable.js @@ -1,5 +1,4 @@ -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; // Just add query params here to have them automatically passed to topic list filters. export const queryParams = { diff --git a/app/assets/javascripts/discourse/app/controllers/feature-topic.js b/app/assets/javascripts/discourse/app/controllers/feature-topic.js index 4b5325e2213..b646cec5004 100644 --- a/app/assets/javascripts/discourse/app/controllers/feature-topic.js +++ b/app/assets/javascripts/discourse/app/controllers/feature-topic.js @@ -1,7 +1,6 @@ import I18n from "I18n"; import discourseComputed from "discourse-common/utils/decorators"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import { ajax } from "discourse/lib/ajax"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { categoryLinkHTML } from "discourse/helpers/category-link"; diff --git a/app/assets/javascripts/discourse/app/controllers/grant-badge.js b/app/assets/javascripts/discourse/app/controllers/grant-badge.js index c95c7aa4494..0375df7c30f 100644 --- a/app/assets/javascripts/discourse/app/controllers/grant-badge.js +++ b/app/assets/javascripts/discourse/app/controllers/grant-badge.js @@ -1,7 +1,6 @@ import I18n from "I18n"; import discourseComputed from "discourse-common/utils/decorators"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import { extractError } from "discourse/lib/ajax-error"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import GrantBadgeController from "discourse/mixins/grant-badge-controller"; diff --git a/app/assets/javascripts/discourse/app/controllers/history.js b/app/assets/javascripts/discourse/app/controllers/history.js index 9c887aefa64..e80e265d3e6 100644 --- a/app/assets/javascripts/discourse/app/controllers/history.js +++ b/app/assets/javascripts/discourse/app/controllers/history.js @@ -1,11 +1,13 @@ 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 Controller from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { categoryBadgeHTML } from "discourse/helpers/category-link"; import { propertyGreaterThan, propertyLessThan } from "discourse/lib/computed"; -import { on, observes } from "discourse-common/utils/decorators"; import { sanitizeAsync } from "discourse/lib/text"; import { iconHTML } from "discourse-common/lib/icon-library"; import Post from "discourse/models/post"; diff --git a/app/assets/javascripts/discourse/app/controllers/move-to-topic.js b/app/assets/javascripts/discourse/app/controllers/move-to-topic.js index f7428988835..1337ecad3d4 100644 --- a/app/assets/javascripts/discourse/app/controllers/move-to-topic.js +++ b/app/assets/javascripts/discourse/app/controllers/move-to-topic.js @@ -2,8 +2,7 @@ import I18n from "I18n"; import { isEmpty } from "@ember/utils"; import { alias, equal } from "@ember/object/computed"; import { next } from "@ember/runloop"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import ModalFunctionality from "discourse/mixins/modal-functionality"; import { movePosts, mergeTopic } from "discourse/models/topic"; import DiscourseURL from "discourse/lib/url"; diff --git a/app/assets/javascripts/discourse/app/controllers/password-reset.js b/app/assets/javascripts/discourse/app/controllers/password-reset.js index 5d3b0b97171..ac6f7a69ec0 100644 --- a/app/assets/javascripts/discourse/app/controllers/password-reset.js +++ b/app/assets/javascripts/discourse/app/controllers/password-reset.js @@ -3,10 +3,9 @@ import I18n from "I18n"; import { alias, or, readOnly } from "@ember/object/computed"; import Controller from "@ember/controller"; 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 PasswordValidation from "discourse/mixins/password-validation"; -import { userPath } from "discourse/lib/url"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; import { getWebauthnCredential } from "discourse/lib/webauthn"; diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js index ba3b14f2cbc..89732723826 100644 --- a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js +++ b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js @@ -1,7 +1,5 @@ import I18n from "I18n"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; -import { setDefaultHomepage } from "discourse/lib/utilities"; +import Controller, { inject } from "@ember/controller"; import discourseComputed from "discourse-common/utils/decorators"; import { listThemes, setLocalTheme } from "discourse/lib/theme-selector"; import { @@ -15,6 +13,7 @@ import { safariHacksDisabled, isiPad, iOSWithVisualViewport, + setDefaultHomepage, } from "discourse/lib/utilities"; import { computed } from "@ember/object"; import { reads } from "@ember/object/computed"; diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/username.js b/app/assets/javascripts/discourse/app/controllers/preferences/username.js index 707b08e745e..819121724a9 100644 --- a/app/assets/javascripts/discourse/app/controllers/preferences/username.js +++ b/app/assets/javascripts/discourse/app/controllers/preferences/username.js @@ -4,8 +4,7 @@ import { empty, or } from "@ember/object/computed"; import Controller from "@ember/controller"; import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { setting, propertyEqual } from "discourse/lib/computed"; -import DiscourseURL from "discourse/lib/url"; -import { userPath } from "discourse/lib/url"; +import DiscourseURL, { userPath } from "discourse/lib/url"; import { popupAjaxError } from "discourse/lib/ajax-error"; import User from "discourse/models/user"; import bootbox from "bootbox"; diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js index e37a98b1838..5c3c16f6df5 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic.js +++ b/app/assets/javascripts/discourse/app/controllers/topic.js @@ -6,7 +6,7 @@ import { next, schedule, later } from "@ember/runloop"; import Controller, { inject as controller } from "@ember/controller"; import { bufferedProperty } from "discourse/mixins/buffered-content"; 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 { buildQuote } from "discourse/lib/quote"; 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 { popupAjaxError } from "discourse/lib/ajax-error"; import { spinnerHTML } from "discourse/helpers/loading-spinner"; -import { userPath } from "discourse/lib/url"; import showModal from "discourse/lib/show-modal"; import TopicTimer from "discourse/models/topic-timer"; import { Promise } from "rsvp"; diff --git a/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js b/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js index f9b333e573e..ab19fc5d570 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js +++ b/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js @@ -1,7 +1,6 @@ import I18n from "I18n"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import { Promise } from "rsvp"; -import { inject } from "@ember/controller"; import { action } from "@ember/object"; import discourseComputed from "discourse-common/utils/decorators"; import Bookmark from "discourse/models/bookmark"; diff --git a/app/assets/javascripts/discourse/app/controllers/user-summary.js b/app/assets/javascripts/discourse/app/controllers/user-summary.js index 53797875cca..5a2863e2bad 100644 --- a/app/assets/javascripts/discourse/app/controllers/user-summary.js +++ b/app/assets/javascripts/discourse/app/controllers/user-summary.js @@ -1,7 +1,6 @@ import discourseComputed from "discourse-common/utils/decorators"; import { alias } from "@ember/object/computed"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import { durationTiny } from "discourse/lib/formatter"; // should be kept in sync with 'UserSummary::MAX_BADGES' diff --git a/app/assets/javascripts/discourse/app/controllers/user.js b/app/assets/javascripts/discourse/app/controllers/user.js index 47c31d75880..0376d6a787b 100644 --- a/app/assets/javascripts/discourse/app/controllers/user.js +++ b/app/assets/javascripts/discourse/app/controllers/user.js @@ -3,8 +3,7 @@ import { isEmpty } from "@ember/utils"; import { alias, or, gt, not, and } from "@ember/object/computed"; import EmberObject, { set, computed } from "@ember/object"; import { inject as service } from "@ember/service"; -import { inject } from "@ember/controller"; -import Controller from "@ember/controller"; +import Controller, { inject } from "@ember/controller"; import CanCheckEmails from "discourse/mixins/can-check-emails"; import User from "discourse/models/user"; import optionalService from "discourse/lib/optional-service"; diff --git a/app/assets/javascripts/discourse/app/helpers/node.js b/app/assets/javascripts/discourse/app/helpers/node.js index a148a1f6e70..79f8f73eaea 100644 --- a/app/assets/javascripts/discourse/app/helpers/node.js +++ b/app/assets/javascripts/discourse/app/helpers/node.js @@ -1,6 +1,5 @@ import { h } from "virtual-dom"; -import { relativeAge, longDate } from "discourse/lib/formatter"; -import { number } from "discourse/lib/formatter"; +import { relativeAge, longDate, number } from "discourse/lib/formatter"; export function dateNode(dt) { if (typeof dt === "string") { diff --git a/app/assets/javascripts/discourse/app/initializers/register-service-worker.js b/app/assets/javascripts/discourse/app/initializers/register-service-worker.js index 01e9a512d11..f1631979a95 100644 --- a/app/assets/javascripts/discourse/app/initializers/register-service-worker.js +++ b/app/assets/javascripts/discourse/app/initializers/register-service-worker.js @@ -1,5 +1,4 @@ -import { isAbsoluteURL } from "discourse-common/lib/get-url"; -import getAbsoluteURL from "discourse-common/lib/get-url"; +import getAbsoluteURL, { isAbsoluteURL } from "discourse-common/lib/get-url"; export default { name: "register-service-worker", diff --git a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js index 81615b23cc5..dabad153163 100644 --- a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js +++ b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js @@ -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 Composer from "discourse/models/composer"; import { minimumOffset } from "discourse/lib/offset-calculator"; import { ajax } from "discourse/lib/ajax"; -import { throttle, schedule } from "@ember/runloop"; import { INPUT_DELAY } from "discourse-common/config/environment"; import { nextTopicUrl, diff --git a/app/assets/javascripts/discourse/app/lib/lightbox.js b/app/assets/javascripts/discourse/app/lib/lightbox.js index b03018fe543..7bd934db2ec 100644 --- a/app/assets/javascripts/discourse/app/lib/lightbox.js +++ b/app/assets/javascripts/discourse/app/lib/lightbox.js @@ -1,8 +1,11 @@ import I18n from "I18n"; 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 { isAppWebview, postRNWebviewMessage } from "discourse/lib/utilities"; import { spinnerHTML } from "discourse/helpers/loading-spinner"; import User from "discourse/models/user"; diff --git a/app/assets/javascripts/discourse/app/lib/load-script.js b/app/assets/javascripts/discourse/app/lib/load-script.js index 1ac65c97144..004be25f8b2 100644 --- a/app/assets/javascripts/discourse/app/lib/load-script.js +++ b/app/assets/javascripts/discourse/app/lib/load-script.js @@ -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 { ajax } from "discourse/lib/ajax"; import { PUBLIC_JS_VERSIONS } from "discourse/lib/public-js-versions"; diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.js index 34b30d1478c..8bdce675b92 100644 --- a/app/assets/javascripts/discourse/app/lib/plugin-api.js +++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js @@ -1,9 +1,7 @@ import deprecated from "discourse-common/lib/deprecated"; -import { iconNode } from "discourse-common/lib/icon-library"; import { addDecorator } from "discourse/widgets/post-cooked"; import { addPluginOutletDecorator } from "discourse/components/plugin-connector"; import { addTopicTitleDecorator } from "discourse/components/topic-title"; -import ComposerEditor from "discourse/components/composer-editor"; import DiscourseBanner from "discourse/components/discourse-banner"; import { addButton, removeButton } from "discourse/widgets/post-menu"; import { includeAttributes } from "discourse/lib/transform-post"; @@ -16,8 +14,12 @@ import { reopenWidget, decorateWidget, changeSetting, + queryRegistry, } 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 { addPopupMenuOptionsCallback } from "discourse/controllers/composer"; 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 { addUserMenuGlyph } from "discourse/widgets/user-menu"; import { addPostClassesCallback } from "discourse/widgets/post"; -import { addPostTransformCallback } from "discourse/widgets/post-stream"; import { attachAdditionalPanel, addToHeaderIcons, @@ -35,8 +36,8 @@ import { import { registerIconRenderer, replaceIcon, + iconNode, } from "discourse-common/lib/icon-library"; -import { replaceCategoryLinkRenderer } from "discourse/helpers/category-link"; import { replaceTagRenderer } from "discourse/lib/render-tag"; import { addNavItem } from "discourse/models/nav-item"; 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 { registerCustomPostMessageCallback as registerCustomPostMessageCallback1 } from "discourse/controllers/topic"; import Sharing from "discourse/lib/sharing"; -import { +import ComposerEditor, { addComposerUploadHandler, addComposerUploadMarkdownResolver, } from "discourse/components/composer-editor"; import { addCategorySortCriteria } from "discourse/components/edit-category-settings"; -import { addExtraIconRenderer } from "discourse/helpers/category-link"; -import { queryRegistry } from "discourse/widgets/widget"; +import { + addExtraIconRenderer, + replaceCategoryLinkRenderer, +} from "discourse/helpers/category-link"; import Composer from "discourse/models/composer"; import { on } from "@ember/object/evented"; import { addQuickAccessProfileItem } from "discourse/widgets/quick-access-profile"; diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js index 3fd26166652..919e369ee1a 100644 --- a/app/assets/javascripts/discourse/app/lib/url.js +++ b/app/assets/javascripts/discourse/app/lib/url.js @@ -5,7 +5,7 @@ import offsetCalculator from "discourse/lib/offset-calculator"; import LockOn from "discourse/lib/lock-on"; import { defaultHomepage } from "discourse/lib/utilities"; 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 { setOwner } from "@ember/application"; diff --git a/app/assets/javascripts/discourse/app/lib/utilities.js b/app/assets/javascripts/discourse/app/lib/utilities.js index b661ff18818..5d0b5c9f3c0 100644 --- a/app/assets/javascripts/discourse/app/lib/utilities.js +++ b/app/assets/javascripts/discourse/app/lib/utilities.js @@ -2,7 +2,7 @@ import I18n from "I18n"; import { escape } from "pretty-text/sanitizer"; import toMarkdown from "discourse/lib/to-markdown"; 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 { deepMerge } from "discourse-common/lib/object"; diff --git a/app/assets/javascripts/discourse/app/models/category.js b/app/assets/javascripts/discourse/app/models/category.js index b1dbd782d2a..33c9afd2ed6 100644 --- a/app/assets/javascripts/discourse/app/models/category.js +++ b/app/assets/javascripts/discourse/app/models/category.js @@ -1,9 +1,8 @@ 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 { ajax } from "discourse/lib/ajax"; import RestModel from "discourse/models/rest"; -import { on } from "discourse-common/utils/decorators"; import PermissionType from "discourse/models/permission-type"; import { NotificationLevels } from "discourse/lib/notification-levels"; import Site from "discourse/models/site"; diff --git a/app/assets/javascripts/discourse/app/models/user-action.js b/app/assets/javascripts/discourse/app/models/user-action.js index 12b97349f09..5599e56c8b4 100644 --- a/app/assets/javascripts/discourse/app/models/user-action.js +++ b/app/assets/javascripts/discourse/app/models/user-action.js @@ -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 RestModel from "discourse/models/rest"; -import { on } from "discourse-common/utils/decorators"; import UserActionGroup from "discourse/models/user-action-group"; import { postUrl } from "discourse/lib/utilities"; import { userPath } from "discourse/lib/url"; diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js index 4a775cda722..f2b78e35ad9 100644 --- a/app/assets/javascripts/discourse/app/models/user.js +++ b/app/assets/javascripts/discourse/app/models/user.js @@ -1,5 +1,4 @@ -import { getURLWithCDN } from "discourse-common/lib/get-url"; -import getURL from "discourse-common/lib/get-url"; +import getURL, { getURLWithCDN } from "discourse-common/lib/get-url"; import I18n from "I18n"; import { A } from "@ember/array"; import { isEmpty } from "@ember/utils"; @@ -22,14 +21,13 @@ import UserDraftsStream from "discourse/models/user-drafts-stream"; import Group from "discourse/models/group"; import { emojiUnescape } from "discourse/lib/text"; 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 Category from "discourse/models/category"; import { Promise } from "rsvp"; import deprecated from "discourse-common/lib/deprecated"; import Site from "discourse/models/site"; import { NotificationLevels } from "discourse/lib/notification-levels"; -import { escapeExpression } from "discourse/lib/utilities"; import { getOwner } from "discourse-common/lib/get-owner"; import cookie, { removeCookie } from "discourse/lib/cookie"; diff --git a/app/assets/javascripts/discourse/app/routes/topic.js b/app/assets/javascripts/discourse/app/routes/topic.js index 8e08d53c499..2653598c89c 100644 --- a/app/assets/javascripts/discourse/app/routes/topic.js +++ b/app/assets/javascripts/discourse/app/routes/topic.js @@ -6,11 +6,10 @@ import DiscourseURL from "discourse/lib/url"; import { ID_CONSTRAINT } from "discourse/models/topic"; import { setTopicId } from "discourse/lib/topic-list-tracker"; import { inject as service } from "@ember/service"; +import showModal from "discourse/lib/show-modal"; const SCROLL_DELAY = 500; -import showModal from "discourse/lib/show-modal"; - const TopicRoute = DiscourseRoute.extend({ screenTrack: service(), diff --git a/app/assets/javascripts/discourse/app/services/document-title.js b/app/assets/javascripts/discourse/app/services/document-title.js index 5fea2a8b2a9..c4f9e54b362 100644 --- a/app/assets/javascripts/discourse/app/services/document-title.js +++ b/app/assets/javascripts/discourse/app/services/document-title.js @@ -1,5 +1,4 @@ -import Service from "@ember/service"; -import { inject as service } from "@ember/service"; +import Service, { inject as service } from "@ember/service"; import getURL from "discourse-common/lib/get-url"; import updateTabCount from "discourse/lib/update-tab-count"; diff --git a/app/assets/javascripts/discourse/app/widgets/default-notification-item.js b/app/assets/javascripts/discourse/app/widgets/default-notification-item.js index 6613dcab2a3..a935121d131 100644 --- a/app/assets/javascripts/discourse/app/widgets/default-notification-item.js +++ b/app/assets/javascripts/discourse/app/widgets/default-notification-item.js @@ -3,7 +3,6 @@ import { isEmpty } from "@ember/utils"; import { wantsNewWindow } from "discourse/lib/intercept-click"; import RawHtml from "discourse/widgets/raw-html"; import { createWidget } from "discourse/widgets/widget"; -import DiscourseURL from "discourse/lib/url"; import { h } from "virtual-dom"; import { emojiUnescape } from "discourse/lib/text"; import { @@ -11,10 +10,9 @@ import { escapeExpression, formatUsername, } from "discourse/lib/utilities"; -import { setTransientHeader } from "discourse/lib/ajax"; -import { userPath } from "discourse/lib/url"; +import DiscourseURL, { userPath } from "discourse/lib/url"; 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"; export const DefaultNotificationItem = createWidget( diff --git a/app/assets/javascripts/discourse/app/widgets/hamburger-menu.js b/app/assets/javascripts/discourse/app/widgets/hamburger-menu.js index b9fdc94034e..b13a698a4ee 100644 --- a/app/assets/javascripts/discourse/app/widgets/hamburger-menu.js +++ b/app/assets/javascripts/discourse/app/widgets/hamburger-menu.js @@ -3,9 +3,8 @@ import I18n from "I18n"; import { later } from "@ember/runloop"; import { createWidget, applyDecorators } from "discourse/widgets/widget"; 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 { userPath } from "discourse/lib/url"; import { wantsNewWindow } from "discourse/lib/intercept-click"; import { NotificationLevels } from "discourse/lib/notification-levels"; diff --git a/app/assets/javascripts/discourse/app/widgets/post-cooked.js b/app/assets/javascripts/discourse/app/widgets/post-cooked.js index 8f8ca43b7df..94a61f66e38 100644 --- a/app/assets/javascripts/discourse/app/widgets/post-cooked.js +++ b/app/assets/javascripts/discourse/app/widgets/post-cooked.js @@ -4,10 +4,7 @@ import { ajax } from "discourse/lib/ajax"; import { isValidLink } from "discourse/lib/click-track"; import { number } from "discourse/lib/formatter"; import highlightSearch from "discourse/lib/highlight-search"; -import { - default as highlightHTML, - unhighlightHTML, -} from "discourse/lib/highlight-html"; +import highlightHTML, { unhighlightHTML } from "discourse/lib/highlight-html"; import { spinnerHTML } from "discourse/helpers/loading-spinner"; let _beforeAdoptDecorators = []; diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js index 07cc0bc9889..7d8d0d3f6ad 100644 --- a/app/assets/javascripts/discourse/app/widgets/post.js +++ b/app/assets/javascripts/discourse/app/widgets/post.js @@ -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 PostCooked from "discourse/widgets/post-cooked"; import DecoratorHelper from "discourse/widgets/decorator-helper"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/about-test.js b/app/assets/javascripts/discourse/tests/acceptance/about-test.js index f16b59924eb..92a8f3e333f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/about-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/about-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("About", function () { test("viewing", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js index 8dc7d47a9c0..2d8433a0e06 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit, click, fillIn, currentRouteName } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Account Created", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js index 30c3c1b4082..326895c9a55 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; const EMAIL = ` From: "somebody" diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js index 723534e0ea4..8baa169fe16 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Search Log Term", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js index c5bb95d914b..42e64263e06 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Search Logs", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js index 8c026a84242..cdba86ee709 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js @@ -1,5 +1,3 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { fillIn, click, @@ -8,7 +6,12 @@ import { currentURL, } from "@ember/test-helpers"; 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"; acceptance("Admin - Site Settings", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js index 4b92cd02d2d..25ab4ae46bb 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { fillIn, click, visit, currentURL } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Site Texts", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js index af8f6d58349..b615a126b34 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit, click, fillIn } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Suspend User", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js index 7d750e7e93b..72edb00493f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Users Badges", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js index e8ea7305029..273f7031ce2 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; function assertNoSecondary(assert) { assert.equal( diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js index 786bbba7024..e7096a6da12 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - User Index", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js index fe058b0b18d..6d71d402273 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Users List", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js index fd9e279e2e9..3a2d4cc462c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { fillIn, click, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Admin - Watched Words", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js index bbc2f714077..c480166ba56 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Auth Complete", function (needs) { needs.hooks.beforeEach(() => { diff --git a/app/assets/javascripts/discourse/tests/acceptance/badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js index 7f557490fc1..6292d3e0c6f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/badges-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Badges", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js index 15a86b3da6e..36af34e88fb 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; @@ -7,6 +5,8 @@ import selectKit from "discourse/tests/helpers/select-kit-helper"; import { acceptance, loggedInUser, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; async function openBookmarkModal() { diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js index 61738d61bb8..1c9846c8a9c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js @@ -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 { test } from "qunit"; -import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; acceptance("Category Banners", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js index 24b1d31ffb2..c8a6e043ceb 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import I18n from "I18n"; acceptance("Category Edit - security", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js index 6743a4512e9..7f7ff5fd2f9 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; import DiscourseURL from "discourse/lib/url"; import sinon from "sinon"; -import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers"; acceptance("Category Edit", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js index a2aa793dd97..c5496f56cbf 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import I18n from "I18n"; import DiscourseURL from "discourse/lib/url"; import sinon from "sinon"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js index d5729db4859..8b7585ad8ca 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Click Track", function (needs) { let tracked = false; diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js index 06e8e01485d..518faf8c270 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; @@ -7,6 +5,8 @@ import selectKit from "discourse/tests/helpers/select-kit-helper"; import { acceptance, updateCurrentUser, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; import { _clearSnapshots } from "select-kit/components/composer-actions"; import { toggleCheckDraftPopup } from "discourse/controllers/composer"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js index 5ff1f10dc2e..63f8fbbc60e 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; function pretender(server, helper) { server.post("/uploads/lookup-urls", () => { diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js index 2805867a15b..ec0d7b4c02e 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer - Edit conflict", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js index 2878445b8a7..c825cbd1ae1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer - Hyperlink", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js index 8f442244526..7e48fae3694 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer - Onebox", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js index 9c8e3da5ecc..738c770ad3d 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js @@ -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 { skip, test } from "qunit"; import I18n from "I18n"; @@ -9,6 +7,8 @@ import { acceptance, invisible, visible, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; import { toggleCheckDraftPopup } from "discourse/controllers/composer"; import Draft from "discourse/models/draft"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js index ace51f6bcd8..32e8badb2bd 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Composer topic featured links", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js index c58ce1855f4..6d7ec8cbac1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance( "Composer disabled, uncategorized not allowed when any topic_template present", diff --git a/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js index 03a3b280bc1..0c24d119c7b 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Create Account - external auth", function (needs) { needs.hooks.beforeEach(() => { diff --git a/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js index 66785ccf3d5..60d24324e61 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Create Account - User Fields", function (needs) { needs.site({ diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js index fc107c14d86..fd58172d053 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { setCustomHTML } from "discourse/helpers/custom-html"; import PreloadStore from "discourse/lib/preload-store"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js index 898910299e2..ecc7e0d7526 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import Ember from "ember"; import hbs from "htmlbars-inline-precompile"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js index 0ce5b65de0e..d1e6f31fb12 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Dashboard", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js b/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js index 46a8d6f1006..087efa0e3ea 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/email-notice-test.js @@ -1,9 +1,9 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, + exists, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Email Disabled Banner", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js index 6c8c5c05a4e..11467f6a7a0 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("EmojiPicker", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js index c56702807d3..ca23c0cf033 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js @@ -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 { test } from "qunit"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Emoji", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js index 9695c696f5a..773a54ef8bf 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import DiscoveryFixtures from "discourse/tests/fixtures/discovery-fixtures"; acceptance("Encoded Sub Category Discovery", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js b/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js index 7782cb1e8b9..735b49fb3ef 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/enforce-second-factor-test.js @@ -1,9 +1,9 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Enforce Second Factor", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js b/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js index e4b5a84f73f..f5cd5c413e8 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import userFixtures from "discourse/tests/fixtures/user-fixtures"; async function openFlagModal() { diff --git a/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js index afc3cfd2d90..09cda1e425b 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; let userFound = false; diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js index 3c310d1bad9..70898fd78aa 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js @@ -1,4 +1,3 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; @@ -6,6 +5,7 @@ import { acceptance, updateCurrentUser, count, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Group Members - Anonymous", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js index 9134746b600..5a07bdba709 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js @@ -1,10 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, count, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Category Notification Defaults", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js index d6ef2070559..244ae75e8f2 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js @@ -1,9 +1,9 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Interaction Settings", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js index ae04d2c584c..0573a88d900 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Group logs", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js index d35a04db356..a130efdc464 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js @@ -1,9 +1,9 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js index 5a68938e00a..dc4bdba41fa 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js @@ -1,10 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, count, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Profile", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js index f5a8cfc7161..248f56d0a2f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js @@ -1,10 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, count, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Managing Group Tag Notification Defaults", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js index 2d847bdb770..40b321f1be5 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Group Requests", function (needs) { let requests; diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-test.js index 5ecf61bb907..4405e6e1632 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-test.js @@ -1,9 +1,12 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + acceptance, + count, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance, count } from "discourse/tests/helpers/qunit-helpers"; function setupGroupPretender(server, helper) { server.post("/groups/Macdonald/request_membership", () => { diff --git a/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js index b44f36170e0..42da9a3b4c0 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js @@ -1,11 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, invisible, count, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Groups", function () { diff --git a/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js index 54910a26e22..38eb83822dc 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Group - Anonymous", function () { test("As an anon user", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js index 86fc7f53f57..93b3e8b74e9 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js @@ -1,9 +1,9 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, updateCurrentUser, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Opening the hamburger menu with some reviewables", function ( diff --git a/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js index 83b29950ca3..726397c9b5c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Category and Tag Hashtags", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js index 64927d05af0..bd877437dc1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Invite Accept", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js index 9a14943854d..8bc3b810e8c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js @@ -1,7 +1,6 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { fillIn, click, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; acceptance("Accept Invite - User Fields", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js index 48058d15236..5d72e2e2b7d 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js @@ -1,7 +1,6 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit, currentURL } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Jump to", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js index 5f80484c50a..06d51060010 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js @@ -1,7 +1,10 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + exists, + acceptance, + invisible, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit, currentRouteName } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance, invisible } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login Required", function (needs) { needs.settings({ login_required: true }); diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js index 701e28cf1a5..4c05406c6cc 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js @@ -1,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 { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email - hide email address taken", function (needs) { needs.settings({ diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js index 4d5204798b1..474db0e4fa1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email - no social logins", function (needs) { needs.settings({ enable_local_logins_via_email: true }); diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js index f31517f3705..7a38f54f9da 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email disabled", function (needs) { needs.settings({ diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js index 2e6df8184e7..bca7b367e0b 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { fillIn, click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Login with email", function (needs) { needs.settings({ diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js index 550d2e4c3ea..106a1fb2e63 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic Discovery - Mobile", function (needs) { needs.mobileView(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js index bb21a4023c3..8a6449de519 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Signing In - Mobile", function (needs) { needs.mobileView(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js index 1aec2d9466b..903a89d09bb 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Directory - Mobile", function (needs) { needs.mobileView(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/modal-test.js b/app/assets/javascripts/discourse/tests/acceptance/modal-test.js index f0d4f15fc04..6864a68c896 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/modal-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/modal-test.js @@ -1,4 +1,3 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; import { click, triggerKeyEvent, visit } from "@ember/test-helpers"; import { skip, test } from "qunit"; import I18n from "I18n"; @@ -6,6 +5,7 @@ import { run } from "@ember/runloop"; import { acceptance, controllerFor, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; import showModal from "discourse/lib/show-modal"; import hbs from "htmlbars-inline-precompile"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js index 0aeb2a1eb18..adef980eb07 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Message - Anonymous", function () { test("accessing new-message route when logged out", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js index 2ae375b295f..34292f54ad1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("New Topic - Anonymous", function () { test("accessing new-topic route when logged out", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js index 187e4a80163..7bceb89507f 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("Notifications filter", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js index ef29ac8be01..11d8e71e1e5 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js @@ -1,7 +1,6 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Page Publishing", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js index 58dd51bb13d..331900f93bf 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit, click, fillIn } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import PreloadStore from "discourse/lib/preload-store"; import { parsePostData } from "discourse/tests/helpers/create-pretender"; import DiscourseURL from "discourse/lib/url"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js index ad9c88d03a3..875c316ba12 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Personal Message", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js index fe8db8b1258..35ff37a03a8 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js @@ -1,7 +1,6 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { visit, click } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { extraConnectorClass } from "discourse/lib/plugin-connectors"; import { action } from "@ember/object"; import hbs from "htmlbars-inline-precompile"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js index bb331928bc6..4ebef80da5d 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { withPluginApi } from "discourse/lib/plugin-api"; import hbs from "htmlbars-inline-precompile"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js index 9402f7e4755..77d19c53f9c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearCache } from "discourse/lib/plugin-connectors"; import hbs from "htmlbars-inline-precompile"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js index 1455360174b..c6d92a5f068 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import hbs from "htmlbars-inline-precompile"; const CONNECTOR = diff --git a/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js index a8d08aeab26..2b0817fb9b9 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js @@ -1,7 +1,6 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { visit, click } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Post - Admin Menu - Anonymous", function () { test("Enter as a anon user", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js index 22acfec0b8a..5b3cc7cb4ec 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js @@ -1,5 +1,3 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { visit, currentURL, @@ -12,6 +10,8 @@ import I18n from "I18n"; import { acceptance, updateCurrentUser, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; import User from "discourse/models/user"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js index e147e4d558b..f8337a3f214 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import compile from "handlebars-compiler"; import { addRawTemplate, diff --git a/app/assets/javascripts/discourse/tests/acceptance/reports-test.js b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js index 4978ba53a80..f09734ee4ee 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/reports-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Reports", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/review-test.js b/app/assets/javascripts/discourse/tests/acceptance/review-test.js index 30a45c9f24f..4ec8ebb6752 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/review-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/review-test.js @@ -1,8 +1,7 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { visit, click, fillIn } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Review", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js index d0af70768e2..f22827afa84 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js @@ -1,5 +1,3 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { triggerKeyEvent, visit, fillIn, click } from "@ember/test-helpers"; import { skip, test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; @@ -8,6 +6,8 @@ import { acceptance, waitFor, visible, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Search - Full Page", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js index 95c26640810..bad0576f3c2 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Search - Mobile", function (needs) { needs.mobileView(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-test.js index a50c9719519..d7b7b820777 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/search-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/search-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, triggerKeyEvent, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import searchFixtures from "discourse/tests/fixtures/search-fixtures"; acceptance("Search - Anonymous", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js index ead72fad11b..1030da62315 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Share and Invite modal - desktop", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js index 07696332d07..ee21e0e23f8 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Share and Invite modal - mobile", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js index df5d370a0b9..a69f3bec8e2 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Shared Drafts", function () { test("Viewing", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js index 5d84d94b3f8..ed467e7eef3 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, fillIn, visit } from "@ember/test-helpers"; import { skip, test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Signing In", function () { test("sign in", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js index 6c4b2954bb3..03131de6ce2 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js @@ -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 { test } from "qunit"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Tag Groups", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js index 3b88f42e7a0..f05a989c63a 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Tags intersection", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js index fb3339415aa..663aedc781c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js @@ -1,10 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { click, visit, currentURL } from "@ember/test-helpers"; import { test } from "qunit"; import { updateCurrentUser, acceptance, + queryAll, + exists, } from "discourse/tests/helpers/qunit-helpers"; acceptance("Tags", function (needs) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js index ed6206780f1..ed8dde1117c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js @@ -1,10 +1,10 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; -import { click, visit } from "@ember/test-helpers"; -import { test } from "qunit"; import { + exists, acceptance, updateCurrentUser, } from "discourse/tests/helpers/qunit-helpers"; +import { click, visit } from "@ember/test-helpers"; +import { test } from "qunit"; acceptance("Topic - Admin Menu Anonymous Users", function () { test("Enter as a regular user", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js index d538bd71320..f131b7620f7 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic - Anonymous", function () { test("Enter a Topic", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js index 5b2fd6b6025..f82c20f42a1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js @@ -1,10 +1,12 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import DiscourseURL from "discourse/lib/url"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import MessageBus from "message-bus-client"; import sinon from "sinon"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js index f9eb57d63e8..5893d33da66 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js @@ -1,12 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { click, fillIn, visit } from "@ember/test-helpers"; -import { skip } from "qunit"; -import { test } from "qunit"; -import selectKit from "discourse/tests/helpers/select-kit-helper"; import { acceptance, updateCurrentUser, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; +import { click, fillIn, visit } from "@ember/test-helpers"; +import { skip, test } from "qunit"; +import selectKit from "discourse/tests/helpers/select-kit-helper"; acceptance("Topic - Edit timer", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js index fa9de352e8e..fba4550cd2c 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js @@ -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 { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Topic move posts", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js index f85d400bf75..56686feec7a 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js @@ -1,9 +1,11 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; function selectText(selector) { const range = document.createRange(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js index 21632ff2983..77d92442ad1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js @@ -1,11 +1,14 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, + visible, +} from "discourse/tests/helpers/qunit-helpers"; import { click, triggerKeyEvent, fillIn, visit } from "@ember/test-helpers"; import { test } from "qunit"; import I18n from "I18n"; import { withPluginApi } from "discourse/lib/plugin-api"; import selectKit from "discourse/tests/helpers/select-kit-helper"; -import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers"; import { IMAGE_VERSION as v } from "pretty-text/emoji/version"; function selectText(selector) { diff --git a/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js index 7c4074a17d9..aa2e5e39318 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js @@ -1,7 +1,6 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; import { visit, currentURL } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Unknown", function (needs) { const urls = { diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js index b4f120f05d3..a86878a1e18 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; import userFixtures from "discourse/tests/fixtures/user-fixtures"; import { cloneJSON } from "discourse-common/lib/object"; diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js index af5d506962b..4785de3e12a 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js @@ -1,10 +1,8 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; -import { visit } from "@ember/test-helpers"; +import { exists, acceptance } from "discourse/tests/helpers/qunit-helpers"; +import { visit, click } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import userFixtures from "discourse/tests/fixtures/user-fixtures"; import User from "discourse/models/user"; -import { click } from "@ember/test-helpers"; acceptance("User Card - Show Local Time", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js index c5161235cad..7938bef36ec 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js @@ -1,8 +1,10 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { visit } from "@ember/test-helpers"; +import { + queryAll, + acceptance, + visible, +} from "discourse/tests/helpers/qunit-helpers"; +import { visit, click } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance, visible } from "discourse/tests/helpers/qunit-helpers"; -import { click } from "@ember/test-helpers"; acceptance("User Drafts", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js index 7bdd500f66d..644f06b36c5 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js @@ -1,13 +1,14 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; -import { visit } from "@ember/test-helpers"; +import { + queryAll, + exists, + acceptance, +} from "discourse/tests/helpers/qunit-helpers"; +import { visit, click } from "@ember/test-helpers"; import { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; import Site from "discourse/models/site"; import Session from "discourse/models/session"; import cookie, { removeCookie } from "discourse/lib/cookie"; -import { click } from "@ember/test-helpers"; acceptance("User Preferences - Interface", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-test.js index 0272d43754c..d72318b95d1 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-test.js @@ -1,11 +1,10 @@ -import { visit, currentRouteName } from "@ember/test-helpers"; +import { visit, currentRouteName, click } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, exists, queryAll, } from "discourse/tests/helpers/qunit-helpers"; -import { click } from "@ember/test-helpers"; acceptance("User Routes", function (needs) { needs.user(); diff --git a/app/assets/javascripts/discourse/tests/acceptance/users-test.js b/app/assets/javascripts/discourse/tests/acceptance/users-test.js index 679410d241b..79469bf2c87 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/users-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/users-test.js @@ -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 { test } from "qunit"; -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("User Directory", function () { test("Visit Page", async function (assert) { diff --git a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js index 09d8afa7057..d84e32a5eb4 100644 --- a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js +++ b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js @@ -11,7 +11,7 @@ import { } from "discourse/lib/plugin-connectors"; import { clearHTMLCache } from "discourse/helpers/custom-html"; import { flushMap } from "discourse/models/store"; -import { clearRewrites } from "discourse/lib/url"; +import { clearRewrites, setURLContainer } from "discourse/lib/url"; import { initSearchData } from "discourse/widgets/search-menu"; import { resetDecorators } from "discourse/widgets/widget"; import { resetWidgetCleanCallbacks } from "discourse/components/mount-widget"; @@ -28,10 +28,8 @@ import { currentSettings, mergeSettings, } from "discourse/tests/helpers/site-settings"; -import { getOwner } from "discourse-common/lib/get-owner"; +import { getOwner, setDefaultOwner } from "discourse-common/lib/get-owner"; import { setTopicList } from "discourse/lib/topic-list-tracker"; -import { setURLContainer } from "discourse/lib/url"; -import { setDefaultOwner } from "discourse-common/lib/get-owner"; import { moduleFor } from "ember-qunit"; import QUnit, { module } from "qunit"; import siteFixtures from "discourse/tests/fixtures/site-fixtures"; diff --git a/app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js b/app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js index 75bfe3885b4..a8a4377b484 100644 --- a/app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js +++ b/app/assets/javascripts/discourse/tests/helpers/select-kit-helper.js @@ -1,8 +1,7 @@ -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, exists } from "discourse/tests/helpers/qunit-helpers"; import { moduleForComponent } from "ember-qunit"; import { isEmpty } from "@ember/utils"; import { click, fillIn } from "@ember/test-helpers"; -import { exists } from "discourse/tests/helpers/qunit-helpers"; function checkSelectKitIsNotExpanded(selector) { if (queryAll(selector).hasClass("is-expanded")) { diff --git a/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js index a713681aa4a..4b44be5884f 100644 --- a/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/bookmark-test.js @@ -1,11 +1,13 @@ import sinon from "sinon"; -import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; +import { + discourseModule, + logIn, + fakeTime, +} from "discourse/tests/helpers/qunit-helpers"; import { test } from "qunit"; -import { logIn } from "discourse/tests/helpers/qunit-helpers"; import User from "discourse/models/user"; import KeyboardShortcutInitializer from "discourse/initializers/keyboard-shortcuts"; import { REMINDER_TYPES } from "discourse/lib/bookmark"; -import { fakeTime } from "discourse/tests/helpers/qunit-helpers"; let BookmarkController; diff --git a/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js index 753183571ce..d29cd0f7706 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js @@ -1,6 +1,5 @@ import sinon from "sinon"; -import { skip } from "qunit"; -import { test, module } from "qunit"; +import { skip, test, module } from "qunit"; import { later } from "@ember/runloop"; import DiscourseURL from "discourse/lib/url"; import ClickTrack from "discourse/lib/click-track"; diff --git a/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js b/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js index 594bb42b554..8d95763027a 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js @@ -1,6 +1,5 @@ import { test, module } from "qunit"; -import { - default as getURL, +import getURL, { setupURL, setupS3CDN, getURLWithCDN, diff --git a/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js b/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js index 7dafc4cb48a..11e1d2d56ab 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js @@ -1,5 +1,4 @@ -import { skip } from "qunit"; -import { test, module } from "qunit"; +import { skip, test, module } from "qunit"; import { loadScript, cacheBuster } from "discourse/lib/load-script"; import { PUBLIC_JS_VERSIONS as jsVersions } from "discourse/lib/public-js-versions"; diff --git a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js index 03c0e7b0da9..401e98a9843 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js @@ -1,5 +1,4 @@ -import { skip } from "qunit"; -import { test, module } from "qunit"; +import { skip, test, module } from "qunit"; import { buildQuote } from "discourse/lib/quote"; import Post from "discourse/models/post"; import PrettyText, { buildOptions } from "pretty-text/pretty-text"; @@ -11,7 +10,6 @@ import { import { extractDataAttribute } from "pretty-text/engines/discourse-markdown-it"; import { registerEmoji } from "pretty-text/emoji"; import { deepMerge } from "discourse-common/lib/object"; -import QUnit from "qunit"; const rawOpts = { siteSettings: { diff --git a/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js b/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js index 7ed9048b927..cae8dccdb69 100644 --- a/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js +++ b/app/assets/javascripts/discourse/tests/unit/services/document-title-test.js @@ -1,6 +1,8 @@ import { test } from "qunit"; -import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; -import { currentUser } from "discourse/tests/helpers/qunit-helpers"; +import { + discourseModule, + currentUser, +} from "discourse/tests/helpers/qunit-helpers"; discourseModule("Unit | Service | document-title", function (hooks) { hooks.beforeEach(function () { diff --git a/app/assets/javascripts/pretty-text/addon/white-lister.js b/app/assets/javascripts/pretty-text/addon/white-lister.js index f7ee800b3fb..9e2fa6bf104 100644 --- a/app/assets/javascripts/pretty-text/addon/white-lister.js +++ b/app/assets/javascripts/pretty-text/addon/white-lister.js @@ -1,6 +1,7 @@ import deprecated from "discourse-common/lib/deprecated"; -import AllowLister from "pretty-text/allow-lister"; -import { DEFAULT_LIST as NEW_DEFAULT_LIST } from "pretty-text/allow-lister"; +import AllowLister, { + DEFAULT_LIST as NEW_DEFAULT_LIST, +} from "pretty-text/allow-lister"; export default class WhiteLister extends AllowLister { constructor(options) { diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js index 439a71b1c33..d76586f50f4 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js @@ -6,7 +6,6 @@ import Component from "@ember/component"; import deprecated from "discourse-common/lib/deprecated"; import { makeArray } from "discourse-common/lib/helpers"; import UtilsMixin from "select-kit/mixins/utils"; -import PluginApiMixin from "select-kit/mixins/plugin-api"; import Mixin from "@ember/object/mixin"; import { isPresent, isEmpty, isNone } from "@ember/utils"; import { @@ -18,7 +17,7 @@ import { schedule, } from "@ember/runloop"; import { Promise } from "rsvp"; -import { +import PluginApiMixin, { applyContentPluginApiCallbacks, applyOnChangePluginApiCallbacks, } from "select-kit/mixins/plugin-api"; diff --git a/app/assets/javascripts/select-kit/addon/components/user-chooser.js b/app/assets/javascripts/select-kit/addon/components/user-chooser.js index e3c682376a3..102556ae83f 100644 --- a/app/assets/javascripts/select-kit/addon/components/user-chooser.js +++ b/app/assets/javascripts/select-kit/addon/components/user-chooser.js @@ -1,7 +1,6 @@ import MultiSelectComponent from "select-kit/components/multi-select"; import { computed } from "@ember/object"; -import { - default as userSearch, +import userSearch, { skipSearch, eagerCompleteSearch, } from "discourse/lib/user-search"; diff --git a/app/assets/javascripts/wizard/components/theme-preview.js b/app/assets/javascripts/wizard/components/theme-preview.js index 3209b14a4b3..5e72c3ec3ce 100644 --- a/app/assets/javascripts/wizard/components/theme-preview.js +++ b/app/assets/javascripts/wizard/components/theme-preview.js @@ -1,6 +1,5 @@ import I18n from "I18n"; -import discourseComputed from "discourse-common/utils/decorators"; -import { observes } from "discourse-common/utils/decorators"; +import discourseComputed, { observes } from "discourse-common/utils/decorators"; import { createPreviewComponent, darkLightDiff, diff --git a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 index ca52c83a549..1754952f220 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js.es6 @@ -1,6 +1,5 @@ -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; +import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; acceptance("Poll breakdown", function (needs) { needs.user(); diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 index e86fe89445b..e79b2f7b5ca 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-builder-disabled-test.js.es6 @@ -1,7 +1,7 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; import { acceptance, updateCurrentUser, + exists, } from "discourse/tests/helpers/qunit-helpers"; import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; diff --git a/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 index 5b7627524ca..f0e517ceae9 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-builder-enabled-test.js.es6 @@ -1,12 +1,12 @@ -import { exists } from "discourse/tests/helpers/qunit-helpers"; import selectKit from "discourse/tests/helpers/select-kit-helper"; import { acceptance, updateCurrentUser, + exists, + queryAll, } from "discourse/tests/helpers/qunit-helpers"; import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; acceptance("Poll Builder - polls are enabled", function (needs) { needs.user(); diff --git a/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 index a5d8701b18a..78f6d0bb9dd 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-pie-chart-test.js.es6 @@ -1,5 +1,4 @@ -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Rendering polls with pie charts", function (needs) { needs.user(); diff --git a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 index 8390fe4179c..113bbf9b26d 100644 --- a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js.es6 @@ -1,6 +1,5 @@ -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Poll quote", function (needs) { needs.user(); diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 index 391558af091..625ca4fda64 100644 --- a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-desktop.js.es6 @@ -1,6 +1,5 @@ -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Rendering polls with bar charts - desktop", function (needs) { needs.user(); diff --git a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 index e0de1dca17f..2acce037d83 100644 --- a/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 +++ b/plugins/poll/test/javascripts/acceptance/polls-bar-chart-test-mobile.js.es6 @@ -1,6 +1,5 @@ -import { acceptance } from "discourse/tests/helpers/qunit-helpers"; import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer"; -import { queryAll } from "discourse/tests/helpers/qunit-helpers"; +import { queryAll, acceptance } from "discourse/tests/helpers/qunit-helpers"; acceptance("Rendering polls with bar charts - mobile", function (needs) { needs.user();