DEV: update eslint, prettier and template-lint (#465)
This commit is contained in:
parent
f57b09ce8b
commit
34da76c743
|
@ -0,0 +1 @@
|
|||
module.exports = require("@discourse/lint-configs/eslint");
|
|
@ -1 +0,0 @@
|
|||
{}
|
|
@ -0,0 +1 @@
|
|||
module.exports = require("@discourse/lint-configs/prettier");
|
|
@ -1,4 +1 @@
|
|||
module.exports = {
|
||||
plugins: ["ember-template-lint-plugin-discourse"],
|
||||
extends: "discourse:recommended",
|
||||
};
|
||||
module.exports = require("@discourse/lint-configs/template-lint");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";
|
||||
import { underscore } from "@ember/string";
|
||||
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";
|
||||
|
||||
export default DiscoursePostEventAdapter.extend({
|
||||
pathFor(store, type, findArgs) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";
|
||||
import { underscore } from "@ember/string";
|
||||
import { Result } from "discourse/adapters/rest";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";
|
||||
|
||||
export default DiscoursePostEventAdapter.extend({
|
||||
// TODO: destroy/update/create should be improved in core to allow for nested models
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import { inject as service } from "@ember/service";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default Component.extend(UppyUploadMixin, {
|
||||
type: "csv",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { computed } from "@ember/object";
|
||||
import { HOLIDAY_REGIONS } from "../lib/regions";
|
||||
import I18n from "I18n";
|
||||
import ComboBoxComponent from "select-kit/components/combo-box";
|
||||
import { HOLIDAY_REGIONS } from "../lib/regions";
|
||||
|
||||
export default ComboBoxComponent.extend({
|
||||
pluginApiIdentifiers: ["timezone-input"],
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Promise } from "rsvp";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
import { formatEventName } from "../helpers/format-event-name";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import Component from "@ember/component";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { Promise } from "rsvp";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { formatEventName } from "../helpers/format-event-name";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import DButton from "discourse/components/d-button";
|
||||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import I18n from "discourse-i18n";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { action } from "@ember/object";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
||||
import or from "truth-helpers/helpers/or";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
|
||||
export const DEFAULT_MONTH_FORMAT = "MMMM YYYY";
|
||||
export const DEFAULT_DATE_FORMAT = "dddd, MMM D";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import I18n from "I18n";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import Group from "discourse/models/group";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Controller from "@ember/controller";
|
||||
import { action, computed, set } from "@ember/object";
|
||||
import { equal, gte } from "@ember/object/computed";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Group from "discourse/models/group";
|
||||
import I18n from "I18n";
|
||||
import { buildParams, replaceRaw } from "../lib/raw-event-helper";
|
||||
|
||||
const DEFAULT_REMINDER = {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import Controller from "@ember/controller";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Controller from "@ember/controller";
|
||||
import Group from "discourse/models/group";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
dialog: service(),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Controller from "@ember/controller";
|
||||
import { action } from "@ember/object";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { extractError } from "discourse/lib/ajax-error";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
invitedNames: null,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Controller from "@ember/controller";
|
||||
import { action } from "@ember/object";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import guessDateFormat from "../lib/guess-best-date-format";
|
||||
import { htmlHelper } from "discourse-common/lib/helpers";
|
||||
import guessDateFormat from "../lib/guess-best-date-format";
|
||||
|
||||
export default htmlHelper((date) => {
|
||||
date = moment.utc(date).tz(moment.tz.guess());
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { htmlSafe } from "@ember/template";
|
||||
import { renderAvatar } from "discourse/helpers/user-avatar";
|
||||
import { userPath } from "discourse/lib/url";
|
||||
import { htmlHelper } from "discourse-common/lib/helpers";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { htmlHelper } from "discourse-common/lib/helpers";
|
||||
|
||||
export default htmlHelper((invitee) => {
|
||||
const path = userPath(invitee.user.username);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import eventRelativeDate from "../lib/event-relative-date";
|
||||
import eventLocalDate from "../lib/event-local-date";
|
||||
import eventRelativeDate from "../lib/event-relative-date";
|
||||
|
||||
function initializeDecorateTopicTitle(api) {
|
||||
api.decorateTopicTitle((topic, node, topicTitleType) => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default {
|
||||
name: "disable-sort",
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { Promise } from "rsvp";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import { createPopper } from "@popperjs/core";
|
||||
import { Promise } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import loadScript from "discourse/lib/load-script";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import Category from "discourse/models/category";
|
||||
import I18n from "I18n";
|
||||
import { colorToHex, contrastColor, stringToColor } from "../lib/colors";
|
||||
import { createPopper } from "@popperjs/core";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
import { formatEventName } from "../helpers/format-event-name";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import { formatEventName } from "../helpers/format-event-name";
|
||||
import { colorToHex, contrastColor, stringToColor } from "../lib/colors";
|
||||
import { isNotFullDayEvent } from "../lib/guess-best-date-format";
|
||||
|
||||
function loadFullCalendar() {
|
||||
return loadScript(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import WidgetGlue from "discourse/widgets/glue";
|
||||
import { getRegister } from "discourse-common/lib/get-owner";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
|
||||
export default {
|
||||
name: "discourse-group-timezones",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import I18n from "I18n";
|
||||
import guessDateFormat from "../lib/guess-best-date-format";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { applyLocalDates } from "discourse/lib/local-dates";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { cookAsync } from "discourse/lib/text";
|
||||
import WidgetGlue from "discourse/widgets/glue";
|
||||
import { getRegister } from "discourse-common/lib/get-owner";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { applyLocalDates } from "discourse/lib/local-dates";
|
||||
import I18n from "I18n";
|
||||
import guessDateFormat from "../lib/guess-best-date-format";
|
||||
|
||||
function _decorateEvent(api, cooked, post) {
|
||||
_attachWidget(api, cooked, post);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { isTesting } from "discourse-common/config/environment";
|
||||
import { cancel } from "@ember/runloop";
|
||||
import eventRelativeDate from "../lib/event-relative-date";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
import eventRelativeDate from "../lib/event-relative-date";
|
||||
|
||||
function computeRelativeEventDates() {
|
||||
document
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import RestModel from "discourse/models/rest";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import RestModel from "discourse/models/rest";
|
||||
|
||||
const ATTRIBUTES = {
|
||||
id: null,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DiscourseURL from "discourse/lib/url";
|
||||
import Route from "@ember/routing/route";
|
||||
import { on } from "@ember/object/evented";
|
||||
import Route from "@ember/routing/route";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
export default Route.extend({
|
||||
enforcePostEventEnabled: on("activate", function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { throttle } from "@ember/runloop";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default createWidget("discourse-group-timezones-filter", {
|
||||
tagName: "input.group-timezones-filter",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default createWidget("discourse-group-timezones-header", {
|
||||
tagName: "div.group-timezones-header",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from "virtual-dom";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { avatarImg } from "discourse/widgets/post";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
|
||||
export default createWidget("discourse-group-timezones-member", {
|
||||
tagName: "li.group-timezones-member",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { throttle } from "@ember/runloop";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
|
||||
export default createWidget("discourse-group-timezones-slider", {
|
||||
tagName: "input.group-timezones-slider",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import I18n from "I18n";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import { h } from "virtual-dom";
|
||||
import RawHtml from "discourse/widgets/raw-html";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default createWidget("discourse-post-event-dates", {
|
||||
tagName: "section.event-dates",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from "virtual-dom";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { avatarImg } from "discourse/widgets/post";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
|
||||
export default createWidget("discourse-post-event-creator", {
|
||||
tagName: "span.event-creator",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import I18n from "I18n";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { h } from "virtual-dom";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { avatarImg } from "discourse/widgets/post";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default createWidget("discourse-post-event-invitee", {
|
||||
tagName: "li.event-invitee",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createWidget } from "discourse/widgets/widget";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
|
||||
export default createWidget("discourse-post-event-status", {
|
||||
tagName: "div.event-status",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import { h } from "virtual-dom";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
|
||||
function prefixProtocol(url) {
|
||||
return url.indexOf("://") === -1 && url.indexOf("mailto:") === -1
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import I18n from "I18n";
|
||||
import { cookAsync, emojiUnescape } from "discourse/lib/text";
|
||||
import { exportEntity } from "discourse/lib/export-csv";
|
||||
import cleanTitle from "../lib/clean-title";
|
||||
import { dasherize } from "@ember/string";
|
||||
import EmberObject from "@ember/object";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { routeAction } from "discourse/helpers/route-action";
|
||||
import { exportEntity } from "discourse/lib/export-csv";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { cookAsync, emojiUnescape } from "discourse/lib/text";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { routeAction } from "discourse/helpers/route-action";
|
||||
import I18n from "I18n";
|
||||
import cleanTitle from "../lib/clean-title";
|
||||
import { buildParams, replaceRaw } from "../lib/raw-event-helper";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
|
||||
export default createWidget("discourse-post-event", {
|
||||
tagName: "div.discourse-post-event-widget",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import I18n from "I18n";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
|
||||
import { escapeExpression, formatUsername } from "discourse/lib/utilities";
|
||||
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
|
||||
// TODO(osama): delete the strings marked with TODO in translation files when
|
||||
// this file is removed
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import I18n from "I18n";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
|
||||
import { escapeExpression, formatUsername } from "discourse/lib/utilities";
|
||||
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
|
||||
import { createWidgetFrom } from "discourse/widgets/widget";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
|
||||
// TODO: delete the strings marked with TODO in translation files when
|
||||
// this file is removed
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import I18n from "I18n";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default createWidget("more-dropdown", {
|
||||
tagName: "div.more-dropdown",
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
"author": "Discourse",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"eslint-config-discourse": "^3.5.0"
|
||||
"@discourse/lint-configs": "^1.0.0",
|
||||
"ember-template-lint": "^5.11.2",
|
||||
"eslint": "^8.51.0",
|
||||
"prettier": "^2.8.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
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";
|
||||
|
||||
acceptance("Admin - Discourse Calendar - Holidays", function (needs) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
const eventsPretender = (server, helper) => {
|
||||
server.get("/discourse-post-event/events.json", () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "discourse-i18n";
|
||||
|
||||
acceptance("Discourse Calendar - Category Events Calendar", function (needs) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
|
||||
acceptance("Discourse Calendar - Notifications", function (needs) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Discourse Calendar - hamburger action shown", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import Site from "discourse/models/site";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Calendar - Disable sorting headers", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { acceptance, fakeTime } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import getEventByText from "../helpers/get-event-by-text";
|
||||
import { acceptance, fakeTime } from "discourse/tests/helpers/qunit-helpers";
|
||||
import eventTopicFixture from "../helpers/event-topic-fixture";
|
||||
import getEventByText from "../helpers/get-event-by-text";
|
||||
|
||||
function getRoundedPct(marginString) {
|
||||
return Math.round(marginString.match(/(\d+(\.\d+)?)%/)[1]);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { acceptance, fakeTime } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { skip } from "qunit";
|
||||
import getEventByText from "../helpers/get-event-by-text";
|
||||
import { acceptance, fakeTime } from "discourse/tests/helpers/qunit-helpers";
|
||||
import eventTopicFixture from "../helpers/event-topic-fixture";
|
||||
import getEventByText from "../helpers/get-event-by-text";
|
||||
|
||||
acceptance("Discourse Calendar - Topic Calendar Events", function (needs) {
|
||||
needs.hooks.beforeEach(function () {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import discoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import { test } from "qunit";
|
||||
import sinon from "sinon";
|
||||
import discoveryFixtures from "discourse/tests/fixtures/discovery-fixtures";
|
||||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
|
||||
acceptance("Discourse Calendar - Event Title Decorator", function (needs) {
|
||||
needs.user();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { tomorrow } from "discourse/lib/time-utils";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { tomorrow } from "discourse/lib/time-utils";
|
||||
|
||||
acceptance("Discourse Calendar - Upcoming Events Calendar", function (needs) {
|
||||
needs.site({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
|
||||
module("Integration | Component | admin-holidays-list-item", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
|
||||
module("Integration | Component | admin-holidays-list", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
module("Integration | Component | region-input", function (hooks) {
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
import { hash } from "@ember/helper";
|
||||
import Service from "@ember/service";
|
||||
import { render, waitFor } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { render, waitFor } from "@ember/test-helpers";
|
||||
import UpcomingEventsList, {
|
||||
DEFAULT_MONTH_FORMAT,
|
||||
DEFAULT_DATE_FORMAT,
|
||||
DEFAULT_TIME_FORMAT,
|
||||
} from "../../discourse/components/upcoming-events-list";
|
||||
import Service from "@ember/service";
|
||||
import pretender, { response } from "discourse/tests/helpers/create-pretender";
|
||||
import {
|
||||
exists,
|
||||
fakeTime,
|
||||
query,
|
||||
queryAll,
|
||||
fakeTime,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { hash } from "@ember/helper";
|
||||
import I18n from "discourse-i18n";
|
||||
import UpcomingEventsList, {
|
||||
DEFAULT_DATE_FORMAT,
|
||||
DEFAULT_MONTH_FORMAT,
|
||||
DEFAULT_TIME_FORMAT,
|
||||
} from "../../discourse/components/upcoming-events-list";
|
||||
|
||||
class RouterStub extends Service {
|
||||
currentRoute = { attributes: { category: { id: 1 } } };
|
||||
|
|
Loading…
Reference in New Issue