Skip to content

A platform for community discussion. Free, open, simple.

DEV: Update lint-configs and autofix issues (#31620)

Jarek Radosz28e00d9bfeeb
diff --git a/.prettierignore b/.prettierignore
index 4fc15ceffd8..0663ab5c013 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -20,6 +20,7 @@ plugins/**/lib/javascripts/locale
public/
!/app/assets/javascripts/discourse/public
vendor/
+app/assets/javascripts/discourse/tests/unit/utils/decorators-test.js
app/assets/javascripts/discourse/tests/fixtures
spec/
node_modules/
diff --git a/app/assets/javascripts/admin/addon/models/screened-email.js b/app/assets/javascripts/admin/addon/models/screened-email.js
index 2e632e0ad98..a0e8680cce6 100644
--- a/app/assets/javascripts/admin/addon/models/screened-email.js
+++ b/app/assets/javascripts/admin/addon/models/screened-email.js
@@ -5,13 +5,13 @@ import { i18n } from "discourse-i18n";
export default class ScreenedEmail extends EmberObject {
static findAll() {
- return ajax("/admin/logs/screened_emails.json").then(function (
- screened_emails
- ) {
- return screened_emails.map(function (b) {
- return ScreenedEmail.create(b);
- });
- });
+ return ajax("/admin/logs/screened_emails.json").then(
+ function (screened_emails) {
+ return screened_emails.map(function (b) {
+ return ScreenedEmail.create(b);
+ });
+ }
+ );
}
@discourseComputed("action")
diff --git a/app/assets/javascripts/admin/addon/models/screened-url.js b/app/assets/javascripts/admin/addon/models/screened-url.js
index 8b88bd56538..31e571938f3 100644
--- a/app/assets/javascripts/admin/addon/models/screened-url.js
+++ b/app/assets/javascripts/admin/addon/models/screened-url.js
@@ -5,13 +5,13 @@ import { i18n } from "discourse-i18n";
export default class ScreenedUrl extends EmberObject {
static findAll() {
- return ajax("/admin/logs/screened_urls.json").then(function (
- screened_urls
- ) {
- return screened_urls.map(function (b) {
- return ScreenedUrl.create(b);
- });
- });
+ return ajax("/admin/logs/screened_urls.json").then(
+ function (screened_urls) {
+ return screened_urls.map(function (b) {
+ return ScreenedUrl.create(b);
+ });
+ }
+ );
}
@discourseComputed("action")
diff --git a/app/assets/javascripts/admin/addon/models/site-setting.js b/app/assets/javascripts/admin/addon/models/site-setting.js
index 5a5c86f853b..1cb71b2d444 100644
--- a/app/assets/javascripts/admin/addon/models/site-setting.js
+++ b/app/assets/javascripts/admin/addon/models/site-setting.js
@@ -7,26 +7,26 @@ import SettingObjectHelper from "admin/lib/setting-object-helper";
export default class SiteSetting extends EmberObject {
static findAll(params = {}) {
- return ajax("/admin/site_settings", { data: params }).then(function (
- settings
- ) {
- // Group the results by category
- const categories = {};
- settings.site_settings.forEach(function (s) {
- if (!categories[s.category]) {
- categories[s.category] = [];
- }
- categories[s.category].pushObject(SiteSetting.create(s));
- });
-
- return Object.keys(categories).map(function (n) {
- return {
- nameKey: n,
- name: i18n("admin.site_settings.categories." + n),
- siteSettings: categories[n],
- };
- });
- });
+ return ajax("/admin/site_settings", { data: params }).then(
+ function (settings) {
+ // Group the results by category
+ const categories = {};
+ settings.site_settings.forEach(function (s) {
+ if (!categories[s.category]) {
+ categories[s.category] = [];
+ }
+ categories[s.category].pushObject(SiteSetting.create(s));
+ });
+
+ return Object.keys(categories).map(function (n) {
+ return {
+ nameKey: n,
+ name: i18n("admin.site_settings.categories." + n),
+ siteSettings: categories[n],
+ };
+ });
+ }
+ );
}
static update(key, value, opts = {}) {
diff --git a/app/assets/javascripts/admin/addon/templates/api-keys.gjs b/app/assets/javascripts/admin/addon/templates/api-keys.gjs
index b7ef4c64f74..a44a590dc72 100644
--- a/app/assets/javascripts/admin/addon/templates/api-keys.gjs
+++ b/app/assets/javascripts/admin/addon/templates/api-keys.gjs
@@ -4,30 +4,32 @@ import DPageHeader from "discourse/components/d-page-header";
import PluginOutlet from "discourse/components/plugin-outlet";
import { i18n } from "discourse-i18n";
-export default RouteTemplate(<template>
- <PluginOutlet @name="admin-api-keys">
- <DPageHeader
- @titleLabel={{i18n "admin.config.api_keys.title"}}
- @descriptionLabel={{i18n "admin.config.api_keys.header_description"}}
- @hideTabs={{true}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
- @path="/admin/api/keys"
- @label={{i18n "admin.config.api_keys.title"}}
- />
- </:breadcrumbs>
- <:actions as |actions|>
- <actions.Primary
- @route="adminApiKeys.new"
- @label="admin.api_keys.add"
- />
- </:actions>
- </DPageHeader>
+export default RouteTemplate(
+ <template>
+ <PluginOutlet @name="admin-api-keys">
+ <DPageHeader
+ @titleLabel={{i18n "admin.config.api_keys.title"}}
+ @descriptionLabel={{i18n "admin.config.api_keys.header_description"}}
+ @hideTabs={{true}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/api/keys"
+ @label={{i18n "admin.config.api_keys.title"}}
+ />
+ </:breadcrumbs>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminApiKeys.new"
+ @label="admin.api_keys.add"
+ />
+ </:actions>
+ </DPageHeader>
- <div class="admin-container admin-config-page__main-area">
- {{outlet}}
- </div>
- </PluginOutlet>
-</template>);
+ <div class="admin-container admin-config-page__main-area">
+ {{outlet}}
+ </div>
+ </PluginOutlet>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-branding.gjs b/app/assets/javascripts/admin/addon/templates/config-branding.gjs
index 5e521a8e901..efee2e38d32 100644
--- a/app/assets/javascripts/admin/addon/templates/config-branding.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-branding.gjs
@@ -5,32 +5,34 @@ import { i18n } from "discourse-i18n";
import AdminBrandingLogoForm from "admin/components/admin-branding-logo-form";
import AdminConfigAreaCard from "admin/components/admin-config-area-card";
-export default RouteTemplate(<template>
- <div class="admin-config-page">
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.branding.title"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
- @path="/admin/config/branding"
- @label={{i18n "admin.config.branding.title"}}
- />
- </:breadcrumbs>
- </DPageHeader>
- <div class="admin-config-area">
- <div class="admin-config-area__primary-content">
- <AdminConfigAreaCard
- @heading="admin.config.branding.logo.title"
- @collapsable={{true}}
- class="admin-config-area-branding__logo"
- >
- <:content>
- <AdminBrandingLogoForm />
- </:content>
- </AdminConfigAreaCard>
+export default RouteTemplate(
+ <template>
+ <div class="admin-config-page">
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.branding.title"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/branding"
+ @label={{i18n "admin.config.branding.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+ <div class="admin-config-area">
+ <div class="admin-config-area__primary-content">
+ <AdminConfigAreaCard
+ @heading="admin.config.branding.logo.title"
+ @collapsable={{true}}
+ class="admin-config-area-branding__logo"
+ >
+ <:content>
+ <AdminBrandingLogoForm />
+ </:content>
+ </AdminConfigAreaCard>
+ </div>
</div>
</div>
- </div>
-</template>);
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-developer-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-developer-settings.gjs
index 37f1c846d5f..9a4a584d998 100644
--- a/app/assets/javascripts/admin/addon/templates/config-developer-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-developer-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.developer.title"}}
- @descriptionLabel={{i18n "admin.config.developer.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.developer.title"}}
+ @descriptionLabel={{i18n "admin.config.developer.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/developer"
+ @label={{i18n "admin.config.developer.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="developer"
@path="/admin/config/developer"
- @label={{i18n "admin.config.developer.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="developer"
- @path="/admin/config/developer"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-experimental-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-experimental-settings.gjs
index cca6087317e..3aa768ea7da 100644
--- a/app/assets/javascripts/admin/addon/templates/config-experimental-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-experimental-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.experimental.title"}}
- @descriptionLabel={{i18n "admin.config.experimental.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.experimental.title"}}
+ @descriptionLabel={{i18n "admin.config.experimental.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/experimental"
+ @label={{i18n "admin.config.experimental.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="experimental"
@path="/admin/config/experimental"
- @label={{i18n "admin.config.experimental.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="experimental"
- @path="/admin/config/experimental"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-files-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-files-settings.gjs
index 9e408a389b9..6c06c21ec35 100644
--- a/app/assets/javascripts/admin/addon/templates/config-files-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-files-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.files.title"}}
- @descriptionLabel={{i18n "admin.config.files.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.files.title"}}
+ @descriptionLabel={{i18n "admin.config.files.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/files"
+ @label={{i18n "admin.config.files.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="files"
@path="/admin/config/files"
- @label={{i18n "admin.config.files.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="files"
- @path="/admin/config/files"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-fonts-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-fonts-settings.gjs
index 95cec4b8ae2..483a2777b0d 100644
--- a/app/assets/javascripts/admin/addon/templates/config-fonts-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-fonts-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.font_style.title"}}
- @descriptionLabel={{i18n "admin.config.font_style.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.font_style.title"}}
+ @descriptionLabel={{i18n "admin.config.font_style.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/fonts"
+ @label={{i18n "admin.config.font_style.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="fonts"
@path="/admin/config/fonts"
- @label={{i18n "admin.config.font_style.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="fonts"
- @path="/admin/config/fonts"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-group-permissions-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-group-permissions-settings.gjs
index 1faf5ac420d..d63e2561da1 100644
--- a/app/assets/javascripts/admin/addon/templates/config-group-permissions-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-group-permissions-settings.gjs
@@ -4,30 +4,32 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.group_permissions.title"}}
- @descriptionLabel={{i18n
- "admin.config.group_permissions.header_description"
- }}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.group_permissions.title"}}
+ @descriptionLabel={{i18n
+ "admin.config.group_permissions.header_description"
+ }}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/group-permissions"
+ @label={{i18n "admin.config.group_permissions.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="group_permissions"
@path="/admin/config/group-permissions"
- @label={{i18n "admin.config.group_permissions.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="group_permissions"
- @path="/admin/config/group-permissions"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-legal-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-legal-settings.gjs
index 159fa6913b2..41126dac928 100644
--- a/app/assets/javascripts/admin/addon/templates/config-legal-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-legal-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.legal.title"}}
- @descriptionLabel={{i18n "admin.config.legal.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.legal.title"}}
+ @descriptionLabel={{i18n "admin.config.legal.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/legal"
+ @label={{i18n "admin.config.legal.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="legal"
@path="/admin/config/legal"
- @label={{i18n "admin.config.legal.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="legal"
- @path="/admin/config/legal"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-localization-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-localization-settings.gjs
index 093091f2be2..f58ca22789e 100644
--- a/app/assets/javascripts/admin/addon/templates/config-localization-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-localization-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.localization.title"}}
- @descriptionLabel={{i18n "admin.config.localization.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.localization.title"}}
+ @descriptionLabel={{i18n "admin.config.localization.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/localization"
+ @label={{i18n "admin.config.localization.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="localization"
@path="/admin/config/localization"
- @label={{i18n "admin.config.localization.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="localization"
- @path="/admin/config/localization"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-login-and-authentication-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-login-and-authentication-settings.gjs
index 836cadb5f34..67f91043f29 100644
--- a/app/assets/javascripts/admin/addon/templates/config-login-and-authentication-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-login-and-authentication-settings.gjs
@@ -4,30 +4,32 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.login_and_authentication.title"}}
- @descriptionLabel={{i18n
- "admin.config.login_and_authentication.header_description"
- }}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.login_and_authentication.title"}}
+ @descriptionLabel={{i18n
+ "admin.config.login_and_authentication.header_description"
+ }}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/login-and-authentication"
+ @label={{i18n "admin.config.login_and_authentication.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="login"
@path="/admin/config/login-and-authentication"
- @label={{i18n "admin.config.login_and_authentication.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="login"
- @path="/admin/config/login-and-authentication"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-logo-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-logo-settings.gjs
index 4a803a4a307..f6f40b33142 100644
--- a/app/assets/javascripts/admin/addon/templates/config-logo-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-logo-settings.gjs
@@ -5,28 +5,30 @@ import { i18n } from "discourse-i18n";
import AdminBrandingLogoForm from "admin/components/admin-branding-logo-form";
import AdminConfigAreaCard from "admin/components/admin-config-area-card";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.logo.title"}}
- @descriptionLabel={{i18n "admin.config.logo.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
- @path="/admin/config/logo"
- @label={{i18n "admin.config.logo.title"}}
- />
- </:breadcrumbs>
- </DPageHeader>
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.logo.title"}}
+ @descriptionLabel={{i18n "admin.config.logo.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/logo"
+ @label={{i18n "admin.config.logo.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
- <AdminConfigAreaCard
- @heading="admin.config.branding.logo.title"
- @collapsable={{true}}
- class="admin-config-area-branding__logo"
- >
- <:content>
- <AdminBrandingLogoForm />
- </:content>
- </AdminConfigAreaCard>
-</template>);
+ <AdminConfigAreaCard
+ @heading="admin.config.branding.logo.title"
+ @collapsable={{true}}
+ class="admin-config-area-branding__logo"
+ >
+ <:content>
+ <AdminBrandingLogoForm />
+ </:content>
+ </AdminConfigAreaCard>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-navigation-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-navigation-settings.gjs
index 67cff05da3a..6c0b1340cee 100644
--- a/app/assets/javascripts/admin/addon/templates/config-navigation-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-navigation-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.navigation.title"}}
- @descriptionLabel={{i18n "admin.config.navigation.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.navigation.title"}}
+ @descriptionLabel={{i18n "admin.config.navigation.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/navigation"
+ @label={{i18n "admin.config.navigation.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="navigation"
@path="/admin/config/navigation"
- @label={{i18n "admin.config.navigation.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="navigation"
- @path="/admin/config/navigation"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-notifications-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-notifications-settings.gjs
index 959bdd24dc1..fb6e3ac08eb 100644
--- a/app/assets/javascripts/admin/addon/templates/config-notifications-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-notifications-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.notifications.title"}}
- @descriptionLabel={{i18n "admin.config.notifications.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.notifications.title"}}
+ @descriptionLabel={{i18n "admin.config.notifications.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/notifications"
+ @label={{i18n "admin.config.notifications.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="notifications"
@path="/admin/config/notifications"
- @label={{i18n "admin.config.notifications.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="notifications"
- @path="/admin/config/notifications"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-onebox-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-onebox-settings.gjs
index 79088228a14..f45a131a49d 100644
--- a/app/assets/javascripts/admin/addon/templates/config-onebox-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-onebox-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.onebox.title"}}
- @descriptionLabel={{i18n "admin.config.onebox.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.onebox.title"}}
+ @descriptionLabel={{i18n "admin.config.onebox.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/onebox"
+ @label={{i18n "admin.config.onebox.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="onebox"
@path="/admin/config/onebox"
- @label={{i18n "admin.config.onebox.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="onebox"
- @path="/admin/config/onebox"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-other-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-other-settings.gjs
index 86141112e9c..c8b4c72c628 100644
--- a/app/assets/javascripts/admin/addon/templates/config-other-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-other-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.other.title"}}
- @descriptionLabel={{i18n "admin.config.other.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.other.title"}}
+ @descriptionLabel={{i18n "admin.config.other.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/other"
+ @label={{i18n "admin.config.other.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="uncategorized"
@path="/admin/config/other"
- @label={{i18n "admin.config.other.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="uncategorized"
- @path="/admin/config/other"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs
index 21f1beb0037..6c59918dd30 100644
--- a/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-rate-limits-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.rate_limits.title"}}
- @descriptionLabel={{i18n "admin.config.rate_limits.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.rate_limits.title"}}
+ @descriptionLabel={{i18n "admin.config.rate_limits.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/rate-limits"
+ @label={{i18n "admin.config.rate_limits.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="rate_limits"
@path="/admin/config/rate-limits"
- @label={{i18n "admin.config.rate_limits.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="rate_limits"
- @path="/admin/config/rate-limits"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-search-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-search-settings.gjs
index 216fe0f9d56..8b00635dc83 100644
--- a/app/assets/javascripts/admin/addon/templates/config-search-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-search-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.search.title"}}
- @descriptionLabel={{i18n "admin.config.search.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.search.title"}}
+ @descriptionLabel={{i18n "admin.config.search.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/search"
+ @label={{i18n "admin.config.search.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="search"
@path="/admin/config/search"
- @label={{i18n "admin.config.search.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="search"
- @path="/admin/config/search"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-security-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-security-settings.gjs
index b3b9c9d9c78..e8ba162d153 100644
--- a/app/assets/javascripts/admin/addon/templates/config-security-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-security-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.security.title"}}
- @descriptionLabel={{i18n "admin.config.security.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.security.title"}}
+ @descriptionLabel={{i18n "admin.config.security.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/security"
+ @label={{i18n "admin.config.security.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="security"
@path="/admin/config/security"
- @label={{i18n "admin.config.security.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="security"
- @path="/admin/config/security"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-spam-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-spam-settings.gjs
index ca902c547c2..cda141575ff 100644
--- a/app/assets/javascripts/admin/addon/templates/config-spam-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-spam-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.spam.title"}}
- @descriptionLabel={{i18n "admin.config.spam.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.spam.title"}}
+ @descriptionLabel={{i18n "admin.config.spam.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/spam"
+ @label={{i18n "admin.config.spam.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="spam"
@path="/admin/config/spam"
- @label={{i18n "admin.config.spam.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="spam"
- @path="/admin/config/spam"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.gjs
index f34facd0df6..547376c06a6 100644
--- a/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-trust-levels-settings.gjs
@@ -4,29 +4,31 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.trust_levels.title"}}
- @descriptionLabel={{i18n "admin.config.trust_levels.header_description"}}
- @learnMoreUrl="https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/"
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.trust_levels.title"}}
+ @descriptionLabel={{i18n "admin.config.trust_levels.header_description"}}
+ @learnMoreUrl="https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/"
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/trust-levels"
+ @label={{i18n "admin.config.trust_levels.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @area="trust_levels"
@path="/admin/config/trust-levels"
- @label={{i18n "admin.config.trust_levels.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @area="trust_levels"
- @path="/admin/config/trust-levels"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/config-user-api-settings.gjs b/app/assets/javascripts/admin/addon/templates/config-user-api-settings.gjs
index 775e910a31c..6ba43b61250 100644
--- a/app/assets/javascripts/admin/addon/templates/config-user-api-settings.gjs
+++ b/app/assets/javascripts/admin/addon/templates/config-user-api-settings.gjs
@@ -4,28 +4,30 @@ import DPageHeader from "discourse/components/d-page-header";
import { i18n } from "discourse-i18n";
import AdminAreaSettings from "admin/components/admin-area-settings";
-export default RouteTemplate(<template>
- <DPageHeader
- @hideTabs={{true}}
- @titleLabel={{i18n "admin.config.user_api.title"}}
- @descriptionLabel={{i18n "admin.config.user_api.header_description"}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
+export default RouteTemplate(
+ <template>
+ <DPageHeader
+ @hideTabs={{true}}
+ @titleLabel={{i18n "admin.config.user_api.title"}}
+ @descriptionLabel={{i18n "admin.config.user_api.header_description"}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/config/user-api"
+ @label={{i18n "admin.config.user_api.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+
+ <div class="admin-config-page__main-area">
+ <AdminAreaSettings
+ @showBreadcrumb={{false}}
+ @categories="user_api"
@path="/admin/config/user-api"
- @label={{i18n "admin.config.user_api.title"}}
+ @filter={{@controller.filter}}
+ @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
/>
- </:breadcrumbs>
- </DPageHeader>
-
- <div class="admin-config-page__main-area">
- <AdminAreaSettings
- @showBreadcrumb={{false}}
- @categories="user_api"
- @path="/admin/config/user-api"
- @filter={{@controller.filter}}
- @adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
- />
- </div>
-</template>);
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/admin/addon/templates/web-hooks.gjs b/app/assets/javascripts/admin/addon/templates/web-hooks.gjs
index 39b3142b2e6..b6966767818 100644
--- a/app/assets/javascripts/admin/addon/templates/web-hooks.gjs
+++ b/app/assets/javascripts/admin/addon/templates/web-hooks.gjs
@@ -4,32 +4,34 @@ import DPageHeader from "discourse/components/d-page-header";
import PluginOutlet from "discourse/components/plugin-outlet";
import { i18n } from "discourse-i18n";
-export default RouteTemplate(<template>
- <div class="admin-webhooks admin-config-page">
- <DPageHeader
- @titleLabel={{i18n "admin.config.webhooks.title"}}
- @descriptionLabel={{i18n "admin.config.webhooks.header_description"}}
- @hideTabs={{true}}
- >
- <:breadcrumbs>
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem
- @path="/admin/api/web_hooks"
- @label={{i18n "admin.config.webhooks.title"}}
- />
- </:breadcrumbs>
- <:actions as |actions|>
- <actions.Primary
- @route="adminWebHooks.new"
- @label="admin.web_hooks.add"
- />
- </:actions>
- </DPageHeader>
+export default RouteTemplate(
+ <template>
+ <div class="admin-webhooks admin-config-page">
+ <DPageHeader
+ @titleLabel={{i18n "admin.config.webhooks.title"}}
+ @descriptionLabel={{i18n "admin.config.webhooks.header_description"}}
+ @hideTabs={{true}}
+ >
+ <:breadcrumbs>
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/admin/api/web_hooks"
+ @label={{i18n "admin.config.webhooks.title"}}
+ />
+ </:breadcrumbs>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminWebHooks.new"
+ @label="admin.web_hooks.add"
+ />
+ </:actions>
+ </DPageHeader>
- <div class="admin-container admin-config-page__main-area">
- <PluginOutlet @name="admin-web-hooks">
- {{outlet}}
- </PluginOutlet>
+ <div class="admin-container admin-config-page__main-area">
+ <PluginOutlet @name="admin-web-hooks">
+ {{outlet}}
+ </PluginOutlet>
+ </div>
</div>
- </div>
-</template>);
+ </template>
+);
diff --git a/app/assets/javascripts/discourse/app/components/composer-messages.js b/app/assets/javascripts/discourse/app/components/composer-messages.js
index bc68c9c3027..e26a7360731 100644
--- a/app/assets/javascripts/discourse/app/components/composer-messages.js
+++ b/app/assets/javascripts/discourse/app/components/composer-messages.js
@@ -156,9 +156,8 @@ export default class ComposerMessages extends Component {
let usernames = [];
response.usernames.forEach((username, index) => {
- usernames[
- index
- ] = `<a class='mention' href='/u/${username}'>@${username}</a>`;
+ usernames[index] =
+ `<a class='mention' href='/u/${username}'>@${username}</a>`;
});
let body_key;
diff --git a/app/assets/javascripts/discourse/app/components/composer-toggles.js b/app/assets/javascripts/discourse/app/components/composer-toggles.js
index 7fd24dbcf4a..334dc9a03e2 100644
--- a/app/assets/javascripts/discourse/app/components/composer-toggles.js
+++ b/app/assets/javascripts/discourse/app/components/composer-toggles.js
@@ -21,8 +21,8 @@ export default class ComposerToggles extends Component {
return composeState === "draft"
? "composer.open"
: composeState === "fullscreen"
- ? "composer.exit_fullscreen"
- : "composer.enter_fullscreen";
+ ? "composer.exit_fullscreen"
+ : "composer.enter_fullscreen";
}
@discourseComputed("composeState")
@@ -37,8 +37,8 @@ export default class ComposerToggles extends Component {
return composeState === "draft"
? "angles-up"
: composeState === "fullscreen"
- ? "discourse-compress"
- : "discourse-expand";
+ ? "discourse-compress"
+ : "discourse-expand";
}
@discourseComputed("disableTextarea")
diff --git a/app/assets/javascripts/discourse/app/components/date-time-input.js b/app/assets/javascripts/discourse/app/components/date-time-input.js
index 0007b2081df..5f80b512e55 100644
--- a/app/assets/javascripts/discourse/app/components/date-time-input.js
+++ b/app/assets/javascripts/discourse/app/components/date-time-input.js
@@ -30,8 +30,8 @@ export default class DateTimeInput extends Component {
const date = this.date
? this.date
: this.relativeDate
- ? this.relativeDate
- : moment.tz(this.resolvedTimezone);
+ ? this.relativeDate
+ : moment.tz(this.resolvedTimezone);
this.onChange(
moment.tz(
diff --git a/app/assets/javascripts/discourse/app/components/group-selector.js b/app/assets/javascripts/discourse/app/components/group-selector.js
index 51692bd7fc4..4f55b60457c 100644
--- a/app/assets/javascripts/discourse/app/components/group-selector.js
+++ b/app/assets/javascripts/discourse/app/components/group-selector.js
@@ -30,8 +30,8 @@ export default class GroupSelector extends Component {
items: Array.isArray(groupNames)
? groupNames
: isEmpty(groupNames)
- ? []
- : [groupNames],
+ ? []
+ : [groupNames],
single: this.single,
fullWidthWrap: this.fullWidthWrap,
updateData: opts && opts.updateData ? opts.updateData : false,
diff --git a/app/assets/javascripts/discourse/app/components/header/user-dropdown/notifications.gjs b/app/assets/javascripts/discourse/app/components/header/user-dropdown/notifications.gjs
index 8b8ab18fc38..95cdbb58ff2 100644
--- a/app/assets/javascripts/discourse/app/components/header/user-dropdown/notifications.gjs
+++ b/app/assets/javascripts/discourse/app/components/header/user-dropdown/notifications.gjs
@@ -70,7 +70,7 @@ export default class Notifications extends Component {
{{#if this.currentUser.status}}
<UserStatusBubble
- @timezone={{this.this.currentUser.user_option.timezone}}
+ @timezone={{this.currentUser.user_option.timezone}}
@status={{this.currentUser.status}}
/>
{{/if}}
diff --git a/app/assets/javascripts/discourse/app/components/modal/fullscreen-code.hbs b/app/assets/javascripts/discourse/app/components/modal/fullscreen-code.hbs
index 34e078fd09b..9ee649f73f4 100644
--- a/app/assets/javascripts/discourse/app/components/modal/fullscreen-code.hbs
+++ b/app/assets/javascripts/discourse/app/components/modal/fullscreen-code.hbs
@@ -6,7 +6,9 @@
>
<:body>
<pre>
- <code class={{@model.codeClasses}}>{{@model.code}}</code>
+ <code
+ class={{@model.codeClasses}}
+ >{{@model.code}}</code>
</pre>
</:body>
</DModal>
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/components/user-preferences/user-passkeys.gjs b/app/assets/javascripts/discourse/app/components/user-preferences/user-passkeys.gjs
index 6c4cdad5cb6..a981c3d7788 100644
--- a/app/assets/javascripts/discourse/app/components/user-preferences/user-passkeys.gjs
+++ b/app/assets/javascripts/discourse/app/components/user-preferences/user-passkeys.gjs
@@ -82,9 +82,8 @@ export default class UserPasskeys extends Component {
name: i18n("user.passkeys.name.default"),
};
- const registrationResponse = await this.args.model.registerPasskey(
- credentialParam
- );
+ const registrationResponse =
+ await this.args.model.registerPasskey(credentialParam);
if (registrationResponse.error) {
this.dialog.alert(registrationResponse.error);
diff --git a/app/assets/javascripts/discourse/app/form-kit/components/fk/control/input.gjs b/app/assets/javascripts/discourse/app/form-kit/components/fk/control/input.gjs
index 98478089ea0..3fd3e4f218f 100644
--- a/app/assets/javascripts/discourse/app/form-kit/components/fk/control/input.gjs
+++ b/app/assets/javascripts/discourse/app/form-kit/components/fk/control/input.gjs
@@ -52,8 +52,8 @@ export default class FKControlInput extends Component {
event.target.value === ""
? undefined
: this.type === "number"
- ? parseFloat(event.target.value)
- : event.target.value;
+ ? parseFloat(event.target.value)
+ : event.target.value;
this.args.field.set(value);
}
diff --git a/app/assets/javascripts/discourse/app/form-kit/components/fk/field-data.gjs b/app/assets/javascripts/discourse/app/form-kit/components/fk/field-data.gjs
index 91b1a454208..cb35198688a 100644
--- a/app/assets/javascripts/discourse/app/form-kit/components/fk/field-data.gjs
+++ b/app/assets/javascripts/discourse/app/form-kit/components/fk/field-data.gjs
@@ -260,7 +260,5 @@ export default class FKFieldData extends Component {
});
}
- <template>
- {{yield this}}
- </template>
+ <template>{{yield this}}</template>
}
diff --git a/app/assets/javascripts/discourse/app/helpers/element.gjs b/app/assets/javascripts/discourse/app/helpers/element.gjs
index 2a611b85013..08d46a1d00a 100644
--- a/app/assets/javascripts/discourse/app/helpers/element.gjs
+++ b/app/assets/javascripts/discourse/app/helpers/element.gjs
@@ -4,12 +4,24 @@ const empty = <template>
{{! template-lint-disable no-yield-only}}{{yield}}
</template>;
const shortcuts = {
- div: <template><div ...attributes>{{yield}}</div></template>,
- span: <template><span ...attributes>{{yield}}</span></template>,
- form: <template><form ...attributes>{{yield}}</form></template>,
- a: <template><a ...attributes>{{yield}}</a></template>,
- button: <template><button ...attributes>{{yield}}</button></template>,
- td: <template><td ...attributes>{{yield}}</td></template>,
+ div: <template>
+ <div ...attributes>{{yield}}</div>
+ </template>,
+ span: <template>
+ <span ...attributes>{{yield}}</span>
+ </template>,
+ form: <template>
+ <form ...attributes>{{yield}}</form>
+ </template>,
+ a: <template>
+ <a ...attributes>{{yield}}</a>
+ </template>,
+ button: <template>
+ <button ...attributes>{{yield}}</button>
+ </template>,
+ td: <template>
+ <td ...attributes>{{yield}}</td>
+ </template>,
};
/**
diff --git a/app/assets/javascripts/discourse/app/lib/computed.js b/app/assets/javascripts/discourse/app/lib/computed.js
index 7892160be5f..a8db2da5317 100644
--- a/app/assets/javascripts/discourse/app/lib/computed.js
+++ b/app/assets/javascripts/discourse/app/lib/computed.js
@@ -23,10 +23,10 @@ function addonFmt(str, formats) {
return typeof s === "string"
? s
: s === null
- ? "(null)"
- : s === undefined
- ? ""
- : "" + s;
+ ? "(null)"
+ : s === undefined
+ ? ""
+ : "" + s;
});
}
/**
diff --git a/app/assets/javascripts/discourse/app/lib/uploads.js b/app/assets/javascripts/discourse/app/lib/uploads.js
index 8716f9ad670..53a0dd23245 100644
--- a/app/assets/javascripts/discourse/app/lib/uploads.js
+++ b/app/assets/javascripts/discourse/app/lib/uploads.js
@@ -264,8 +264,8 @@ function uploadTypeFromFileName(fileName) {
return isImage(fileName)
? "image"
: isBackup(fileName)
- ? "backup"
- : "attachment";
+ ? "backup"
+ : "attachment";
}
export function allowsImages(staff, siteSettings) {
diff --git a/app/assets/javascripts/discourse/app/static/dev-tools/styles.css b/app/assets/javascripts/discourse/app/static/dev-tools/styles.css
index 314a5fef293..dfca77d114e 100644
--- a/app/assets/javascripts/discourse/app/static/dev-tools/styles.css
+++ b/app/assets/javascripts/discourse/app/static/dev-tools/styles.css
@@ -70,7 +70,8 @@
}
.fw {
- font-family: "Courier New", "Courier", "Lucida Console", "Monaco", monospace;
+ font-family:
+ "Courier New", "Courier", "Lucida Console", "Monaco", monospace;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
diff --git a/app/assets/javascripts/discourse/app/templates/wizard.gjs b/app/assets/javascripts/discourse/app/templates/wizard.gjs
index 6eb3ca18b0d..ed22196a132 100644
--- a/app/assets/javascripts/discourse/app/templates/wizard.gjs
+++ b/app/assets/javascripts/discourse/app/templates/wizard.gjs
@@ -3,12 +3,14 @@ import hideApplicationFooter from "discourse/helpers/hide-application-footer";
import hideApplicationSidebar from "discourse/helpers/hide-application-sidebar";
import DiscourseLogo from "discourse/static/wizard/components/discourse-logo";
-export default RouteTemplate(<template>
- {{hideApplicationSidebar}}
- {{hideApplicationFooter}}
- <div id="wizard-main">
- <DiscourseLogo />
+export default RouteTemplate(
+ <template>
+ {{hideApplicationSidebar}}
+ {{hideApplicationFooter}}
+ <div id="wizard-main">
+ <DiscourseLogo />
- {{outlet}}
- </div>
-</template>);
+ {{outlet}}
+ </div>
+ </template>
+);
diff --git a/app/assets/javascripts/discourse/app/widgets/widget-dropdown.js b/app/assets/javascripts/discourse/app/widgets/widget-dropdown.js
index 8c1d36fbf5f..611edfb896e 100644
--- a/app/assets/javascripts/discourse/app/widgets/widget-dropdown.js
+++ b/app/assets/javascripts/discourse/app/widgets/widget-dropdown.js
@@ -108,10 +108,10 @@ export const WidgetDropdownItemClass = {
attrs.item === "separator"
? "<hr>"
: attrs.item.html
- ? attrs.item.html
- : attrs.item.translatedLabel
- ? attrs.item.translatedLabel
- : i18n(attrs.item.label),
+ ? attrs.item.html
+ : attrs.item.translatedLabel
+ ? attrs.item.translatedLabel
+ : i18n(attrs.item.label),
};
},
diff --git a/app/assets/javascripts/discourse/tests/acceptance/header-api-test.gjs b/app/assets/javascripts/discourse/tests/acceptance/header-api-test.gjs
index 2c06e016380..83e0ae45c3b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/header-api-test.gjs
+++ b/app/assets/javascripts/discourse/tests/acceptance/header-api-test.gjs
@@ -10,9 +10,12 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Header API - anonymous", function () {
test("can add buttons to the header", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerButtons.add("test", <template>
- <button class="test-button">Test</button>
- </template>);
+ api.headerButtons.add(
+ "test",
+ <template>
+ <button class="test-button">Test</button>
+ </template>
+ );
});
await visit("/");
@@ -21,9 +24,12 @@ acceptance("Header API - anonymous", function () {
test("buttons are positioned to the left of the auth buttons by default", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerButtons.add("test", <template>
- <button class="test-button">Test</button>
- </template>);
+ api.headerButtons.add(
+ "test",
+ <template>
+ <button class="test-button">Test</button>
+ </template>
+ );
});
await visit("/");
@@ -38,9 +44,12 @@ acceptance("Header API - anonymous", function () {
test("can add icons to the header", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerIcons.add("test", <template>
- <span class="test-icon">Test</span>
- </template>);
+ api.headerIcons.add(
+ "test",
+ <template>
+ <span class="test-icon">Test</span>
+ </template>
+ );
});
await visit("/");
@@ -49,9 +58,12 @@ acceptance("Header API - anonymous", function () {
test("icons are positioned to the left of search icon by default", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerIcons.add("test", <template>
- <span class="test-icon">Test</span>
- </template>);
+ api.headerIcons.add(
+ "test",
+ <template>
+ <span class="test-icon">Test</span>
+ </template>
+ );
});
await visit("/");
@@ -70,9 +82,12 @@ acceptance("Glimmer Header API - authenticated", function (needs) {
test("can add buttons to the header", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerButtons.add("test", <template>
- <button class="test-button">Test</button>
- </template>);
+ api.headerButtons.add(
+ "test",
+ <template>
+ <button class="test-button">Test</button>
+ </template>
+ );
});
await visit("/");
@@ -81,13 +96,18 @@ acceptance("Glimmer Header API - authenticated", function (needs) {
test("buttons can be repositioned", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerButtons.add("test1", <template>
- <button class="test1-button">Test1</button>
- </template>);
+ api.headerButtons.add(
+ "test1",
+ <template>
+ <button class="test1-button">Test1</button>
+ </template>
+ );
api.headerButtons.add(
"test2",
- <template><button class="test2-button">Test2</button></template>,
+ <template>
+ <button class="test2-button">Test2</button>
+ </template>,
{ before: "test1" }
);
});
@@ -104,9 +124,12 @@ acceptance("Glimmer Header API - authenticated", function (needs) {
test("can add icons to the header", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerIcons.add("test", <template>
- <span class="test-icon">Test</span>
- </template>);
+ api.headerIcons.add(
+ "test",
+ <template>
+ <span class="test-icon">Test</span>
+ </template>
+ );
});
await visit("/");
@@ -115,13 +138,18 @@ acceptance("Glimmer Header API - authenticated", function (needs) {
test("icons can be repositioned", async function (assert) {
withPluginApi("1.29.0", (api) => {
- api.headerIcons.add("test1", <template>
- <span class="test1-icon">Test1</span>
- </template>);
+ api.headerIcons.add(
+ "test1",
+ <template>
+ <span class="test1-icon">Test1</span>
+ </template>
+ );
api.headerIcons.add(
"test2",
- <template><span class="test2-icon">Test2</span></template>,
+ <template>
+ <span class="test2-icon">Test2</span>
+ </template>,
{ before: "test1" }
);
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js
index 63aa84667f8..5e3b1b7e248 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-keyboard-shortcut-test.js
@@ -11,9 +11,8 @@ acceptance("Plugin Keyboard Shortcuts - Logged In", function (needs) {
test("a plugin can add a keyboard shortcut", async function (assert) {
withPluginApi("0.8.38", (api) => {
api.addKeyboardShortcut("]", () => {
- document.querySelector(
- "#qunit-fixture"
- ).innerHTML = `<div id="added-element">Test adding plugin shortcut</div>`;
+ document.querySelector("#qunit-fixture").innerHTML =
+ `<div id="added-element">Test adding plugin shortcut</div>`;
});
});
diff --git a/app/assets/javascripts/discourse/tests/helpers/rich-editor-helper.gjs b/app/assets/javascripts/discourse/tests/helpers/rich-editor-helper.gjs
index 52900d53bde..05ee0f6360b 100644
--- a/app/assets/javascripts/discourse/tests/helpers/rich-editor-helper.gjs
+++ b/app/assets/javascripts/discourse/tests/helpers/rich-editor-helper.gjs
@@ -16,13 +16,15 @@ export async function testMarkdown(
self.view = textManipulation.view;
};
- await render(<template>
- <DEditor
- @value={{self.value}}
- @processPreview={{false}}
- @onSetup={{handleSetup}}
- />
- </template>);
+ await render(
+ <template>
+ <DEditor
+ @value={{self.value}}
+ @processPreview={{false}}
+ @onSetup={{handleSetup}}
+ />
+ </template>
+ );
await click(".composer-toggle-switch");
await waitFor(".ProseMirror");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.gjs
index d1ce7d1eb87..e486bbfd2cd 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/ace-editor-test.gjs
@@ -7,65 +7,77 @@ module("Integration | Component | ace-editor", function (hooks) {
setupRenderingTest(hooks);
test("css editor", async function (assert) {
- await render(<template>
- <AceEditor @mode="css" style="width: 300px; height: 200px" />
- </template>);
+ await render(
+ <template>
+ <AceEditor @mode="css" style="width: 300px; height: 200px" />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
});
test("html editor", async function (assert) {
- await render(<template>
- <AceEditor
- @mode="html"
- @content="<b>wat</b>"
- style="width: 300px; height: 200px"
- />
- </template>);
+ await render(
+ <template>
+ <AceEditor
+ @mode="html"
+ @content="<b>wat</b>"
+ style="width: 300px; height: 200px"
+ />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
});
test("sql editor", async function (assert) {
- await render(<template>
- <AceEditor
- @mode="sql"
- @content="SELECT * FROM users"
- style="width: 300px; height: 200px"
- />
- </template>);
+ await render(
+ <template>
+ <AceEditor
+ @mode="sql"
+ @content="SELECT * FROM users"
+ style="width: 300px; height: 200px"
+ />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
});
test("yaml editor", async function (assert) {
- await render(<template>
- <AceEditor
- @mode="yaml"
- @content="test: true"
- style="width: 300px; height: 200px"
- />
- </template>);
+ await render(
+ <template>
+ <AceEditor
+ @mode="yaml"
+ @content="test: true"
+ style="width: 300px; height: 200px"
+ />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
});
test("javascript editor", async function (assert) {
- await render(<template>
- <AceEditor
- @mode="javascript"
- @content="test: true"
- style="width: 300px; height: 200px"
- />
- </template>);
+ await render(
+ <template>
+ <AceEditor
+ @mode="javascript"
+ @content="test: true"
+ style="width: 300px; height: 200px"
+ />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
});
test("disabled editor", async function (assert) {
- await render(<template>
- <AceEditor
- @mode="sql"
- @content="SELECT * FROM users"
- @disabled={{true}}
- style="width: 300px; height: 200px"
- />
- </template>);
+ await render(
+ <template>
+ <AceEditor
+ @mode="sql"
+ @content="SELECT * FROM users"
+ @disabled={{true}}
+ style="width: 300px; height: 200px"
+ />
+ </template>
+ );
assert.dom(".ace_editor").exists("it renders the ace editor");
assert
diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-area-settings-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/admin-area-settings-test.gjs
index aa38926a0a6..4cae17a85a9 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/admin-area-settings-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/admin-area-settings-test.gjs
@@ -66,13 +66,15 @@ module("Integration | Component | AdminAreaSettings", function (hooks) {
test("renders area settings and allows to filter", async function (assert) {
const callback = () => {};
- await render(<template>
- <AdminAreaSettings
- @area="flags"
- @adminSettingsFilterChangedCallback={{callback}}
- @filter=""
- />
- </template>);
+ await render(
+ <template>
+ <AdminAreaSettings
+ @area="flags"
+ @adminSettingsFilterChangedCallback={{callback}}
+ @filter=""
+ />
+ </template>
+ );
assert.dom(".admin-site-settings-filter-controls").exists();
assert.dom(".setting-label").exists({ count: 2 });
diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-section-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-section-test.gjs
index 4aa85277b84..265dafffb4a 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-section-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-section-test.gjs
@@ -9,10 +9,12 @@ module(
setupRenderingTest(hooks);
test("renders admin config area card section without toggle button", async function (assert) {
- await render(<template>
- <AdminConfigAreaCardSection @heading="test heading"><:content
- >test</:content></AdminConfigAreaCardSection>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCardSection @heading="test heading"><:content
+ >test</:content></AdminConfigAreaCardSection>
+ </template>
+ );
assert
.dom(".admin-config-area-card-section__title")
@@ -24,12 +26,14 @@ module(
});
test("renders admin config area card section with toggle button", async function (assert) {
- await render(<template>
- <AdminConfigAreaCardSection
- @heading="test heading"
- @collapsable={{true}}
- ><:content>test</:content></AdminConfigAreaCardSection>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCardSection
+ @heading="test heading"
+ @collapsable={{true}}
+ ><:content>test</:content></AdminConfigAreaCardSection>
+ </template>
+ );
assert
.dom(".admin-config-area-card-section__title")
@@ -45,13 +49,15 @@ module(
});
test("renders admin config area card section with toggle button and collapsed by default", async function (assert) {
- await render(<template>
- <AdminConfigAreaCardSection
- @heading="test heading"
- @collapsable={{true}}
- @collapsed={{true}}
- ><:content>test</:content></AdminConfigAreaCardSection>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCardSection
+ @heading="test heading"
+ @collapsable={{true}}
+ @collapsed={{true}}
+ ><:content>test</:content></AdminConfigAreaCardSection>
+ </template>
+ );
assert.dom(".admin-config-area-card-section__title").exists();
assert.dom(".admin-config-area-card-section__toggle-button").exists();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-test.gjs
index 96298a0ef84..521ede4dc63 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/admin-config-area-card-test.gjs
@@ -7,10 +7,12 @@ module("Integration | Component | AdminConfigAreaCard", function (hooks) {
setupRenderingTest(hooks);
test("renders admin config area card without toggle button", async function (assert) {
- await render(<template>
- <AdminConfigAreaCard @translatedHeading="test heading"><:content
- >test</:content></AdminConfigAreaCard>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCard @translatedHeading="test heading"><:content
+ >test</:content></AdminConfigAreaCard>
+ </template>
+ );
assert.dom(".admin-config-area-card__title").exists();
assert.dom(".admin-config-area-card__content").exists();
@@ -18,12 +20,14 @@ module("Integration | Component | AdminConfigAreaCard", function (hooks) {
});
test("renders admin config area card with toggle button", async function (assert) {
- await render(<template>
- <AdminConfigAreaCard
- @translatedHeading="test heading"
- @collapsable={{true}}
- ><:content>test</:content></AdminConfigAreaCard>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCard
+ @translatedHeading="test heading"
+ @collapsable={{true}}
+ ><:content>test</:content></AdminConfigAreaCard>
+ </template>
+ );
assert.dom(".admin-config-area-card__title").exists();
assert.dom(".admin-config-area-card__content").exists();
@@ -37,13 +41,15 @@ module("Integration | Component | AdminConfigAreaCard", function (hooks) {
});
test("renders admin config area card with toggle button and collapsed by default", async function (assert) {
- await render(<template>
- <AdminConfigAreaCard
- @translatedHeading="test heading"
- @collapsable={{true}}
- @collapsed={{true}}
- ><:content>test</:content></AdminConfigAreaCard>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCard
+ @translatedHeading="test heading"
+ @collapsable={{true}}
+ @collapsed={{true}}
+ ><:content>test</:content></AdminConfigAreaCard>
+ </template>
+ );
assert.dom(".admin-config-area-card__title").exists();
assert.dom(".admin-config-area-card__toggle-button").exists();
@@ -51,14 +57,16 @@ module("Integration | Component | AdminConfigAreaCard", function (hooks) {
});
test("renders admin config area card with header action", async function (assert) {
- await render(<template>
- <AdminConfigAreaCard
- @translatedHeading="test heading"
- @collapsable={{true}}
- >
- <:headerAction><button>test</button></:headerAction>
- <:content>test</:content></AdminConfigAreaCard>
- </template>);
+ await render(
+ <template>
+ <AdminConfigAreaCard
+ @translatedHeading="test heading"
+ @collapsable={{true}}
+ >
+ <:headerAction><button>test</button></:headerAction>
+ <:content>test</:content></AdminConfigAreaCard>
+ </template>
+ );
assert.dom(".admin-config-area-card__header-action button").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-schema-theme-setting/editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/admin-schema-theme-setting/editor-test.gjs
index f28bcc09925..6e4e7f8e8b5 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/admin-schema-theme-setting/editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/admin-schema-theme-setting/editor-test.gjs
@@ -89,9 +89,11 @@ module(
test("activates the first node by default", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -103,9 +105,11 @@ module(
test("renders the 2nd level of nested items for the active item only", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -146,9 +150,11 @@ module(
test("allows navigating through multiple levels of nesting", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -236,9 +242,11 @@ module(
test("the back button is only shown when the navigation is at least one level deep", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
assert.dom(".--back-btn").doesNotExist();
@@ -271,9 +279,11 @@ module(
test("the back button navigates to the index of the active element at the previous level", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
await click(tree.nodes[1].element);
@@ -298,9 +308,11 @@ module(
test("the back button label includes the name of the item at the previous level", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
await click(tree.nodes[1].element);
@@ -358,9 +370,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -380,9 +394,11 @@ module(
test("input fields for items at different levels", async function (assert) {
const setting = schemaAndData(2);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -448,9 +464,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -502,9 +520,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -568,9 +588,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -613,9 +635,11 @@ module(
test("input fields of type boolean", async function (assert) {
const setting = schemaAndData(3);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
assert
@@ -669,9 +693,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -732,9 +758,11 @@ module(
value: [{}],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -809,9 +837,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -870,9 +900,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -926,9 +958,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -1020,9 +1054,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
@@ -1126,9 +1162,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -1147,9 +1185,11 @@ module(
test("identifier field instantly updates in the navigation tree when the input field is changed", async function (assert) {
const setting = schemaAndData(2);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
const tree = new TreeFromDOM();
@@ -1181,9 +1221,11 @@ module(
test("edits are remembered when navigating between levels", async function (assert) {
const setting = schemaAndData(2);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const inputFields = new InputFieldsFromDOM();
const tree = new TreeFromDOM();
@@ -1255,9 +1297,11 @@ module(
value: [],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
assert.dom(TOP_LEVEL_ADD_BTN).hasText("something");
await click(TOP_LEVEL_ADD_BTN);
@@ -1274,9 +1318,11 @@ module(
test("adding an object to the root list of objects", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
assert.dom(TOP_LEVEL_ADD_BTN).hasText("level1");
@@ -1333,9 +1379,11 @@ module(
],
});
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -1353,9 +1401,11 @@ module(
test("adding an object to a child list of objects", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -1380,9 +1430,11 @@ module(
test("navigating 1 level deep and adding an object to the child list of objects that's displayed as the root list", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -1404,9 +1456,11 @@ module(
test("navigating 1 level deep and adding an object to a grandchild list of objects", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
@@ -1426,9 +1480,11 @@ module(
test("removing an object from the root list of objects", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
const inputFields = new InputFieldsFromDOM();
@@ -1461,9 +1517,11 @@ module(
test("navigating 1 level deep and removing an object from the child list of objects", async function (assert) {
const setting = schemaAndData(1);
- await render(<template>
- <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
- </template>);
+ await render(
+ <template>
+ <AdminSchemaThemeSettingEditor @themeId="1" @setting={{setting}} />
+ </template>
+ );
const tree = new TreeFromDOM();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.gjs
index f3ad007b861..e228110cab3 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/admin-theme-settings-editor-test.gjs
@@ -18,9 +18,9 @@ module(
},
};
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
assert.dom(".ace_line").hasText("[");
});
@@ -28,9 +28,9 @@ module(
test("input is valid json", async function (assert) {
const model = [];
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
await fillIn(".ace textarea", "foo");
await click("button#save");
@@ -41,9 +41,9 @@ module(
test("'setting' key is present for each setting", async function (assert) {
const model = [];
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
await fillIn(".ace textarea", `[{ "value": "value1" }]`);
await click("button#save");
@@ -54,9 +54,9 @@ module(
test("'value' key is present for each setting", async function (assert) {
const model = [];
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
await fillIn(".ace textarea", `[{ "setting": "setting1" }]`);
await click("button#save");
@@ -67,9 +67,9 @@ module(
test("only 'setting' and 'value' keys are present, no others", async function (assert) {
const model = [];
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
await fillIn(".ace textarea", `[{ "other_key": "other-key-1" }]`);
await click("button#save");
@@ -84,9 +84,9 @@ module(
},
};
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
find(".ace").aceEditor.session.doc.setValue(
JSON.stringify([{ setting: "bar", value: "bar" }])
@@ -107,9 +107,9 @@ module(
},
};
- await render(<template>
- <ThemeSettingsEditor @model={{model}} />
- </template>);
+ await render(
+ <template><ThemeSettingsEditor @model={{model}} /></template>
+ );
find(".ace").aceEditor.session.doc.setValue(
JSON.stringify([
diff --git a/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs
index 0b41a14cfd8..ff64496add3 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/async-content-test.gjs
@@ -17,13 +17,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it accepts a promise", async function (assert) {
const promise = Promise.resolve("data");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.true(true, "no error is thrown");
assert.dom(".content").hasText("data");
@@ -32,13 +34,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it accepts a function that returns a promise", async function (assert) {
const promise = () => Promise.resolve("data");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.true(true, "no error is thrown");
assert.dom(".content").hasText("data");
@@ -47,13 +51,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it accepts an RsvpPromise", async function (assert) {
const promise = RsvpPromise.resolve("data");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").hasText("data");
});
@@ -61,13 +67,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it accepts an async function", async function (assert) {
const promise = async () => "data";
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").hasText("data");
});
@@ -75,13 +83,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it accepts an instance of TrackedAsyncData", async function (assert) {
const promise = new TrackedAsyncData(Promise.resolve("data"));
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").hasText("data");
});
@@ -94,13 +104,15 @@ module("Integration | Component | AsyncContent", function (hooks) {
return Promise.resolve("data");
};
- await render(<template>
- <AsyncContent @asyncData={{promise}} @context="correct">
- <:content as |data|>
- <div class="content">{{data}}</div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}} @context="correct">
+ <:content as |data|>
+ <div class="content">{{data}}</div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").hasText("data");
});
@@ -143,15 +155,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
let resolvePromise;
const promise = new Promise((resolve) => (resolvePromise = resolve));
- const renderPromise = render(<template>
- <div data-async-content-test>
- <AsyncContent @asyncData={{promise}}>
- <:content>
- <div class="content"></div>
- </:content>
- </AsyncContent>
- </div>
- </template>);
+ const renderPromise = render(
+ <template>
+ <div data-async-content-test>
+ <AsyncContent @asyncData={{promise}}>
+ <:content>
+ <div class="content"></div>
+ </:content>
+ </AsyncContent>
+ </div>
+ </template>
+ );
// TrackedAsyncData is tangled with Ember's run loop, so we need to wait for the result of the rendering
// instead to check the loading state.
@@ -168,19 +182,21 @@ module("Integration | Component | AsyncContent", function (hooks) {
let resolvePromise;
const promise = new Promise((resolve) => (resolvePromise = resolve));
- const renderPromise = render(<template>
- <div data-async-content-test>
- <AsyncContent @asyncData={{promise}}>
- <:loading>
- <div class="loading-provided"></div>
- </:loading>
+ const renderPromise = render(
+ <template>
+ <div data-async-content-test>
+ <AsyncContent @asyncData={{promise}}>
+ <:loading>
+ <div class="loading-provided"></div>
+ </:loading>
- <:content>
- <div class="content"></div>
- </:content>
- </AsyncContent>
- </div>
- </template>);
+ <:content>
+ <div class="content"></div>
+ </:content>
+ </AsyncContent>
+ </div>
+ </template>
+ );
// TrackedAsyncData is tangled with Ember's run loop, so we need to wait for the result of the rendering
// instead to check the loading state.
@@ -198,15 +214,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays the block once the promise is fulfilled", async function (assert) {
const promise = Promise.resolve("data returned");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">
- {{data}}
- </div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">
+ {{data}}
+ </div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").exists();
assert.dom(".content").hasText("data returned");
@@ -215,15 +233,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it does not display the block if the promise fails", async function (assert) {
const promise = Promise.reject("error");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content as |data|>
- <div class="content">
- {{data}}
- </div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content as |data|>
+ <div class="content">
+ {{data}}
+ </div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").doesNotExist();
});
@@ -233,15 +253,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays the block when the promise is resolved with an empty value", async function (assert) {
const promise = Promise.resolve(null);
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:empty>
- <div class="empty">
- Empty
- </div>
- </:empty>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:empty>
+ <div class="empty">
+ Empty
+ </div>
+ </:empty>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".empty").exists();
});
@@ -249,15 +271,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it does not display the block when the promise is resolved with a value", async function (assert) {
const promise = Promise.resolve("data");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:empty>
- <div class="empty">
- Empty
- </div>
- </:empty>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:empty>
+ <div class="empty">
+ Empty
+ </div>
+ </:empty>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".empty").doesNotExist();
});
@@ -265,15 +289,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays the content block if the the empty block is not provided", async function (assert) {
const promise = Promise.resolve(null);
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:content>
- <div class="content">
- Empty
- </div>
- </:content>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:content>
+ <div class="content">
+ Empty
+ </div>
+ </:content>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".content").exists();
});
@@ -281,15 +307,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it does not display the block if the promise fails", async function (assert) {
const promise = Promise.reject("error");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:empty>
- <div class="empty">
- Empty
- </div>
- </:empty>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:empty>
+ <div class="empty">
+ Empty
+ </div>
+ </:empty>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".empty").doesNotExist();
});
@@ -299,9 +327,9 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays an inline error dialog when the block is not provided", async function (assert) {
const promise = Promise.reject("error");
- await render(<template>
- <AsyncContent @asyncData={{promise}} />
- </template>);
+ await render(
+ <template><AsyncContent @asyncData={{promise}} /></template>
+ );
assert.dom(".alert-error").exists();
assert.dom(".alert-error").hasText("Sorry, an error has occurred.");
@@ -310,10 +338,12 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays a popup error dialog when the block is not provided", async function (assert) {
const promise = Promise.reject("error");
- await render(<template>
- <AsyncContent @asyncData={{promise}} @errorMode="popup" />
- <DialogHolder />
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}} @errorMode="popup" />
+ <DialogHolder />
+ </template>
+ );
assert.dom(".dialog-body").exists();
assert.dom(".dialog-body").hasText("Sorry, an error has occurred.");
@@ -322,15 +352,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it displays the block when the promise is rejected", async function (assert) {
const promise = Promise.reject("error");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:error as |error|>
- <div class="error">
- {{error}}
- </div>
- </:error>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:error as |error|>
+ <div class="error">
+ {{error}}
+ </div>
+ </:error>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".error").exists();
assert.dom(".error").hasText("error");
@@ -339,15 +371,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it does not display the block when the promise is resolved", async function (assert) {
const promise = Promise.resolve("data");
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:error as |error|>
- <div class="error">
- {{error}}
- </div>
- </:error>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:error as |error|>
+ <div class="error">
+ {{error}}
+ </div>
+ </:error>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".error").doesNotExist();
});
@@ -355,15 +389,17 @@ module("Integration | Component | AsyncContent", function (hooks) {
test("it does not display the block when the promise is resolved with an empty value", async function (assert) {
const promise = Promise.resolve(null);
- await render(<template>
- <AsyncContent @asyncData={{promise}}>
- <:error as |error|>
- <div class="error">
- {{error}}
- </div>
- </:error>
- </AsyncContent>
- </template>);
+ await render(
+ <template>
+ <AsyncContent @asyncData={{promise}}>
+ <:error as |error|>
+ <div class="error">
+ {{error}}
+ </div>
+ </:error>
+ </AsyncContent>
+ </template>
+ );
assert.dom(".error").doesNotExist();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/avatar-uploader-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/avatar-uploader-test.gjs
index 103ed7abf73..500da1e3498 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/avatar-uploader-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/avatar-uploader-test.gjs
@@ -21,9 +21,11 @@ module("Integration | Component | avatar-uploader", function (hooks) {
done();
};
- await render(<template>
- <AvatarUploader @id="avatar-uploader" @done={{callback}} />
- </template>);
+ await render(
+ <template>
+ <AvatarUploader @id="avatar-uploader" @done={{callback}} />
+ </template>
+ );
await this.container
.lookup("service:app-events")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/chart-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/chart-test.gjs
index 24166f26c4d..41b09e5302f 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/chart-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/chart-test.gjs
@@ -54,7 +54,11 @@ module("Integration | Component | Chart", function (hooks) {
};
const chartConfig = generateChartConfig(this.model);
- await render(<template><canvas class="empty-canvas"></canvas></template>);
+ await render(
+ <template>
+ <canvas class="empty-canvas"></canvas>
+ </template>
+ );
const emptyCanvasDataURL = await renderAsPNGURL(
document.querySelector("canvas.empty-canvas")
);
@@ -81,9 +85,9 @@ module("Integration | Component | Chart", function (hooks) {
testState.chartConfig = generateChartConfig(this.model);
- await render(<template>
- <Chart @chartConfig={{testState.chartConfig}} />
- </template>);
+ await render(
+ <template><Chart @chartConfig={{testState.chartConfig}} /></template>
+ );
const firstCanvasDataURL = await renderAsPNGURL(
document.querySelector("canvas.chart-canvas")
);
diff --git a/app/assets/javascripts/discourse/tests/integration/components/color-palette-editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/color-palette-editor-test.gjs
index 45ee88bdc2c..39230c16da3 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/color-palette-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/color-palette-editor-test.gjs
@@ -100,9 +100,9 @@ module("Integration | Component | ColorPaletteEditor", function (hooks) {
},
];
- await render(<template>
- <ColorPaletteEditor @colors={{colors}} />
- </template>);
+ await render(
+ <template><ColorPaletteEditor @colors={{colors}} /></template>
+ );
assert.true(
this.subject.isActiveModeLight(),
@@ -180,9 +180,9 @@ module("Integration | Component | ColorPaletteEditor", function (hooks) {
},
];
- await render(<template>
- <ColorPaletteEditor @colors={{colors}} />
- </template>);
+ await render(
+ <template><ColorPaletteEditor @colors={{colors}} /></template>
+ );
assert.strictEqual(
this.subject.color("my_awesome_color").displayName(),
@@ -219,13 +219,15 @@ module("Integration | Component | ColorPaletteEditor", function (hooks) {
darkChanges.push([name, value]);
};
- await render(<template>
- <ColorPaletteEditor
- @colors={{colors}}
- @onLightColorChange={{onLightColorChange}}
- @onDarkColorChange={{onDarkColorChange}}
- />
- </template>);
+ await render(
+ <template>
+ <ColorPaletteEditor
+ @colors={{colors}}
+ @onLightColorChange={{onLightColorChange}}
+ @onDarkColorChange={{onDarkColorChange}}
+ />
+ </template>
+ );
await this.subject.color("primary").sendInputEvent("#abcdef");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/create-invite-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/create-invite-test.gjs
index b5bdadc6cd8..d4dbae46407 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/create-invite-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/create-invite-test.gjs
@@ -10,9 +10,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
test("typing an email address in the restrictTo field", async function (assert) {
const model = {};
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
@@ -62,9 +62,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.currentUser.admin = true;
this.siteSettings.must_approve_users = true;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.false(
@@ -73,9 +73,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
);
this.siteSettings.must_approve_users = false;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.true(
@@ -85,9 +85,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.currentUser.set("admin", false);
this.currentUser.set("moderator", false);
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.false(
@@ -100,9 +100,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
const model = {};
this.siteSettings.invite_link_max_redemptions_limit_users = 11;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.strictEqual(
@@ -113,9 +113,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.siteSettings.invite_link_max_redemptions_limit_users = 9;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.strictEqual(
@@ -130,9 +130,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.currentUser.set("moderator", true);
this.siteSettings.invite_link_max_redemptions_limit = 111;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.strictEqual(
@@ -143,9 +143,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.siteSettings.invite_link_max_redemptions_limit = 98;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.strictEqual(
@@ -159,9 +159,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
const model = {};
this.siteSettings.invite_expiry_days = 3;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.deepEqual(
@@ -172,9 +172,9 @@ module("Integration | Component | CreateInvite", function (hooks) {
this.siteSettings.invite_expiry_days = 90;
- await render(<template>
- <CreateInvite @inline={{true}} @model={{model}} />
- </template>);
+ await render(
+ <template><CreateInvite @inline={{true}} @model={{model}} /></template>
+ );
await click(".edit-link-options");
assert.deepEqual(
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-breadcrumbs-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-breadcrumbs-test.gjs
index e2f509cb0c0..85fe5eb82a2 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-breadcrumbs-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-breadcrumbs-test.gjs
@@ -11,11 +11,16 @@ module(
setupRenderingTest(hooks);
test("it renders a DBreadcrumbsContainer with multiple DBreadcrumbsItems", async function (assert) {
- await render(<template>
- <DBreadcrumbsContainer />
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- <DBreadcrumbsItem @path="/about" @label={{i18n "about.simple_title"}} />
- </template>);
+ await render(
+ <template>
+ <DBreadcrumbsContainer />
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ <DBreadcrumbsItem
+ @path="/about"
+ @label={{i18n "about.simple_title"}}
+ />
+ </template>
+ );
assert
.dom(".d-breadcrumbs .d-breadcrumbs__item .d-breadcrumbs__link")
@@ -23,13 +28,15 @@ module(
});
test("it renders a DBreadcrumbsItem with additional link and item classes", async function (assert) {
- await render(<template>
- <DBreadcrumbsContainer
- @additionalLinkClasses="some-class"
- @additionalItemClasses="other-class"
- />
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- </template>);
+ await render(
+ <template>
+ <DBreadcrumbsContainer
+ @additionalLinkClasses="some-class"
+ @additionalItemClasses="other-class"
+ />
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ </template>
+ );
assert.dom(".d-breadcrumbs .d-breadcrumbs__item.other-class").exists();
assert
@@ -40,11 +47,13 @@ module(
});
test("it renders multiple DBreadcrumbsContainer elements with the same DBreadcrumbsItem links", async function (assert) {
- await render(<template>
- <DBreadcrumbsContainer />
- <DBreadcrumbsContainer />
- <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
- </template>);
+ await render(
+ <template>
+ <DBreadcrumbsContainer />
+ <DBreadcrumbsContainer />
+ <DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
+ </template>
+ );
assert.dom(".d-breadcrumbs").exists({ count: 2 });
assert.dom(".d-breadcrumbs .d-breadcrumbs__item").exists({ count: 2 });
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-modal-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-modal-test.gjs
index 2afe6ef5999..31b6ff88e9a 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-modal-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-modal-test.gjs
@@ -12,29 +12,33 @@ module("Integration | Component | d-modal", function (hooks) {
setupRenderingTest(hooks);
test("title and subtitle", async function (assert) {
- await render(<template>
- <DModal
- @inline={{true}}
- @title="Modal Title"
- @subtitle="Modal Subtitle"
- />
- </template>);
+ await render(
+ <template>
+ <DModal
+ @inline={{true}}
+ @title="Modal Title"
+ @subtitle="Modal Subtitle"
+ />
+ </template>
+ );
assert.dom(".d-modal .d-modal__title-text").hasText("Modal Title");
assert.dom(".d-modal .d-modal__subtitle-text").hasText("Modal Subtitle");
});
test("named blocks", async function (assert) {
- await render(<template>
- <DModal @inline={{true}}>
- <:aboveHeader>aboveHeaderContent</:aboveHeader>
- <:headerAboveTitle>headerAboveTitleContent</:headerAboveTitle>
- <:headerBelowTitle>headerBelowTitleContent</:headerBelowTitle>
- <:belowHeader>belowHeaderContent</:belowHeader>
- <:body>bodyContent</:body>
- <:footer>footerContent</:footer>
- <:belowFooter>belowFooterContent</:belowFooter>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}}>
+ <:aboveHeader>aboveHeaderContent</:aboveHeader>
+ <:headerAboveTitle>headerAboveTitleContent</:headerAboveTitle>
+ <:headerBelowTitle>headerBelowTitleContent</:headerBelowTitle>
+ <:belowHeader>belowHeaderContent</:belowHeader>
+ <:body>bodyContent</:body>
+ <:footer>footerContent</:footer>
+ <:belowFooter>belowFooterContent</:belowFooter>
+ </DModal>
+ </template>
+ );
assert.dom(".d-modal").includesText("aboveHeaderContent");
assert.dom(".d-modal").includesText("headerAboveTitleContent");
@@ -46,53 +50,67 @@ module("Integration | Component | d-modal", function (hooks) {
});
test("headerPrimaryAction block", async function (assert) {
- await render(<template>
- <DModal @inline={{true}} @title="test">
- <:headerPrimaryAction>headerPrimaryActionContent</:headerPrimaryAction>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @title="test">
+ <:headerPrimaryAction
+ >headerPrimaryActionContent</:headerPrimaryAction>
+ </DModal>
+ </template>
+ );
assert.dom(".d-modal").doesNotIncludeText("headerPrimaryActionContent");
- await render(<template>
- <DModal @inline={{true}} @title="test" @closeModal={{noop}}>
- <:headerPrimaryAction>headerPrimaryActionContent</:headerPrimaryAction>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @title="test" @closeModal={{noop}}>
+ <:headerPrimaryAction
+ >headerPrimaryActionContent</:headerPrimaryAction>
+ </DModal>
+ </template>
+ );
assert.dom(".d-modal").doesNotIncludeText("headerPrimaryActionContent");
this.site.mobileView = true;
- await render(<template>
- <DModal @inline={{true}} @title="test" @closeModal={{noop}}>
- <:headerPrimaryAction>headerPrimaryActionContent</:headerPrimaryAction>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @title="test" @closeModal={{noop}}>
+ <:headerPrimaryAction
+ >headerPrimaryActionContent</:headerPrimaryAction>
+ </DModal>
+ </template>
+ );
assert.dom(".d-modal").includesText("headerPrimaryActionContent");
assert.dom(".d-modal__dismiss-action-button").exists();
- await render(<template>
- <DModal @inline={{true}} @title="test">
- <:headerPrimaryAction>headerPrimaryActionContent</:headerPrimaryAction>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @title="test">
+ <:headerPrimaryAction
+ >headerPrimaryActionContent</:headerPrimaryAction>
+ </DModal>
+ </template>
+ );
assert.dom(".d-modal__dismiss-action-button").doesNotExist();
});
test("flash", async function (assert) {
- await render(<template>
- <DModal @inline={{true}} @flash="Some message" />
- </template>);
+ await render(
+ <template><DModal @inline={{true}} @flash="Some message" /></template>
+ );
assert.dom(".d-modal .alert").hasText("Some message");
});
test("flash type", async function (assert) {
- await render(<template>
- <DModal @inline={{true}} @flash="Some message" @flashType="success" />
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @flash="Some message" @flashType="success" />
+ </template>
+ );
assert.dom(".d-modal .alert").hasClass("alert-success");
});
@@ -108,13 +126,15 @@ module("Integration | Component | d-modal", function (hooks) {
const testState = new TestState();
testState.dismissable = false;
- await render(<template>
- <DModal
- @inline={{true}}
- @closeModal={{testState.closeModal}}
- @dismissable={{testState.dismissable}}
- />
- </template>);
+ await render(
+ <template>
+ <DModal
+ @inline={{true}}
+ @closeModal={{testState.closeModal}}
+ @dismissable={{testState.dismissable}}
+ />
+ </template>
+ );
assert
.dom(".d-modal .modal-close")
@@ -134,14 +154,16 @@ module("Integration | Component | d-modal", function (hooks) {
});
test("header and body classes", async function (assert) {
- await render(<template>
- <DModal
- @inline={{true}}
- @bodyClass="my-body-class"
- @headerClass="my-header-class"
- @title="Hello world"
- />
- </template>);
+ await render(
+ <template>
+ <DModal
+ @inline={{true}}
+ @bodyClass="my-body-class"
+ @headerClass="my-header-class"
+ @title="Hello world"
+ />
+ </template>
+ );
assert.dom(".d-modal .d-modal__header").hasClass("my-header-class");
assert.dom(".d-modal .d-modal__body").hasClass("my-body-class");
@@ -154,16 +176,18 @@ module("Integration | Component | d-modal", function (hooks) {
submittedFormData = new FormData(event.currentTarget);
};
- await render(<template>
- <DModal @inline={{true}} @tagName="form" {{on "submit" handleSubmit}}>
- <:body>
- <input type="text" name="name" value="John Doe" />
- </:body>
- <:footer>
- <button type="submit">Submit</button>
- </:footer>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}} @tagName="form" {{on "submit" handleSubmit}}>
+ <:body>
+ <input type="text" name="name" value="John Doe" />
+ </:body>
+ <:footer>
+ <button type="submit">Submit</button>
+ </:footer>
+ </DModal>
+ </template>
+ );
assert.dom("form.d-modal").exists();
await click(".d-modal button[type=submit]");
@@ -176,20 +200,22 @@ module("Integration | Component | d-modal", function (hooks) {
actionCalled = true;
};
- await render(<template>
- <DModal @inline={{true}}>
- <:body>
- body content
- </:body>
- <:footer>
- <DButton
- @action={{someAction}}
- @translatedLabel="Perform action"
- class="btn-primary"
- />
- </:footer>
- </DModal>
- </template>);
+ await render(
+ <template>
+ <DModal @inline={{true}}>
+ <:body>
+ body content
+ </:body>
+ <:footer>
+ <DButton
+ @action={{someAction}}
+ @translatedLabel="Perform action"
+ class="btn-primary"
+ />
+ </:footer>
+ </DModal>
+ </template>
+ );
await triggerKeyEvent(".d-modal__body", "keydown", "Enter");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-page-header-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-page-header-test.gjs
index 7638abe502c..e898199f63b 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-page-header-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-page-header-test.gjs
@@ -28,30 +28,34 @@ module("Integration | Component | DPageHeader", function (hooks) {
});
test("@titleLabel", async function (assert) {
- await render(<template>
- <DPageHeader @titleLabel={{i18n "admin.title"}} />
- </template>);
+ await render(
+ <template><DPageHeader @titleLabel={{i18n "admin.title"}} /></template>
+ );
assert.dom(".d-page-header__title").exists().hasText(i18n("admin.title"));
});
test("@shouldDisplay", async function (assert) {
- await render(<template>
- <DPageHeader @titleLabel="Wow so cool" @shouldDisplay={{false}} />
- </template>);
+ await render(
+ <template>
+ <DPageHeader @titleLabel="Wow so cool" @shouldDisplay={{false}} />
+ </template>
+ );
assert.dom(".d-page-header").doesNotExist();
});
test("renders base breadcrumbs and yielded <:breadcrumbs>", async function (assert) {
- await render(<template>
- <DPageHeader @titleLabel={{i18n "admin.titile"}}>
- <:breadcrumbs>
- <DBreadcrumbsItem
- @path="/admin/badges"
- @label={{i18n "admin.badges.title"}}
- />
- </:breadcrumbs>
- </DPageHeader>
- </template>);
+ await render(
+ <template>
+ <DPageHeader @titleLabel={{i18n "admin.titile"}}>
+ <:breadcrumbs>
+ <DBreadcrumbsItem
+ @path="/admin/badges"
+ @label={{i18n "admin.badges.title"}}
+ />
+ </:breadcrumbs>
+ </DPageHeader>
+ </template>
+ );
assert
.dom(".d-page-header__breadcrumbs .d-breadcrumbs__item")
@@ -67,9 +71,11 @@ module("Integration | Component | DPageHeader", function (hooks) {
});
test("@descriptionLabel", async function (assert) {
- await render(<template>
- <DPageHeader @descriptionLabel={{i18n "admin.badges.description"}} />
- </template>);
+ await render(
+ <template>
+ <DPageHeader @descriptionLabel={{i18n "admin.badges.description"}} />
+ </template>
+ );
assert
.dom(".d-page-header__description")
.exists()
@@ -82,12 +88,14 @@ module("Integration | Component | DPageHeader", function (hooks) {
});
test("@learnMoreUrl", async function (assert) {
- await render(<template>
- <DPageHeader
- @descriptionLabel={{i18n "admin.badges.description"}}
- @learnMoreUrl="https://meta.discourse.org/t/96331"
- />
- </template>);
+ await render(
+ <template>
+ <DPageHeader
+ @descriptionLabel={{i18n "admin.badges.description"}}
+ @learnMoreUrl="https://meta.discourse.org/t/96331"
+ />
+ </template>
+ );
assert.dom(".d-page-header__learn-more").exists();
assert
.dom(".d-page-header__learn-more a")
@@ -96,17 +104,19 @@ module("Integration | Component | DPageHeader", function (hooks) {
});
test("renders nav tabs in yielded <:tabs>", async function (assert) {
- await render(<template>
- <DPageHeader>
- <:tabs>
- <NavItem
- @route="admin.backups.settings"
- @label="settings"
- class="d-backups-tabs__settings"
- />
- </:tabs>
- </DPageHeader>
- </template>);
+ await render(
+ <template>
+ <DPageHeader>
+ <:tabs>
+ <NavItem
+ @route="admin.backups.settings"
+ @label="settings"
+ class="d-backups-tabs__settings"
+ />
+ </:tabs>
+ </DPageHeader>
+ </template>
+ );
assert
.dom(".d-nav-submenu__tabs .d-backups-tabs__settings")
.exists()
@@ -119,35 +129,37 @@ module("Integration | Component | DPageHeader", function (hooks) {
actionCalled = true;
};
- await render(<template>
- <DPageHeader>
- <:actions as |actions|>
- <actions.Primary
- @route="adminBadges.show"
- @routeModels="new"
- @icon="plus"
- @label="admin.badges.new"
- class="new-badge"
- />
-
- <actions.Default
- @route="adminBadges.award"
- @routeModels="new"
- @icon="upload"
- @label="admin.badges.mass_award.title"
- class="award-badge"
- />
-
- <actions.Danger
- @action={{someAction}}
- @title="admin.badges.group_settings"
- @label="admin.badges.group_settings"
- @icon="gear"
- class="edit-groupings-btn"
- />
- </:actions>
- </DPageHeader>
- </template>);
+ await render(
+ <template>
+ <DPageHeader>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminBadges.show"
+ @routeModels="new"
+ @icon="plus"
+ @label="admin.badges.new"
+ class="new-badge"
+ />
+
+ <actions.Default
+ @route="adminBadges.award"
+ @routeModels="new"
+ @icon="upload"
+ @label="admin.badges.mass_award.title"
+ class="award-badge"
+ />
+
+ <actions.Danger
+ @action={{someAction}}
+ @title="admin.badges.group_settings"
+ @label="admin.badges.group_settings"
+ @icon="gear"
+ class="edit-groupings-btn"
+ />
+ </:actions>
+ </DPageHeader>
+ </template>
+ );
assert
.dom(
@@ -170,9 +182,13 @@ module("Integration | Component | DPageHeader", function (hooks) {
});
test("@headerActionComponent is rendered with actions arg", async function (assert) {
- await render(<template>
- <DPageHeader @headerActionComponent={{DPageHeaderActionsTestComponent}} />
- </template>);
+ await render(
+ <template>
+ <DPageHeader
+ @headerActionComponent={{DPageHeaderActionsTestComponent}}
+ />
+ </template>
+ );
assert.dom(".d-page-header-actions-test-component .award-badge").exists();
});
@@ -186,27 +202,29 @@ module("Integration | Component | DPageHeader | Mobile", function (hooks) {
setupRenderingTest(hooks);
test("action buttons become a dropdown on mobile", async function (assert) {
- await render(<template>
- <DPageHeader>
- <:actions as |actions|>
- <actions.Primary
- @route="adminBadges.show"
- @routeModels="new"
- @icon="plus"
- @label="admin.badges.new"
- class="new-badge"
- />
-
- <actions.Default
- @route="adminBadges.award"
- @routeModels="new"
- @icon="upload"
- @label="admin.badges.mass_award.title"
- class="award-badge"
- />
- </:actions>
- </DPageHeader>
- </template>);
+ await render(
+ <template>
+ <DPageHeader>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminBadges.show"
+ @routeModels="new"
+ @icon="plus"
+ @label="admin.badges.new"
+ class="new-badge"
+ />
+
+ <actions.Default
+ @route="adminBadges.award"
+ @routeModels="new"
+ @icon="upload"
+ @label="admin.badges.mass_award.title"
+ class="award-badge"
+ />
+ </:actions>
+ </DPageHeader>
+ </template>
+ );
assert
.dom(
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-page-subheader-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-page-subheader-test.gjs
index d14b2c09879..0f95b4f9511 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-page-subheader-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-page-subheader-test.gjs
@@ -9,9 +9,9 @@ module("Integration | Component | DPageSubheader", function (hooks) {
setupRenderingTest(hooks);
test("@titleLabel", async function (assert) {
- await render(<template>
- <DPageSubheader @titleLabel={{i18n "admin.title"}} />
- </template>);
+ await render(
+ <template><DPageSubheader @titleLabel={{i18n "admin.title"}} /></template>
+ );
assert
.dom(".d-page-subheader__title")
.exists()
@@ -24,9 +24,11 @@ module("Integration | Component | DPageSubheader", function (hooks) {
});
test("@descriptionLabel", async function (assert) {
- await render(<template>
- <DPageSubheader @descriptionLabel={{i18n "admin.badges.description"}} />
- </template>);
+ await render(
+ <template>
+ <DPageSubheader @descriptionLabel={{i18n "admin.badges.description"}} />
+ </template>
+ );
assert
.dom(".d-page-subheader__description")
.exists()
@@ -39,12 +41,14 @@ module("Integration | Component | DPageSubheader", function (hooks) {
});
test("@learnMoreUrl", async function (assert) {
- await render(<template>
- <DPageSubheader
- @descriptionLabel={{i18n "admin.badges.description"}}
- @learnMoreUrl="https://meta.discourse.org/t/96331"
- />
- </template>);
+ await render(
+ <template>
+ <DPageSubheader
+ @descriptionLabel={{i18n "admin.badges.description"}}
+ @learnMoreUrl="https://meta.discourse.org/t/96331"
+ />
+ </template>
+ );
assert.dom(".d-page-subheader__learn-more").exists();
assert
.dom(".d-page-subheader__learn-more a")
@@ -58,35 +62,37 @@ module("Integration | Component | DPageSubheader", function (hooks) {
actionCalled = true;
};
- await render(<template>
- <DPageSubheader>
- <:actions as |actions|>
- <actions.Primary
- @route="adminBadges.show"
- @routeModels="new"
- @icon="plus"
- @label="admin.badges.new"
- class="new-badge"
- />
-
- <actions.Default
- @route="adminBadges.award"
- @routeModels="new"
- @icon="upload"
- @label="admin.badges.mass_award.title"
- class="award-badge"
- />
-
- <actions.Danger
- @action={{someAction}}
- @title="admin.badges.group_settings"
- @label="admin.badges.group_settings"
- @icon="gear"
- class="edit-groupings-btn"
- />
- </:actions>
- </DPageSubheader>
- </template>);
+ await render(
+ <template>
+ <DPageSubheader>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminBadges.show"
+ @routeModels="new"
+ @icon="plus"
+ @label="admin.badges.new"
+ class="new-badge"
+ />
+
+ <actions.Default
+ @route="adminBadges.award"
+ @routeModels="new"
+ @icon="upload"
+ @label="admin.badges.mass_award.title"
+ class="award-badge"
+ />
+
+ <actions.Danger
+ @action={{someAction}}
+ @title="admin.badges.group_settings"
+ @label="admin.badges.group_settings"
+ @icon="gear"
+ class="edit-groupings-btn"
+ />
+ </:actions>
+ </DPageSubheader>
+ </template>
+ );
assert
.dom(
@@ -117,27 +123,29 @@ module("Integration | Component | DPageSubheader | Mobile", function (hooks) {
setupRenderingTest(hooks);
test("action buttons become a dropdown on mobile", async function (assert) {
- await render(<template>
- <DPageSubheader>
- <:actions as |actions|>
- <actions.Primary
- @route="adminBadges.show"
- @routeModels="new"
- @icon="plus"
- @label="admin.badges.new"
- class="new-badge"
- />
-
- <actions.Default
- @route="adminBadges.award"
- @routeModels="new"
- @icon="upload"
- @label="admin.badges.mass_award.title"
- class="award-badge"
- />
- </:actions>
- </DPageSubheader>
- </template>);
+ await render(
+ <template>
+ <DPageSubheader>
+ <:actions as |actions|>
+ <actions.Primary
+ @route="adminBadges.show"
+ @routeModels="new"
+ @icon="plus"
+ @label="admin.badges.new"
+ class="new-badge"
+ />
+
+ <actions.Default
+ @route="adminBadges.award"
+ @routeModels="new"
+ @icon="upload"
+ @label="admin.badges.mass_award.title"
+ class="award-badge"
+ />
+ </:actions>
+ </DPageSubheader>
+ </template>
+ );
assert
.dom(
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs
index 02f32265bac..9102b55cdf1 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-section-test.gjs
@@ -9,11 +9,13 @@ module("Integration | Component | d-section", function (hooks) {
test("can set classes on the body element", async function (assert) {
await withSilencedDeprecationsAsync("discourse.d-section", async () => {
- await render(<template>
- <DSection @pageClass="test" @bodyClass="foo bar" class="special">
- testing!
- </DSection>
- </template>);
+ await render(
+ <template>
+ <DSection @pageClass="test" @bodyClass="foo bar" class="special">
+ testing!
+ </DSection>
+ </template>
+ );
});
assert.dom(".special").hasText("testing!");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-select-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-select-test.gjs
index 301563c9a1c..01c13b767dd 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-select-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-select-test.gjs
@@ -12,11 +12,13 @@ module("Integration | Component | d-select", function (hooks) {
assert.step(value);
};
- await render(<template>
- <DSelect @onChange={{handleChange}} as |s|>
- <s.Option @value="foo">The real foo</s.Option>
- </DSelect>
- </template>);
+ await render(
+ <template>
+ <DSelect @onChange={{handleChange}} as |s|>
+ <s.Option @value="foo">The real foo</s.Option>
+ </DSelect>
+ </template>
+ );
await select(".d-select", "foo");
@@ -33,11 +35,13 @@ module("Integration | Component | d-select", function (hooks) {
});
test("selected value", async function (assert) {
- await render(<template>
- <DSelect @value="foo" as |s|>
- <s.Option @value="foo">The real foo</s.Option>
- </DSelect>
- </template>);
+ await render(
+ <template>
+ <DSelect @value="foo" as |s|>
+ <s.Option @value="foo">The real foo</s.Option>
+ </DSelect>
+ </template>
+ );
assert.dselect().hasOption({
value: NO_VALUE_OPTION,
@@ -51,11 +55,13 @@ module("Integration | Component | d-select", function (hooks) {
});
test("required field", async function (assert) {
- await render(<template>
- <DSelect @includeNone={{false}} as |s|>
- <s.Option @value="foo">The real foo</s.Option>
- </DSelect>
- </template>);
+ await render(
+ <template>
+ <DSelect @includeNone={{false}} as |s|>
+ <s.Option @value="foo">The real foo</s.Option>
+ </DSelect>
+ </template>
+ );
assert.dselect().hasNoOption(NO_VALUE_OPTION);
});
@@ -67,11 +73,13 @@ module("Integration | Component | d-select", function (hooks) {
});
test("option attributes", async function (assert) {
- await render(<template>
- <DSelect as |s|>
- <s.Option @value="foo" class="test">The real foo</s.Option>
- </DSelect>
- </template>);
+ await render(
+ <template>
+ <DSelect as |s|>
+ <s.Option @value="foo" class="test">The real foo</s.Option>
+ </DSelect>
+ </template>
+ );
assert.dom(".d-select__option.test").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/d-stat-tiles-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/d-stat-tiles-test.gjs
index ac35ec44749..01f47eed210 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/d-stat-tiles-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/d-stat-tiles-test.gjs
@@ -8,11 +8,13 @@ module("Integration | Component | DStatTiles", function (hooks) {
setupRenderingTest(hooks);
test("formats the @value in a readable way with the raw number as the title attr", async function (assert) {
- await render(<template>
- <DStatTiles as |tiles|>
- <tiles.Tile @value="12555999" @label={{i18n "bootstrap_mode"}} />
- </DStatTiles>
- </template>);
+ await render(
+ <template>
+ <DStatTiles as |tiles|>
+ <tiles.Tile @value="12555999" @label={{i18n "bootstrap_mode"}} />
+ </DStatTiles>
+ </template>
+ );
assert
.dom(".d-stat-tiles .d-stat-tile .d-stat-tile__value")
@@ -23,11 +25,13 @@ module("Integration | Component | DStatTiles", function (hooks) {
});
test("renders the @label", async function (assert) {
- await render(<template>
- <DStatTiles as |tiles|>
- <tiles.Tile @value="12555999" @label={{i18n "bootstrap_mode"}} />
- </DStatTiles>
- </template>);
+ await render(
+ <template>
+ <DStatTiles as |tiles|>
+ <tiles.Tile @value="12555999" @label={{i18n "bootstrap_mode"}} />
+ </DStatTiles>
+ </template>
+ );
assert
.dom(".d-stat-tiles .d-stat-tile .d-stat-tile__label")
@@ -35,15 +39,17 @@ module("Integration | Component | DStatTiles", function (hooks) {
});
test("renders the optional @tooltip", async function (assert) {
- await render(<template>
- <DStatTiles as |tiles|>
- <tiles.Tile
- @value="12555999"
- @label={{i18n "bootstrap_mode"}}
- @tooltip={{i18n "bootstrap_mode"}}
- />
- </DStatTiles>
- </template>);
+ await render(
+ <template>
+ <DStatTiles as |tiles|>
+ <tiles.Tile
+ @value="12555999"
+ @label={{i18n "bootstrap_mode"}}
+ @tooltip={{i18n "bootstrap_mode"}}
+ />
+ </DStatTiles>
+ </template>
+ );
assert.dom(".d-stat-tile__tooltip").exists();
await triggerEvent(".fk-d-tooltip__trigger", "pointermove");
@@ -51,15 +57,17 @@ module("Integration | Component | DStatTiles", function (hooks) {
});
test("wraps the value in a link if @url is provided", async function (assert) {
- await render(<template>
- <DStatTiles as |tiles|>
- <tiles.Tile
- @value="12555999"
- @label={{i18n "bootstrap_mode"}}
- @url="https://meta.discourse.org"
- />
- </DStatTiles>
- </template>);
+ await render(
+ <template>
+ <DStatTiles as |tiles|>
+ <tiles.Tile
+ @value="12555999"
+ @label={{i18n "bootstrap_mode"}}
+ @url="https://meta.discourse.org"
+ />
+ </DStatTiles>
+ </template>
+ );
assert
.dom(".d-stat-tiles .d-stat-tile a.d-stat-tile__value")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/decorated-html-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/decorated-html-test.gjs
index a015d3dacc4..71c1ef8b6ea 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/decorated-html-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/decorated-html-test.gjs
@@ -30,14 +30,19 @@ module("Integration | Component | <DecoratedHtml />", function (hooks) {
const decorate = (element, helper) => {
element.innerHTML += "<div id='appended'>Appended</div>";
- helper.renderGlimmer(element, <template>
- <div id="render-glimmer">Hello from Glimmer Component</div>
- </template>);
+ helper.renderGlimmer(
+ element,
+ <template>
+ <div id="render-glimmer">Hello from Glimmer Component</div>
+ </template>
+ );
};
- await render(<template>
- <DecoratedHtml @html={{state.html}} @decorate={{decorate}} />
- </template>);
+ await render(
+ <template>
+ <DecoratedHtml @html={{state.html}} @decorate={{decorate}} />
+ </template>
+ );
assert.dom("h1").hasText("Initial");
assert.dom("#appended").hasText("Appended");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/dropdown-menu-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/dropdown-menu-test.gjs
index e7524646d26..3823d2dd65e 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/dropdown-menu-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/dropdown-menu-test.gjs
@@ -15,9 +15,13 @@ module("Integration | Component | <DropdownMenu />", function (hooks) {
});
test("dropdown menu item", async function (assert) {
- await render(<template>
- <DropdownMenu as |dm|><dm.item class="test">test</dm.item></DropdownMenu>
- </template>);
+ await render(
+ <template>
+ <DropdownMenu as |dm|><dm.item
+ class="test"
+ >test</dm.item></DropdownMenu>
+ </template>
+ );
assert
.dom("li.dropdown-menu__item.test")
@@ -26,9 +30,11 @@ module("Integration | Component | <DropdownMenu />", function (hooks) {
});
test("dropdown menu divider", async function (assert) {
- await render(<template>
- <DropdownMenu as |dm|><dm.divider class="test" /></DropdownMenu>
- </template>);
+ await render(
+ <template>
+ <DropdownMenu as |dm|><dm.divider class="test" /></DropdownMenu>
+ </template>
+ );
assert
.dom("li.test hr.dropdown-menu__divider")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/flash-message-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/flash-message-test.gjs
index a06f1017309..130a4fc77d6 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/flash-message-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/flash-message-test.gjs
@@ -10,9 +10,9 @@ module("Integration | Component | flash-message", function (hooks) {
const flash = "Success message";
const type = "success";
- await render(<template>
- <FlashMessage @flash={{flash}} @type={{type}} />
- </template>);
+ await render(
+ <template><FlashMessage @flash={{flash}} @type={{type}} /></template>
+ );
assert.dom(".alert.alert-success").hasText(flash);
assert.dom(".alert").hasClass("alert-success");
@@ -22,9 +22,9 @@ module("Integration | Component | flash-message", function (hooks) {
const flash = "Error message";
const type = "error";
- await render(<template>
- <FlashMessage @flash={{flash}} @type={{type}} />
- </template>);
+ await render(
+ <template><FlashMessage @flash={{flash}} @type={{type}} /></template>
+ );
assert.dom(".alert.alert-error").hasText(flash);
assert.dom(".alert").hasClass("alert-error");
@@ -34,9 +34,9 @@ module("Integration | Component | flash-message", function (hooks) {
const flash = "Warning message";
const type = "warning";
- await render(<template>
- <FlashMessage @flash={{flash}} @type={{type}} />
- </template>);
+ await render(
+ <template><FlashMessage @flash={{flash}} @type={{type}} /></template>
+ );
assert.dom(".alert.alert-warning").hasText(flash);
assert.dom(".alert").hasClass("alert-warning");
@@ -46,9 +46,9 @@ module("Integration | Component | flash-message", function (hooks) {
const flash = "Info message";
const type = "info";
- await render(<template>
- <FlashMessage @flash={{flash}} @type={{type}} />
- </template>);
+ await render(
+ <template><FlashMessage @flash={{flash}} @type={{type}} /></template>
+ );
assert.dom(".alert.alert-info").hasText(flash);
assert.dom(".alert").hasClass("alert-info");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/collection-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/collection-test.gjs
index 50994910f5e..3a8ca8b2b57 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/collection-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/collection-test.gjs
@@ -9,44 +9,50 @@ module("Integration | Component | FormKit | Collection", function (hooks) {
setupRenderingTest(hooks);
test("@tagName", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
- <form.Collection @name="foo" @tagName="tr" />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
+ <form.Collection @name="foo" @tagName="tr" />
+ </Form>
+ </template>
+ );
assert.dom("tr.form-kit__collection").exists();
});
test("field", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
- <form.Collection @name="foo" as |collection|>
- <collection.Field @name="bar" @title="Bar" as |field|>
- <field.Input />
- </collection.Field>
- </form.Collection>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
+ <form.Collection @name="foo" as |collection|>
+ <collection.Field @name="bar" @title="Bar" as |field|>
+ <field.Input />
+ </collection.Field>
+ </form.Collection>
+ </Form>
+ </template>
+ );
assert.form().field("foo.0.bar").hasValue("1");
assert.form().field("foo.1.bar").hasValue("2");
});
test("remove", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
- <form.Collection @name="foo" as |collection index|>
- <collection.Field @name="bar" @title="Bar" as |field|>
- <field.Input />
- <form.Button
- class={{concat "remove-" index}}
- @action={{fn collection.remove index}}
- >Remove</form.Button>
- </collection.Field>
- </form.Collection>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
+ <form.Collection @name="foo" as |collection index|>
+ <collection.Field @name="bar" @title="Bar" as |field|>
+ <field.Input />
+ <form.Button
+ class={{concat "remove-" index}}
+ @action={{fn collection.remove index}}
+ >Remove</form.Button>
+ </collection.Field>
+ </form.Collection>
+ </Form>
+ </template>
+ );
assert.form().field("foo.0.bar").hasValue("1");
assert.form().field("foo.1.bar").hasValue("2");
@@ -58,26 +64,28 @@ module("Integration | Component | FormKit | Collection", function (hooks) {
});
test("nested object", async function (assert) {
- await render(<template>
- <Form
- @data={{hash
- foo=(array (hash bar=(hash baz=1)) (hash bar=(hash baz=2)))
- }}
- as |form|
- >
- <form.Collection @name="foo" as |collection index|>
- <collection.Object @name="bar" as |object|>
- <object.Field @name="baz" @title="Baz" as |field|>
- <field.Input />
- <form.Button
- class={{concat "remove-" index}}
- @action={{fn collection.remove index}}
- >Remove</form.Button>
- </object.Field>
- </collection.Object>
- </form.Collection>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form
+ @data={{hash
+ foo=(array (hash bar=(hash baz=1)) (hash bar=(hash baz=2)))
+ }}
+ as |form|
+ >
+ <form.Collection @name="foo" as |collection index|>
+ <collection.Object @name="bar" as |object|>
+ <object.Field @name="baz" @title="Baz" as |field|>
+ <field.Input />
+ <form.Button
+ class={{concat "remove-" index}}
+ @action={{fn collection.remove index}}
+ >Remove</form.Button>
+ </object.Field>
+ </collection.Object>
+ </form.Collection>
+ </Form>
+ </template>
+ );
assert.form().field("foo.0.bar.baz").hasValue("1");
assert.form().field("foo.1.bar.baz").hasValue("2");
@@ -93,37 +101,39 @@ module("Integration | Component | FormKit | Collection", function (hooks) {
});
test("nested collection", async function (assert) {
- await render(<template>
- <Form
- @data={{hash
- one=(array
- (hash two=(array (hash three=(array (hash foo=1) (hash foo=2)))))
- )
- }}
- as |form|
- >
- <form.Collection @name="one" as |first firstIndex|>
- <first.Collection @name="two" as |second secondIndex|>
- <second.Collection @name="three" as |third thirdIndex|>
- <third.Field @name="foo" @title="Foo" as |field|>
- <field.Input />
- <form.Button
- class={{concat
- "remove-"
- firstIndex
- "-"
- secondIndex
- "-"
- thirdIndex
- }}
- @action={{fn third.remove thirdIndex}}
- >Remove</form.Button>
- </third.Field>
- </second.Collection>
- </first.Collection>
- </form.Collection>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form
+ @data={{hash
+ one=(array
+ (hash two=(array (hash three=(array (hash foo=1) (hash foo=2)))))
+ )
+ }}
+ as |form|
+ >
+ <form.Collection @name="one" as |first firstIndex|>
+ <first.Collection @name="two" as |second secondIndex|>
+ <second.Collection @name="three" as |third thirdIndex|>
+ <third.Field @name="foo" @title="Foo" as |field|>
+ <field.Input />
+ <form.Button
+ class={{concat
+ "remove-"
+ firstIndex
+ "-"
+ secondIndex
+ "-"
+ thirdIndex
+ }}
+ @action={{fn third.remove thirdIndex}}
+ >Remove</form.Button>
+ </third.Field>
+ </second.Collection>
+ </first.Collection>
+ </form.Collection>
+ </Form>
+ </template>
+ );
assert.form().field("one.0.two.0.three.0.foo").hasValue("1");
assert.form().field("one.0.two.0.three.1.foo").hasValue("2");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/calendar-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/calendar-test.gjs
index 60820db18d0..7feae295e59 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/calendar-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/calendar-test.gjs
@@ -14,13 +14,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().field("foo").setDay(22);
await formKit().field("foo").setTime("11:12");
@@ -32,46 +34,54 @@ module(
});
test("@includeTime", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-time").exists();
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Calendar @includeTime={{false}} />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Calendar @includeTime={{false}} />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-time").doesNotExist();
});
test("@expandedDatePickerOnDesktop", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".date-picker-container").exists();
assert.dom(".form-kit__control-date").doesNotExist();
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Calendar @expandedDatePickerOnDesktop={{false}} />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Calendar @expandedDatePickerOnDesktop={{false}} />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".date-picker-container").doesNotExist();
assert.dom(".form-kit__control-date").exists();
@@ -83,18 +93,20 @@ module(
const date = moment().subtract(2, "days");
const validation = `dateBeforeOrEqual:${date.format("YYYY-MM-DD")}`;
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field
- @validation={{validation}}
- @name="foo"
- @title="Foo"
- as |field|
- >
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field
+ @validation={{validation}}
+ @name="foo"
+ @title="Foo"
+ as |field|
+ >
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -114,18 +126,20 @@ module(
const date = moment().add(2, "days");
const validation = `dateAfterOrEqual:${date.format("YYYY-MM-DD")}`;
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field
- @validation={{validation}}
- @name="foo"
- @title="Foo"
- as |field|
- >
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field
+ @validation={{validation}}
+ @name="foo"
+ @title="Foo"
+ as |field|
+ >
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -140,13 +154,15 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Calendar />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Calendar />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".pika-button.pika-day").hasStyle({
"pointer-events": "none",
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/char-counter-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/char-counter-test.gjs
index c74433a262f..0e5e2d73ca8 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/char-counter-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/char-counter-test.gjs
@@ -13,18 +13,20 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @validation="length:0,5"
- as |field|
- >
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="length:0,5"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasCharCounter(0, 5);
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/checkbox-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/checkbox-test.gjs
index 7d0700aadfa..ab2a36891a8 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/checkbox-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/checkbox-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue(false);
@@ -34,25 +36,29 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Checkbox />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Checkbox />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-checkbox").hasAttribute("disabled");
});
test("@tooltip", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @tooltip="test" @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @tooltip="test" @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__control-checkbox-content .form-kit__tooltip")
@@ -60,13 +66,15 @@ module(
});
test("optional", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasTitle("Foo (optional)");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/code-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/code-test.gjs
index 3809dbb4e62..4944d752257 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/code-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/code-test.gjs
@@ -11,13 +11,15 @@ module("Integration | Component | FormKit | Controls | Code", function (hooks) {
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Code @height={{100}} style="width: 200px" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Code @height={{100}} style="width: 200px" />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue("");
@@ -30,13 +32,15 @@ module("Integration | Component | FormKit | Controls | Code", function (hooks) {
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Code />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Code />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".ace_text-input").hasAttribute("readonly");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/composer-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/composer-test.gjs
index 449455af42c..a8b446f024d 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/composer-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/composer-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Composer />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Composer />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue("");
@@ -34,25 +36,29 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Composer />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Composer />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".d-editor-input").hasAttribute("disabled");
});
test("@height", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Composer @height={{42}} />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Composer @height={{42}} />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__control-composer")
@@ -60,23 +66,27 @@ module(
});
test("@preview", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Composer />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Composer />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-composer.--preview").doesNotExist();
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Composer @preview={{true}} />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Composer @preview={{true}} />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-composer.--preview").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/custom-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/custom-test.gjs
index 6407f4b2ef6..c741b9fb305 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/custom-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/custom-test.gjs
@@ -9,15 +9,17 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @description="Bar" as |field|>
- <field.Custom>
- <input class="custom-test" />
- </field.Custom>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @description="Bar" as |field|>
+ <field.Custom>
+ <input class="custom-test" />
+ </field.Custom>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__container-title").hasText("Foo (optional)");
assert.dom(".form-kit__container-description").hasText("Bar");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/icon-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/icon-test.gjs
index e80a53e24ab..23254f61a2e 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/icon-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/icon-test.gjs
@@ -18,13 +18,15 @@ module("Integration | Component | FormKit | Controls | Icon", function (hooks) {
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Icon />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Icon />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().field("foo").select("pencil");
await formKit().submit();
@@ -34,13 +36,15 @@ module("Integration | Component | FormKit | Controls | Icon", function (hooks) {
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Icon />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Icon />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-icon.is-disabled").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/image-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/image-test.gjs
index e6f69e2967f..587747933cd 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/image-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/image-test.gjs
@@ -34,13 +34,15 @@ module(
test("default", async function (assert) {
let data = { image_url: "/images/discourse-logo-sketch-small.png" };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field @name="image_url" @title="Foo" as |field|>
- <field.Image @type="site_setting" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field @name="image_url" @title="Foo" as |field|>
+ <field.Image @type="site_setting" />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -50,15 +52,20 @@ module(
test("removing the upload", async function (assert) {
let data = { image_url: "/images/discourse-logo-sketch-small.png" };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field @name="image_url" @title="Foo" as |field|>
- <field.Image @type="site_setting" />
- </form.Field>
-
- <form.Button class="test" @action={{fn form.set "image_url" null}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field @name="image_url" @title="Foo" as |field|>
+ <field.Image @type="site_setting" />
+ </form.Field>
+
+ <form.Button
+ class="test"
+ @action={{fn form.set "image_url" null}}
+ />
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -72,18 +79,20 @@ module(
test("when disabled", async function (assert) {
const data = { image_url: "/images/discourse-logo-sketch-small.png" };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field
- @name="image_url"
- @title="Foo"
- @disabled={{true}}
- as |field|
- >
- <field.Image @type="site_setting" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field
+ @name="image_url"
+ @title="Foo"
+ @disabled={{true}}
+ as |field|
+ >
+ <field.Image @type="site_setting" />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".image-upload-controls input[type='file']").isDisabled();
assert.dom(".image-upload-controls .btn-danger").isDisabled();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-number-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-number-test.gjs
index 6f1480f18c6..f26b965135b 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-number-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-number-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: "" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Input @type="number" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Input @type="number" />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasValue("");
@@ -33,18 +35,20 @@ module(
});
test("validation of required", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @validation="required"
- as |field|
- >
- <field.Input @type="number" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Input @type="number" />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().submit();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-text-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-text-test.gjs
index c348d69fc9f..af185db92b5 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-text-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/input-text-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: "" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasValue("");
@@ -33,13 +35,15 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-input").hasAttribute("disabled");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/menu-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/menu-test.gjs
index b0fc295ef9d..272d7472362 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/menu-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/menu-test.gjs
@@ -11,17 +11,19 @@ module("Integration | Component | FormKit | Controls | Menu", function (hooks) {
let data = { foo: "item-2" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Menu as |menu|>
- <menu.Item @value="item-1">Item 1</menu.Item>
- <menu.Item @value="item-2">Item 2</menu.Item>
- <menu.Item @value="item-3">Item 3</menu.Item>
- </field.Menu>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Menu as |menu|>
+ <menu.Item @value="item-1">Item 1</menu.Item>
+ <menu.Item @value="item-2">Item 2</menu.Item>
+ <menu.Item @value="item-3">Item 3</menu.Item>
+ </field.Menu>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: "item-2" });
assert.form().field("foo").hasValue("item-2");
@@ -34,13 +36,15 @@ module("Integration | Component | FormKit | Controls | Menu", function (hooks) {
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Menu />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Menu />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-menu-trigger").hasAttribute("disabled");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/password-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/password-test.gjs
index ba9800bc3fd..ecdf26f0dc1 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/password-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/password-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: "" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Password />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Password />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasValue("");
@@ -35,13 +37,15 @@ module(
test("toggle visibility", async function (assert) {
let data = { foo: "test" };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Password />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Password />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(formKit().field("foo").element.querySelector("input"))
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/question-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/question-test.gjs
index a0d01c1b86c..150fc377048 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/question-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/question-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Question />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Question />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue(false);
@@ -34,25 +36,29 @@ module(
});
test("@yesLabel", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Question @yesLabel="Correct" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Question @yesLabel="Correct" />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-radio-label.--yes").hasText("Correct");
});
test("@noLabel", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Question @noLabel="Wrong" />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Question @noLabel="Wrong" />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-radio-label.--no").hasText("Wrong");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-group-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-group-test.gjs
index 1cdccbf422c..697d6b3aa47 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-group-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-group-test.gjs
@@ -13,17 +13,19 @@ module(
let data = { foo: "one" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.RadioGroup as |RadioGroup|>
- <RadioGroup.Radio @value="one">One</RadioGroup.Radio>
- <RadioGroup.Radio @value="two">Two</RadioGroup.Radio>
- <RadioGroup.Radio @value="three">Three</RadioGroup.Radio>
- </field.RadioGroup>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.RadioGroup as |RadioGroup|>
+ <RadioGroup.Radio @value="one">One</RadioGroup.Radio>
+ <RadioGroup.Radio @value="two">Two</RadioGroup.Radio>
+ <RadioGroup.Radio @value="three">Three</RadioGroup.Radio>
+ </field.RadioGroup>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasValue("one");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-test.gjs
index 20536f286ef..92656d10ba6 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/radio-test.gjs
@@ -9,32 +9,36 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.RadioGroup as |RadioGroup|>
- <RadioGroup.Radio @value="one">One</RadioGroup.Radio>
- </field.RadioGroup>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.RadioGroup as |RadioGroup|>
+ <RadioGroup.Radio @value="one">One</RadioGroup.Radio>
+ </field.RadioGroup>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-radio-content").hasText("One");
});
test("title/description", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.RadioGroup as |RadioGroup|>
- <RadioGroup.Radio @value="one" as |radio|>
- <radio.Title>One title</radio.Title>
- <radio.Description>One description</radio.Description>
- </RadioGroup.Radio>
- </field.RadioGroup>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.RadioGroup as |RadioGroup|>
+ <RadioGroup.Radio @value="one" as |radio|>
+ <radio.Title>One title</radio.Title>
+ <radio.Description>One description</radio.Description>
+ </RadioGroup.Radio>
+ </field.RadioGroup>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-radio-title").hasText("One title");
assert
@@ -43,17 +47,19 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.RadioGroup as |RadioGroup|>
- <RadioGroup.Radio @value="one" as |radio|>
- <radio.Title>One title</radio.Title>
- </RadioGroup.Radio>
- </field.RadioGroup>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.RadioGroup as |RadioGroup|>
+ <RadioGroup.Radio @value="one" as |radio|>
+ <radio.Title>One title</radio.Title>
+ </RadioGroup.Radio>
+ </field.RadioGroup>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-radio").hasAttribute("disabled");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/select-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/select-test.gjs
index f778f787966..60617670526 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/select-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/select-test.gjs
@@ -15,17 +15,19 @@ module(
let data = { foo: "option-2" };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Select as |select|>
- <select.Option @value="option-1">Option 1</select.Option>
- <select.Option @value="option-2">Option 2</select.Option>
- <select.Option @value="option-3">Option 3</select.Option>
- </field.Select>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Select as |select|>
+ <select.Option @value="option-1">Option 1</select.Option>
+ <select.Option @value="option-2">Option 2</select.Option>
+ <select.Option @value="option-3">Option 3</select.Option>
+ </field.Select>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: "option-2" });
assert.form().field("foo").hasValue("option-2");
@@ -40,50 +42,56 @@ module(
});
test("@disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Select as |select|>
- <select.Option @value="option-1">Option 1</select.Option>
- </field.Select>
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Select as |select|>
+ <select.Option @value="option-1">Option 1</select.Option>
+ </field.Select>
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-select").hasAttribute("disabled");
});
test("include none", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @validation="required"
- as |field|
- >
- <field.Select />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Select />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.form()
.field("foo")
.hasValue(NO_VALUE_OPTION, "it has the none when no value is present");
- await render(<template>
- <Form @data={{hash foo="1"}} as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @validation="required"
- as |field|
- >
- <field.Select />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo="1"}} as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Select />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.form()
@@ -93,13 +101,15 @@ module(
"it doesn’t have the none when value is present"
);
- await render(<template>
- <Form @data={{hash foo="1"}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Select />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo="1"}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Select />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.form()
@@ -109,13 +119,15 @@ module(
"it has the none when value is present and field is not required"
);
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Select />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Select />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.form()
@@ -125,13 +137,15 @@ module(
"it has the none when no value is present and field is not required"
);
- await render(<template>
- <Form @data={{hash foo="1"}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Select @includeNone={{false}} />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo="1"}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Select @includeNone={{false}} />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert
.form()
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/textarea-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/textarea-test.gjs
index 2ac444220b6..87d27cb6346 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/textarea-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/textarea-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Textarea />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Textarea />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue("");
@@ -34,13 +36,15 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Textarea />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Textarea />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-textarea").hasAttribute("disabled");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/toggle-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/toggle-test.gjs
index d8a11c240e8..94efe76d6a4 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/toggle-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/controls/toggle-test.gjs
@@ -13,13 +13,15 @@ module(
let data = { foo: null };
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Toggle />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Toggle />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.deepEqual(data, { foo: null });
assert.form().field("foo").hasValue(false);
@@ -42,13 +44,15 @@ module(
});
test("when disabled", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
- <field.Toggle />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @disabled={{true}} as |field|>
+ <field.Toggle />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__control-toggle").hasAttribute("disabled");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/field-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/field-test.gjs
index 02508d36e44..0c070897a82 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/field-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/field-test.gjs
@@ -26,32 +26,36 @@ module("Integration | Component | FormKit | Field", function (hooks) {
});
test("@size", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @size={{8}}>
- Test
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @size={{8}}>
+ Test
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__row .form-kit__col.--col-8").hasText("Test");
});
test("@disabled", async function (assert) {
- await render(<template>
- <Form @data={{hash disabled=true}} as |form data|>
- <form.Field
- @name="foo"
- @title="Foo"
- @disabled={{data.disabled}}
- as |field|
- >
- <field.Input />
- </form.Field>
-
- <form.Button class="test" @action={{fn form.set "disabled" false}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash disabled=true}} as |form data|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @disabled={{data.disabled}}
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+
+ <form.Button class="test" @action={{fn form.set "disabled" false}} />
+ </Form>
+ </template>
+ );
assert
.dom("#control-foo.is-disabled[data-disabled]")
@@ -65,13 +69,20 @@ module("Integration | Component | FormKit | Field", function (hooks) {
});
test("@description", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @description="foo foo" as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @description="foo foo"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasDescription("foo foo");
});
@@ -81,13 +92,15 @@ module("Integration | Component | FormKit | Field", function (hooks) {
assert.deepEqual(error.message, "@name can't include `.` or `-`.");
});
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo.bar" @title="Foo" @size={{8}} as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo.bar" @title="Foo" @size={{8}} as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
resetOnerror();
});
@@ -100,28 +113,42 @@ module("Integration | Component | FormKit | Field", function (hooks) {
);
});
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @size={{8}} as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @size={{8}} as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
resetOnerror();
});
test("@validation", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @validation="required" as |field|>
- <field.Input />
- </form.Field>
- <form.Field @name="bar" @title="Bar" @validation="required" as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ <form.Field
+ @name="bar"
+ @title="Bar"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -143,15 +170,22 @@ module("Integration | Component | FormKit | Field", function (hooks) {
addError("foo", { title: "Some error", message: "error" });
};
- await render(<template>
- <Form @data={{hash foo="bar"}} as |form|>
- <form.Field @name="foo" @title="Foo" @validate={{validate}} as |field|>
- <field.Input />
- </form.Field>
-
- <form.Submit />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo="bar"}} as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validate={{validate}}
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+
+ <form.Submit />
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -162,32 +196,36 @@ module("Integration | Component | FormKit | Field", function (hooks) {
});
test("@showTitle", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @showTitle={{false}}
- as |field|
- ><field.Input /></form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @showTitle={{false}}
+ as |field|
+ ><field.Input /></form.Field>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__container-title").doesNotExist();
});
test("@format", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @description="foo description"
- @format="full"
- as |field|
- ><field.Input /></form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @description="foo description"
+ @format="full"
+ as |field|
+ ><field.Input /></form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__field.--full")
@@ -201,18 +239,20 @@ module("Integration | Component | FormKit | Field", function (hooks) {
});
test("@descriptionFormat", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @description="foo description"
- @format="full"
- @descriptionFormat="large"
- as |field|
- ><field.Input /></form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @description="foo description"
+ @format="full"
+ @descriptionFormat="large"
+ as |field|
+ ><field.Input /></form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__field.--full")
@@ -223,17 +263,19 @@ module("Integration | Component | FormKit | Field", function (hooks) {
});
test("@titleFormat", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @format="full"
- @titleFormat="large"
- as |field|
- ><field.Input /></form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @format="full"
+ @titleFormat="large"
+ as |field|
+ ><field.Input /></form.Field>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__field.--full")
@@ -256,42 +298,48 @@ module("Integration | Component | FormKit | Field", function (hooks) {
onSetWasCalled();
};
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @onSet={{onSet}} as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @onSet={{onSet}} as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
await fillIn("input", "bar");
});
test("@tooltip", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Field @name="foo" @title="Foo" @tooltip="text" as |field|>
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field @name="foo" @title="Foo" @tooltip="text" as |field|>
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
await click(".fk-d-tooltip__trigger");
assert.dom(".fk-d-tooltip__inner-content").hasText("text");
- await render(<template>
- <Form as |form|>
- <form.Field
- @name="foo"
- @title="Foo"
- @tooltip={{component DTooltip content="component"}}
- as |field|
- >
- <field.Input />
- </form.Field>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @tooltip={{component DTooltip content="component"}}
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ </Form>
+ </template>
+ );
await click(".fk-d-tooltip__trigger");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/form-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/form-test.gjs
index 3dc44695d2c..e86a2369dce 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/form-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/form-test.gjs
@@ -13,27 +13,29 @@ module("Integration | Component | FormKit | Form", function (hooks) {
assert.deepEqual(data.foo, 1);
};
- await render(<template>
- <Form @data={{hash foo=1}} @onSubmit={{onSubmit}} />
- </template>);
+ await render(
+ <template><Form @data={{hash foo=1}} @onSubmit={{onSubmit}} /></template>
+ );
await formKit().submit();
});
test("addItemToCollection", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
- <form.Button
- @action={{fn form.addItemToCollection "foo" (hash bar=3)}}
- >Add</form.Button>
-
- <form.Collection @name="foo" as |collection|>
- <collection.Field @name="bar" @title="Bar" as |field|>
- <field.Input />
- </collection.Field>
- </form.Collection>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
+ <form.Button
+ @action={{fn form.addItemToCollection "foo" (hash bar=3)}}
+ >Add</form.Button>
+
+ <form.Collection @name="foo" as |collection|>
+ <collection.Field @name="bar" @title="Bar" as |field|>
+ <field.Input />
+ </collection.Field>
+ </form.Collection>
+ </Form>
+ </template>
+ );
await click("button");
@@ -51,12 +53,14 @@ module("Integration | Component | FormKit | Form", function (hooks) {
addError("bar", { title: "Bar", message: "error" });
};
- await render(<template>
- <Form @data={{hash foo=1 bar=2}} @validate={{validate}} as |form|>
- <form.Field @name="foo" @title="Foo" />
- <form.Field @name="bar" @title="Bar" />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=1 bar=2}} @validate={{validate}} as |form|>
+ <form.Field @name="foo" @title="Foo" />
+ <form.Field @name="bar" @title="Bar" />
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -69,17 +73,29 @@ module("Integration | Component | FormKit | Form", function (hooks) {
test("@validateOn", async function (assert) {
const data = { foo: "test" };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" @validation="required" as |field|>
- <field.Input />
- </form.Field>
- <form.Field @name="bar" @title="Bar" @validation="required" as |field|>
- <field.Input />
- </form.Field>
- <form.Submit />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field
+ @name="foo"
+ @title="Foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ <form.Field
+ @name="bar"
+ @title="Bar"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ <form.Submit />
+ </Form>
+ </template>
+ );
await formKit().field("foo").fillIn("");
@@ -116,16 +132,18 @@ module("Integration | Component | FormKit | Form", function (hooks) {
assert.deepEqual(model.foo, 1);
};
- await render(<template>
- <Form
- @data={{model}}
- @onSubmit={{submit}}
- @onRegisterApi={{registerApi}}
- as |form data|
- >
- <div class="bar">{{data.bar}}</div>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form
+ @data={{model}}
+ @onSubmit={{submit}}
+ @onRegisterApi={{registerApi}}
+ as |form data|
+ >
+ <div class="bar">{{data.bar}}</div>
+ </Form>
+ </template>
+ );
await formApi.set("bar", 2);
await formApi.submit();
@@ -146,11 +164,13 @@ module("Integration | Component | FormKit | Form", function (hooks) {
});
test("@data", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=1}} as |form data|>
- <div class="foo">{{data.foo}}</div>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=1}} as |form data|>
+ <div class="foo">{{data.foo}}</div>
+ </Form>
+ </template>
+ );
assert.dom(".foo").hasText("1");
});
@@ -165,17 +185,24 @@ module("Integration | Component | FormKit | Form", function (hooks) {
done();
};
- await render(<template>
- <Form @data={{hash bar=1}} @onReset={{onReset}} as |form|>
- <form.Field @title="Foo" @name="foo" @validation="required" as |field|>
- <field.Input />
- </form.Field>
- <form.Field @title="Bar" @name="bar" as |field|>
- <field.Input />
- </form.Field>
- <form.Button class="set-bar" @action={{fn form.set "bar" 2}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash bar=1}} @onReset={{onReset}} as |form|>
+ <form.Field
+ @title="Foo"
+ @name="foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ <form.Field @title="Bar" @name="bar" as |field|>
+ <field.Input />
+ </form.Field>
+ <form.Button class="set-bar" @action={{fn form.set "bar" 2}} />
+ </Form>
+ </template>
+ );
await click(".set-bar");
await formKit().field("foo").fillIn("");
@@ -193,14 +220,16 @@ module("Integration | Component | FormKit | Form", function (hooks) {
test("immutable by default", async function (assert) {
const data = { foo: 1 };
- await render(<template>
- <Form @data={{data}} as |form|>
- <form.Field @name="foo" @title="Foo" as |field|>
- <field.Input />
- </form.Field>
- <form.Button class="set-foo" @action={{fn form.set "foo" 2}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{data}} as |form|>
+ <form.Field @name="foo" @title="Foo" as |field|>
+ <field.Input />
+ </form.Field>
+ <form.Button class="set-foo" @action={{fn form.set "foo" 2}} />
+ </Form>
+ </template>
+ );
await click(".set-foo");
@@ -208,12 +237,14 @@ module("Integration | Component | FormKit | Form", function (hooks) {
});
test("yielded set", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=1}} as |form data|>
- <div class="foo">{{data.foo}}</div>
- <form.Button class="test" @action={{fn form.set "foo" 2}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=1}} as |form data|>
+ <div class="foo">{{data.foo}}</div>
+ <form.Button class="test" @action={{fn form.set "foo" 2}} />
+ </Form>
+ </template>
+ );
await click(".test");
@@ -221,16 +252,18 @@ module("Integration | Component | FormKit | Form", function (hooks) {
});
test("yielded setProperties", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=1 bar=1}} as |form data|>
- <div class="foo">{{data.foo}}</div>
- <div class="bar">{{data.bar}}</div>
- <form.Button
- class="test"
- @action={{fn form.setProperties (hash foo=2 bar=2)}}
- />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=1 bar=1}} as |form data|>
+ <div class="foo">{{data.foo}}</div>
+ <div class="bar">{{data.bar}}</div>
+ <form.Button
+ class="test"
+ @action={{fn form.setProperties (hash foo=2 bar=2)}}
+ />
+ </Form>
+ </template>
+ );
await click(".test");
@@ -250,11 +283,13 @@ module("Integration | Component | FormKit | Form", function (hooks) {
}
};
- await render(<template>
- <Form @validate={{validate}} as |form|>
- <form.Submit />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @validate={{validate}} as |form|>
+ <form.Submit />
+ </Form>
+ </template>
+ );
await formKit().submit();
@@ -266,25 +301,27 @@ module("Integration | Component | FormKit | Form", function (hooks) {
});
test("destroying field", async function (assert) {
- await render(<template>
- <Form @data={{hash visible=true}} as |form data|>
- {{#if data.visible}}
- <form.Field
- @title="Foo"
- @name="foo"
- @validation="required"
- as |field|
- >
- <field.Input />
- </form.Field>
- {{/if}}
-
- <form.Button
- class="test"
- @action={{fn form.setProperties (hash visible=false)}}
- />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash visible=true}} as |form data|>
+ {{#if data.visible}}
+ <form.Field
+ @title="Foo"
+ @name="foo"
+ @validation="required"
+ as |field|
+ >
+ <field.Input />
+ </form.Field>
+ {{/if}}
+
+ <form.Button
+ class="test"
+ @action={{fn form.setProperties (hash visible=false)}}
+ />
+ </Form>
+ </template>
+ );
await formKit().submit();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/input-group-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/input-group-test.gjs
index 4d8d0429b8a..bdcf97bee89 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/input-group-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/input-group-test.gjs
@@ -13,18 +13,20 @@ module(
let data = {};
const mutateData = (x) => (data = x);
- await render(<template>
- <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
- <form.InputGroup as |inputGroup|>
- <inputGroup.Field @title="Foo" @name="foo" as |field|>
- <field.Input />
- </inputGroup.Field>
- <inputGroup.Field @title="Bar" @name="bar" as |field|>
- <field.Input />
- </inputGroup.Field>
- </form.InputGroup>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{mutateData}} @data={{data}} as |form|>
+ <form.InputGroup as |inputGroup|>
+ <inputGroup.Field @title="Foo" @name="foo" as |field|>
+ <field.Input />
+ </inputGroup.Field>
+ <inputGroup.Field @title="Bar" @name="bar" as |field|>
+ <field.Input />
+ </inputGroup.Field>
+ </form.InputGroup>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasValue("");
assert.form().field("bar").hasValue("");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/actions-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/actions-test.gjs
index b28a74905f7..0d3b47adab4 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/actions-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/actions-test.gjs
@@ -9,11 +9,13 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Actions class="something">Test</form.Actions>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Actions class="something">Test</form.Actions>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__section.form-kit__actions.something")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/alert-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/alert-test.gjs
index f373347230e..37015329e92 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/alert-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/alert-test.gjs
@@ -7,21 +7,25 @@ module("Integration | Component | FormKit | Layout | Alert", function (hooks) {
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Alert>Test</form.Alert>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Alert>Test</form.Alert>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__alert-message").hasText("Test");
});
test("@icon", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Alert @icon="pencil">Test</form.Alert>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Alert @icon="pencil">Test</form.Alert>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__alert .d-icon-pencil").exists();
});
@@ -31,11 +35,13 @@ module("Integration | Component | FormKit | Layout | Alert", function (hooks) {
for (let i = 0, length = types.length; i < length; i++) {
const type = types[i];
- await render(<template>
- <Form as |form|>
- <form.Alert @type={{type}}>Test</form.Alert>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Alert @type={{type}}>Test</form.Alert>
+ </Form>
+ </template>
+ );
assert.dom(`.form-kit__alert.alert.alert-${type}`).exists();
}
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/button-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/button-test.gjs
index ece2ddd9cdc..549ac4dac76 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/button-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/button-test.gjs
@@ -14,11 +14,13 @@ module("Integration | Component | FormKit | Layout | Button", function (hooks) {
done();
};
- await render(<template>
- <Form as |form|>
- <form.Button class="something" @action={{fn somethingAction 1}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Button class="something" @action={{fn somethingAction 1}} />
+ </Form>
+ </template>
+ );
await click(".something");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/checkbox-group-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/checkbox-group-test.gjs
index c785a7ec655..5f721d70924 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/checkbox-group-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/checkbox-group-test.gjs
@@ -9,18 +9,20 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.CheckboxGroup as |checkboxGroup|>
- <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </checkboxGroup.Field>
- <checkboxGroup.Field @name="bar" @title="Bar" as |field|>
- <field.Checkbox>A description</field.Checkbox>
- </checkboxGroup.Field>
- </form.CheckboxGroup>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.CheckboxGroup as |checkboxGroup|>
+ <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </checkboxGroup.Field>
+ <checkboxGroup.Field @name="bar" @title="Bar" as |field|>
+ <field.Checkbox>A description</field.Checkbox>
+ </checkboxGroup.Field>
+ </form.CheckboxGroup>
+ </Form>
+ </template>
+ );
assert.form().field("foo").hasTitle("Foo (optional)");
assert.form().field("bar").hasTitle("Bar (optional)");
@@ -28,15 +30,17 @@ module(
});
test("@title", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.CheckboxGroup @title="bar" as |checkboxGroup|>
- <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </checkboxGroup.Field>
- </form.CheckboxGroup>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.CheckboxGroup @title="bar" as |checkboxGroup|>
+ <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </checkboxGroup.Field>
+ </form.CheckboxGroup>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__checkbox-group .form-kit__fieldset-title")
@@ -44,15 +48,17 @@ module(
});
test("@description", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.CheckboxGroup @description="bar" as |checkboxGroup|>
- <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
- <field.Checkbox />
- </checkboxGroup.Field>
- </form.CheckboxGroup>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.CheckboxGroup @description="bar" as |checkboxGroup|>
+ <checkboxGroup.Field @name="foo" @title="Foo" as |field|>
+ <field.Checkbox />
+ </checkboxGroup.Field>
+ </form.CheckboxGroup>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__checkbox-group .form-kit__fieldset-description")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/container-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/container-test.gjs
index b288072832a..9afd622e8f6 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/container-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/container-test.gjs
@@ -9,11 +9,13 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Container class="something">Test</form.Container>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Container class="something">Test</form.Container>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__container.something .form-kit__container-content")
@@ -21,11 +23,13 @@ module(
});
test("@title", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Container @title="Title">Test</form.Container>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Container @title="Title">Test</form.Container>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__container .form-kit__container-title")
@@ -33,11 +37,13 @@ module(
});
test("@subtitle", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Container @subtitle="Subtitle">Test</form.Container>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Container @subtitle="Subtitle">Test</form.Container>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__container .form-kit__container-subtitle")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/fieldset-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/fieldset-test.gjs
index 8a67ad5d98a..6a519ef62d8 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/fieldset-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/fieldset-test.gjs
@@ -9,17 +9,19 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Fieldset
- @title="Title"
- @description="Description"
- @name="a-fieldset"
- >
- Yielded content
- </form.Fieldset>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Fieldset
+ @title="Title"
+ @description="Description"
+ @name="a-fieldset"
+ >
+ Yielded content
+ </form.Fieldset>
+ </Form>
+ </template>
+ );
assert
.form()
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/row-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/row-test.gjs
index 40e8ea708c2..77ed599a640 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/row-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/row-test.gjs
@@ -7,25 +7,29 @@ module("Integration | Component | FormKit | Layout | Row", function (hooks) {
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Row as |row|>
- <row.Col>Test</row.Col>
- </form.Row>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Row as |row|>
+ <row.Col>Test</row.Col>
+ </form.Row>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__row .form-kit__col").hasText("Test");
});
test("@size", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Row as |row|>
- <row.Col @size={{6}}>Test</row.Col>
- </form.Row>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Row as |row|>
+ <row.Col @size={{6}}>Test</row.Col>
+ </form.Row>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__row .form-kit__col.--col-6").hasText("Test");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/section-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/section-test.gjs
index 0db4759bf95..a6d54b785e3 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/section-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/section-test.gjs
@@ -9,21 +9,25 @@ module(
setupRenderingTest(hooks);
test("default", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Section class="something">Test</form.Section>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Section class="something">Test</form.Section>
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__section.something").hasText("Test");
});
test("@title", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Section @title="Title">Test</form.Section>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Section @title="Title">Test</form.Section>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__section .form-kit__section-title")
@@ -31,11 +35,13 @@ module(
});
test("@subtitle", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Section @subtitle="Subtitle">Test</form.Section>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Section @subtitle="Subtitle">Test</form.Section>
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__section .form-kit__section-subtitle")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/submit-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/submit-test.gjs
index 3a276161156..69c04b29819 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/submit-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/layout/submit-test.gjs
@@ -15,11 +15,13 @@ module("Integration | Component | FormKit | Layout | Submit", function (hooks) {
done();
};
- await render(<template>
- <Form @onSubmit={{submit}} as |form|>
- <form.Submit />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @onSubmit={{submit}} as |form|>
+ <form.Submit />
+ </Form>
+ </template>
+ );
await click("button");
@@ -28,11 +30,13 @@ module("Integration | Component | FormKit | Layout | Submit", function (hooks) {
});
test("@label", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Submit @label="cancel" />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Submit @label="cancel" />
+ </Form>
+ </template>
+ );
assert
.dom(".form-kit__button")
@@ -40,11 +44,13 @@ module("Integration | Component | FormKit | Layout | Submit", function (hooks) {
});
test("@isLoading", async function (assert) {
- await render(<template>
- <Form as |form|>
- <form.Submit @label="cancel" @isLoading={{true}} />
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form as |form|>
+ <form.Submit @label="cancel" @isLoading={{true}} />
+ </Form>
+ </template>
+ );
assert.dom(".form-kit__button .d-icon-spinner").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/form-kit/object-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/form-kit/object-test.gjs
index 0125bd168f0..6d3edda0e2d 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/form-kit/object-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/form-kit/object-test.gjs
@@ -9,37 +9,41 @@ module("Integration | Component | FormKit | Object", function (hooks) {
setupRenderingTest(hooks);
test("field", async function (assert) {
- await render(<template>
- <Form @data={{hash foo=(hash bar=1 baz=2)}} as |form|>
- <form.Object @name="foo" as |object name|>
- <object.Field @name={{name}} @title={{name}} as |field|>
- <field.Input />
- </object.Field>
- </form.Object>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form @data={{hash foo=(hash bar=1 baz=2)}} as |form|>
+ <form.Object @name="foo" as |object name|>
+ <object.Field @name={{name}} @title={{name}} as |field|>
+ <field.Input />
+ </object.Field>
+ </form.Object>
+ </Form>
+ </template>
+ );
assert.form().field("foo.bar").hasValue("1");
assert.form().field("foo.baz").hasValue("2");
});
test("nested object", async function (assert) {
- await render(<template>
- <Form
- @data={{hash one=(hash two=(hash three=(hash foo=1 bar=2)))}}
- as |form|
- >
- <form.Object @name="one" as |one|>
- <one.Object @name="two" as |two|>
- <two.Object @name="three" as |three name|>
- <three.Field @name={{name}} @title={{name}} as |field|>
- <field.Input />
- </three.Field>
- </two.Object>
- </one.Object>
- </form.Object>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form
+ @data={{hash one=(hash two=(hash three=(hash foo=1 bar=2)))}}
+ as |form|
+ >
+ <form.Object @name="one" as |one|>
+ <one.Object @name="two" as |two|>
+ <two.Object @name="three" as |three name|>
+ <three.Field @name={{name}} @title={{name}} as |field|>
+ <field.Input />
+ </three.Field>
+ </two.Object>
+ </one.Object>
+ </form.Object>
+ </Form>
+ </template>
+ );
assert.form().field("one.two.three.foo").hasValue("1");
assert.form().field("one.two.three.bar").hasValue("2");
@@ -50,24 +54,26 @@ module("Integration | Component | FormKit | Object", function (hooks) {
});
test("nested collection", async function (assert) {
- await render(<template>
- <Form
- @data={{hash one=(hash two=(array (hash foo=1) (hash foo=2)))}}
- as |form|
- >
- <form.Object @name="one" as |one|>
- <one.Collection @name="two" as |two twoIndex|>
- <two.Field @name="foo" @title="foo" as |field|>
- <field.Input />
- </two.Field>
- <form.Button
- class={{concat "remove-" twoIndex}}
- @action={{fn two.remove twoIndex}}
- >Remove</form.Button>
- </one.Collection>
- </form.Object>
- </Form>
- </template>);
+ await render(
+ <template>
+ <Form
+ @data={{hash one=(hash two=(array (hash foo=1) (hash foo=2)))}}
+ as |form|
+ >
+ <form.Object @name="one" as |one|>
+ <one.Collection @name="two" as |two twoIndex|>
+ <two.Field @name="foo" @title="foo" as |field|>
+ <field.Input />
+ </two.Field>
+ <form.Button
+ class={{concat "remove-" twoIndex}}
+ @action={{fn two.remove twoIndex}}
+ >Remove</form.Button>
+ </one.Collection>
+ </form.Object>
+ </Form>
+ </template>
+ );
assert.form().field("one.two.0.foo").hasValue("1");
assert.form().field("one.two.1.foo").hasValue("2");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.gjs
index d1c91f1b313..125675e0e4d 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/highlighted-code-test.gjs
@@ -8,9 +8,11 @@ module("Integration | Component | highlighted-code", function (hooks) {
setupRenderingTest(hooks);
test("highlighting code", async function (assert) {
- await render(<template>
- <HighlightedCode @lang="ruby" @code="def test; end" />
- </template>);
+ await render(
+ <template>
+ <HighlightedCode @lang="ruby" @code="def test; end" />
+ </template>
+ );
assert.dom("code.lang-ruby.hljs .hljs-keyword").hasText("def");
});
@@ -18,17 +20,21 @@ module("Integration | Component | highlighted-code", function (hooks) {
test("large code blocks are not highlighted", async function (assert) {
const longCodeBlock = "puts a\n".repeat(15000);
- await render(<template>
- <HighlightedCode @lang="ruby" @code={{longCodeBlock}} />
- </template>);
+ await render(
+ <template>
+ <HighlightedCode @lang="ruby" @code={{longCodeBlock}} />
+ </template>
+ );
assert.dom("pre code").hasText(longCodeBlock);
});
test("highlighting code with lang=auto", async function (assert) {
- await render(<template>
- <HighlightedCode @lang="auto" @code="def test; end" />
- </template>);
+ await render(
+ <template>
+ <HighlightedCode @lang="auto" @code="def test; end" />
+ </template>
+ );
assert.dom("code.hljs").hasNoClass("lang-auto", "lang-auto is removed");
assert.dom("code.hljs").hasClass(/language-/, "language is detected");
@@ -48,10 +54,12 @@ module("Integration | Component | highlighted-code", function (hooks) {
const testState = new State();
- await render(<template>
- <HighlightedCode @lang="ruby" @code={{testState.code}} />
- {{testState.code}}
- </template>);
+ await render(
+ <template>
+ <HighlightedCode @lang="ruby" @code={{testState.code}} />
+ {{testState.code}}
+ </template>
+ );
assert.dom("code.lang-ruby.hljs .hljs-title").hasText("foo");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/latest-topic-list-item-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/latest-topic-list-item-test.gjs
index 15ab9ada6e4..30c41eb6151 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/latest-topic-list-item-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/latest-topic-list-item-test.gjs
@@ -23,10 +23,12 @@ module("Integration | Component | latest-topic-list-item", function (hooks) {
const store = this.owner.lookup("service:store");
const topic = store.createRecord("topic", { id: 1234, foo: true });
const topic2 = store.createRecord("topic", { id: 1235, foo: false });
- await render(<template>
- <LatestTopicListItem @topic={{topic}} />
- <LatestTopicListItem @topic={{topic2}} />
- </template>);
+ await render(
+ <template>
+ <LatestTopicListItem @topic={{topic}} />
+ <LatestTopicListItem @topic={{topic2}} />
+ </template>
+ );
assert.dom(".latest-topic-list-item[data-topic-id='1234']").hasClass("bar");
assert
diff --git a/app/assets/javascripts/discourse/tests/integration/components/light-dark-img-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/light-dark-img-test.gjs
index cd35e2e6945..4f9744472b9 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/light-dark-img-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/light-dark-img-test.gjs
@@ -45,9 +45,11 @@ module("Integration | Component | light-dark-img", function (hooks) {
this.session.set("defaultColorSchemeIsDark", false);
this.session.set("darkModeAvailable", false);
- await render(<template>
- <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
- </template>);
+ await render(
+ <template>
+ <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
+ </template>
+ );
assert.dom("picture").doesNotExist("there is no picture tag");
assert.dom("img").exists("there is an img tag");
@@ -86,9 +88,11 @@ module("Integration | Component | light-dark-img", function (hooks) {
this.session.set("defaultColorSchemeIsDark", false);
this.session.set("darkModeAvailable", true);
- await render(<template>
- <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
- </template>);
+ await render(
+ <template>
+ <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
+ </template>
+ );
assert.dom("picture").exists("there is a picture tag");
assert.dom("img").exists("there is an img tag");
@@ -134,9 +138,11 @@ module("Integration | Component | light-dark-img", function (hooks) {
this.session.set("defaultColorSchemeIsDark", true);
this.session.set("darkModeAvailable", false);
- await render(<template>
- <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
- </template>);
+ await render(
+ <template>
+ <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
+ </template>
+ );
assert.dom("picture").exists("there is a picture tag");
assert.dom("img").exists("there is an img tag");
@@ -182,9 +188,11 @@ module("Integration | Component | light-dark-img", function (hooks) {
this.session.set("defaultColorSchemeIsDark", true);
this.session.set("darkModeAvailable", true);
- await render(<template>
- <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
- </template>);
+ await render(
+ <template>
+ <LightDarkImg @lightImg={{lightSrc}} @darkImg={{darkSrc}} />
+ </template>
+ );
assert.dom("picture").exists("there is a picture tag");
assert.dom("img").exists("there is an img tag");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/notifications-tracking-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/notifications-tracking-test.gjs
index 357818486c3..dcf6a91e4f4 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/notifications-tracking-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/notifications-tracking-test.gjs
@@ -23,9 +23,9 @@ module("Integration | Component | TopicTracking", function (hooks) {
setupRenderingTest(hooks);
test("regular topic notification level descriptions", async function (assert) {
- await render(<template>
- <TopicNotificationsTracking @levelId={{1}} />
- </template>);
+ await render(
+ <template><TopicNotificationsTracking @levelId={{1}} /></template>
+ );
await click(".notifications-tracking-trigger");
@@ -50,12 +50,14 @@ module("Integration | Component | TopicTracking", function (hooks) {
});
test("PM topic notification level descriptions", async function (assert) {
- await render(<template>
- <TopicNotificationsTracking
- @levelId={{1}}
- @topic={{hash archetype="private_message"}}
- />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsTracking
+ @levelId={{1}}
+ @topic={{hash archetype="private_message"}}
+ />
+ </template>
+ );
await click(".notifications-tracking-trigger");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs
index c936edbff18..e4e0b42cfb1 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs
@@ -34,9 +34,11 @@ module("Plugin Outlet - Decorator", function (hooks) {
});
test("Calls the plugin callback with the rendered outlet", async function (assert) {
- await render(<template>
- <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />
+ </template>
+ );
assert.dom(".my-outlet-name-outlet.foo").exists();
assert
@@ -46,19 +48,23 @@ module("Plugin Outlet - Decorator", function (hooks) {
.dom(".my-outlet-name-outlet.bar")
.doesNotHaveStyle("backgroundColor");
- await render(<template>
- <PluginOutlet
- @connectorTagName="div"
- @name="my-outlet-name"
- @outletArgs={{hash value=true}}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @connectorTagName="div"
+ @name="my-outlet-name"
+ @outletArgs={{hash value=true}}
+ />
+ </template>
+ );
assert.dom(".my-outlet-name-outlet.foo").hasClass("has-value");
- await render(<template>
- <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />
+ </template>
+ );
assert.dom(".my-outlet-name-outlet.foo").doesNotHaveClass("has-value");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs
index a8af6fd3c09..66f67adcd58 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs
@@ -373,11 +373,13 @@ module("Integration | Component | plugin-outlet", function (hooks) {
);
test("Renders wrapped implementation if no connectors are registered", async function (assert) {
- await render(<template>
- <PluginOutlet @name="outlet-with-no-registrations">
- <span class="result">Core implementation</span>
- </PluginOutlet>
- </template>);
+ await render(
+ <template>
+ <PluginOutlet @name="outlet-with-no-registrations">
+ <span class="result">Core implementation</span>
+ </PluginOutlet>
+ </template>
+ );
assert.dom(".result").hasText("Core implementation");
});
@@ -457,14 +459,16 @@ module("Integration | Component | plugin-outlet", function (hooks) {
});
test("deprecated parameters with default message", async function (assert) {
- await render(<template>
- <PluginOutlet
- @name="test-name"
- @deprecatedArgs={{hash
- shouldDisplay=(deprecatedOutletArgument value=true)
- }}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @name="test-name"
+ @deprecatedArgs={{hash
+ shouldDisplay=(deprecatedOutletArgument value=true)
+ }}
+ />
+ </template>
+ );
// deprecated argument still works
assert.dom(".conditional-render").exists("renders conditional outlet");
@@ -483,20 +487,22 @@ module("Integration | Component | plugin-outlet", function (hooks) {
});
test("deprecated parameters with custom deprecation data", async function (assert) {
- await render(<template>
- <PluginOutlet
- @name="test-name"
- @deprecatedArgs={{hash
- shouldDisplay=(deprecatedOutletArgument
- value=true
- message="The 'shouldDisplay' is deprecated on this test"
- id="discourse.plugin-connector.deprecated-arg.test"
- since="3.3.0.beta4-dev"
- dropFrom="3.4.0"
- )
- }}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @name="test-name"
+ @deprecatedArgs={{hash
+ shouldDisplay=(deprecatedOutletArgument
+ value=true
+ message="The 'shouldDisplay' is deprecated on this test"
+ id="discourse.plugin-connector.deprecated-arg.test"
+ since="3.3.0.beta4-dev"
+ dropFrom="3.4.0"
+ )
+ }}
+ />
+ </template>
+ );
// deprecated argument still works
assert.dom(".conditional-render").exists("renders conditional outlet");
@@ -544,17 +550,19 @@ module("Integration | Component | plugin-outlet", function (hooks) {
},
};
- await render(<template>
- <PluginOutlet
- @name="test-name"
- @deprecatedArgs={{hash
- shouldDisplay=(deprecatedOutletArgument
- value=deprecatedData.display
- silence="discourse.deprecation-that-should-not-be-logged"
- )
- }}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @name="test-name"
+ @deprecatedArgs={{hash
+ shouldDisplay=(deprecatedOutletArgument
+ value=deprecatedData.display
+ silence="discourse.deprecation-that-should-not-be-logged"
+ )
+ }}
+ />
+ </template>
+ );
// deprecated argument still works
assert.dom(".conditional-render").exists("renders conditional outlet");
@@ -583,15 +591,17 @@ module("Integration | Component | plugin-outlet", function (hooks) {
});
test("unused arguments", async function (assert) {
- await render(<template>
- <PluginOutlet
- @name="test-name"
- @outletArgs={{hash shouldDisplay=true}}
- @deprecatedArgs={{hash
- argNotUsed=(deprecatedOutletArgument value=true)
- }}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @name="test-name"
+ @outletArgs={{hash shouldDisplay=true}}
+ @deprecatedArgs={{hash
+ argNotUsed=(deprecatedOutletArgument value=true)
+ }}
+ />
+ </template>
+ );
// deprecated argument still works
assert.dom(".conditional-render").exists("renders conditional outlet");
@@ -688,13 +698,15 @@ module(
await withSilencedDeprecationsAsync(
"discourse.plugin-outlet-classic-hooks",
async () => {
- await render(<template>
- <PluginOutlet
- @name="test-name"
- @outletArgs={{hash hello="world"}}
- @defaultGlimmer={{true}}
- />
- </template>);
+ await render(
+ <template>
+ <PluginOutlet
+ @name="test-name"
+ @outletArgs={{hash hello="world"}}
+ @defaultGlimmer={{true}}
+ />
+ </template>
+ );
}
);
@@ -962,7 +974,9 @@ module(
hooks.beforeEach(function () {
registerTemporaryModule(
`${CLASS_PREFIX}/test-name/my-connector`,
- <template><span class="gjs-test">Hello world</span></template>
+ <template>
+ <span class="gjs-test">Hello world</span>
+ </template>
);
});
@@ -980,9 +994,12 @@ module(
setupRenderingTest(hooks);
hooks.beforeEach(function () {
- extraConnectorComponent("test-name", <template>
- <span class="gjs-test">Hello world from gjs</span>
- </template>);
+ extraConnectorComponent(
+ "test-name",
+ <template>
+ <span class="gjs-test">Hello world from gjs</span>
+ </template>
+ );
});
test("renders the component in the outlet", async function (assert) {
@@ -992,9 +1009,10 @@ module(
test("throws errors for invalid components", function (assert) {
assert.throws(() => {
- extraConnectorComponent("test-name/blah", <template>
- hello world
- </template>);
+ extraConnectorComponent(
+ "test-name/blah",
+ <template>hello world</template>
+ );
}, /invalid outlet name/);
assert.throws(() => {
@@ -1015,9 +1033,9 @@ module("Integration | Component | plugin-outlet | tagName", function (hooks) {
await withSilencedDeprecationsAsync(
"discourse.plugin-outlet-tag-name",
async () =>
- await render(<template>
- <PluginOutlet @name="test-name" @tagName="div" />
- </template>)
+ await render(
+ <template><PluginOutlet @name="test-name" @tagName="div" /></template>
+ )
);
assert.dom("div").exists();
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/post-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/post-list-test.gjs
index b867d6da082..7302a7b6396 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/post-list-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/post-list-test.gjs
@@ -18,9 +18,14 @@ module("Integration | Component | PostList | Index", function (hooks) {
test("@additionalItemClasses", async function (assert) {
const posts = postModel;
const additionalClasses = ["first-class", "second-class"];
- await render(<template>
- <PostList @posts={{posts}} @additionalItemClasses={{additionalClasses}} />
- </template>);
+ await render(
+ <template>
+ <PostList
+ @posts={{posts}}
+ @additionalItemClasses={{additionalClasses}}
+ />
+ </template>
+ );
assert.dom(".post-list-item").hasClass("first-class");
assert.dom(".post-list-item").hasClass("second-class");
});
@@ -28,9 +33,11 @@ module("Integration | Component | PostList | Index", function (hooks) {
test("@titleAriaLabel", async function (assert) {
const posts = postModel;
const titleAriaLabel = "My custom aria title label";
- await render(<template>
- <PostList @posts={{posts}} @titleAriaLabel={{titleAriaLabel}} />
- </template>);
+ await render(
+ <template>
+ <PostList @posts={{posts}} @titleAriaLabel={{titleAriaLabel}} />
+ </template>
+ );
assert
.dom(".post-list-item__details .title a")
.hasAttribute("aria-label", titleAriaLabel);
@@ -38,17 +45,19 @@ module("Integration | Component | PostList | Index", function (hooks) {
test("@emptyText", async function (assert) {
const posts = [];
- await render(<template>
- <PostList @posts={{posts}} @emptyText="My custom empty text" />
- </template>);
+ await render(
+ <template>
+ <PostList @posts={{posts}} @emptyText="My custom empty text" />
+ </template>
+ );
assert.dom(".post-list__empty-text").hasText("My custom empty text");
});
test("@showUserInfo", async function (assert) {
const posts = postModel;
- await render(<template>
- <PostList @posts={{posts}} @showUserInfo={{false}} />
- </template>);
+ await render(
+ <template><PostList @posts={{posts}} @showUserInfo={{false}} /></template>
+ );
assert.dom(".post-list-item__details .post-member-info").doesNotExist();
});
@@ -57,9 +66,11 @@ module("Integration | Component | PostList | Index", function (hooks) {
post.topic_html_title = `Fancy title`;
return post;
});
- await render(<template>
- <PostList @posts={{posts}} @titlePath="topic_html_title" />
- </template>);
+ await render(
+ <template>
+ <PostList @posts={{posts}} @titlePath="topic_html_title" />
+ </template>
+ );
assert.dom(".post-list-item__details .title a").hasText("Fancy title");
});
@@ -68,9 +79,9 @@ module("Integration | Component | PostList | Index", function (hooks) {
post.post_id = post.id;
return post;
});
- await render(<template>
- <PostList @posts={{posts}} @idPath="post_id" />
- </template>);
+ await render(
+ <template><PostList @posts={{posts}} @idPath="post_id" /></template>
+ );
assert.dom(".post-list-item .excerpt").hasAttribute("data-post-id", "1");
});
@@ -79,9 +90,9 @@ module("Integration | Component | PostList | Index", function (hooks) {
post.postUrl = `/t/${post.topic_id}/${post.id}`;
return post;
});
- await render(<template>
- <PostList @posts={{posts}} @urlPath="postUrl" />
- </template>);
+ await render(
+ <template><PostList @posts={{posts}} @urlPath="postUrl" /></template>
+ );
assert
.dom(".post-list-item__details .title a")
.hasAttribute("href", "/t/1/1");
@@ -93,9 +104,11 @@ module("Integration | Component | PostList | Index", function (hooks) {
return post;
});
- await render(<template>
- <PostList @posts={{posts}} @usernamePath="draft_username" />
- </template>);
+ await render(
+ <template>
+ <PostList @posts={{posts}} @usernamePath="draft_username" />
+ </template>
+ );
assert
.dom(".post-list-item__header .avatar-link")
.hasAttribute("data-user-card", "john");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/prosemirror-editor/prosemirror-editor-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/prosemirror-editor/prosemirror-editor-test.gjs
index 91e695e3195..10f32e83f44 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/prosemirror-editor/prosemirror-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/prosemirror-editor/prosemirror-editor-test.gjs
@@ -30,12 +30,14 @@ module("Integration | Component | prosemirror-editor", function (hooks) {
{ nodeSpec: { doc: { content: "inline*" }, text: { group: "inline" } } },
];
- await render(<template>
- <ProsemirrorEditor
- @includeDefault={{false}}
- @extensions={{minimumExtensions}}
- />
- </template>);
+ await render(
+ <template>
+ <ProsemirrorEditor
+ @includeDefault={{false}}
+ @extensions={{minimumExtensions}}
+ />
+ </template>
+ );
assert.dom(".ProseMirror").exists("it renders the ProseMirror editor");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/relative-time-picker-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/relative-time-picker-test.gjs
index 95adb0132eb..b7efc967602 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/relative-time-picker-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/relative-time-picker-test.gjs
@@ -11,9 +11,9 @@ module("Integration | Component | relative-time-picker", function (hooks) {
test("calls the onChange arg", async function (assert) {
let updatedValue;
const update = (value) => (updatedValue = value);
- await render(<template>
- <RelativeTimePicker @onChange={{update}} />
- </template>);
+ await render(
+ <template><RelativeTimePicker @onChange={{update}} /></template>
+ );
// empty and "minutes" by default
assert.dom(".relative-time-duration").hasValue("");
@@ -78,12 +78,14 @@ module("Integration | Component | relative-time-picker", function (hooks) {
})();
const update = (value) => (testState.minutes = value);
- await render(<template>
- <RelativeTimePicker
- @onChange={{update}}
- @durationMinutes={{testState.minutes}}
- />
- </template>);
+ await render(
+ <template>
+ <RelativeTimePicker
+ @onChange={{update}}
+ @durationMinutes={{testState.minutes}}
+ />
+ </template>
+ );
// uses the value and selects the right interval
assert.dom(".relative-time-duration").hasValue("2");
@@ -156,9 +158,11 @@ module("Integration | Component | relative-time-picker", function (hooks) {
})();
testState.value = 10;
- await render(<template>
- <RelativeTimePicker @durationMinutes={{testState.value}} />
- </template>);
+ await render(
+ <template>
+ <RelativeTimePicker @durationMinutes={{testState.value}} />
+ </template>
+ );
assert.strictEqual(selectKit().header().value(), "mins");
assert.dom(".relative-time-duration").hasValue("10");
@@ -170,108 +174,108 @@ module("Integration | Component | relative-time-picker", function (hooks) {
});
test("prefills and preselects minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes="5" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes="5" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "mins");
assert.dom(".relative-time-duration").hasValue("5");
});
test("prefills and preselects null minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes={{null}} />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes={{null}} /></template>
+ );
assert.strictEqual(selectKit().header().value(), "mins");
assert.dom(".relative-time-duration").hasValue("");
});
test("prefills and preselects hours based on converted minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes="90" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes="90" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "hours");
assert.dom(".relative-time-duration").hasValue("1.5");
});
test("prefills and preselects days based on converted minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes="2880" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes="2880" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "days");
assert.dom(".relative-time-duration").hasValue("2");
});
test("prefills and preselects months based on converted minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes="151200" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes="151200" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "months");
assert.dom(".relative-time-duration").hasValue("3.5");
});
test("prefills and preselects years based on converted minutes", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationMinutes="525700" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationMinutes="525700" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "years");
assert.dom(".relative-time-duration").hasValue("1");
});
test("prefills and preselects hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours="5" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours="5" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "hours");
assert.dom(".relative-time-duration").hasValue("5");
});
test("prefills and preselects null hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours={{null}} />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours={{null}} /></template>
+ );
assert.strictEqual(selectKit().header().value(), "hours");
assert.dom(".relative-time-duration").hasValue("");
});
test("prefills and preselects minutes based on converted hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours="0.5" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours="0.5" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "mins");
assert.dom(".relative-time-duration").hasValue("30");
});
test("prefills and preselects days based on converted hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours="48" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours="48" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "days");
assert.dom(".relative-time-duration").hasValue("2");
});
test("prefills and preselects months based on converted hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours="2160" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours="2160" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "months");
assert.dom(".relative-time-duration").hasValue("3");
});
test("prefills and preselects years based on converted hours", async function (assert) {
- await render(<template>
- <RelativeTimePicker @durationHours="17520" />
- </template>);
+ await render(
+ <template><RelativeTimePicker @durationHours="17520" /></template>
+ );
assert.strictEqual(selectKit().header().value(), "years");
assert.dom(".relative-time-duration").hasValue("2");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/request-group-membership-form-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/request-group-membership-form-test.gjs
index ee9d3388071..476389e507e 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/request-group-membership-form-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/request-group-membership-form-test.gjs
@@ -18,9 +18,11 @@ module(
});
const model = { group };
- await render(<template>
- <RequestGroupMembershipForm @model={{model}} @inline={{true}} />
- </template>);
+ await render(
+ <template>
+ <RequestGroupMembershipForm @model={{model}} @inline={{true}} />
+ </template>
+ );
assert.dom("textarea").hasValue("plz accept thx");
assert.dom(".btn-primary").isEnabled();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/search-menu-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/search-menu-test.gjs
index b954d963d46..bb42ad84a4e 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/search-menu-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/search-menu-test.gjs
@@ -71,7 +71,11 @@ module("Integration | Component | search-menu", function (hooks) {
});
test("clicking outside results hides and blurs input", async function (assert) {
- await render(<template><div id="click-me"><SearchMenu /></div></template>);
+ await render(
+ <template>
+ <div id="click-me"><SearchMenu /></div>
+ </template>
+ );
await click("#search-term");
assert
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/group-chooser-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/select-kit/group-chooser-test.gjs
index 5cea5454cab..d31fc36c1c0 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/group-chooser-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/group-chooser-test.gjs
@@ -27,12 +27,14 @@ module("Integration | Component | select-kit/group-chooser", function (hooks) {
name: "ABC",
},
];
- await render(<template>
- <GroupChooser
- @content={{content}}
- @options={{hash displayedGroupsLimit=1}}
- />
- </template>);
+ await render(
+ <template>
+ <GroupChooser
+ @content={{content}}
+ @options={{hash displayedGroupsLimit=1}}
+ />
+ </template>
+ );
await this.subject.expand();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.gjs
index 96ef293ad14..4b9ed1424ba 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/tag-drop-test.gjs
@@ -28,13 +28,15 @@ module("Integration | Component | select-kit/tag-drop", function (hooks) {
const categories = this.site.categoriesList;
const category = categories.findBy("id", 2);
- await render(<template>
- <TagDrop
- @currentCategory={{category}}
- @tagId="jeff"
- @options={{hash tagId="jeff"}}
- />
- </template>);
+ await render(
+ <template>
+ <TagDrop
+ @currentCategory={{category}}
+ @tagId="jeff"
+ @options={{hash tagId="jeff"}}
+ />
+ </template>
+ );
await this.subject.expand();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.gjs
index f626edaad01..afb249729a1 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/topic-notifications-button-test.gjs
@@ -45,9 +45,11 @@ module(
const state = new TestClass();
state.topic = buildTopic.call(this, { level: 1 });
- await render(<template>
- <TopicNotificationsButton @topic={{state.topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{state.topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".notifications-tracking-trigger")
@@ -68,9 +70,11 @@ module(
archetype: "private_message",
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".notifications-tracking-trigger")
@@ -81,9 +85,11 @@ module(
this.currentUser.set("user_option.mailing_list_mode", true);
const topic = buildTopic.call(this, { level: 2 });
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -97,9 +103,11 @@ module(
const state = new TestClass();
state.topic = buildTopic.call(this, { level: 2 });
- await render(<template>
- <TopicNotificationsButton @topic={{state.topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{state.topic}} @expanded={{true}} />
+ </template>
+ );
state.topic = buildTopic.call(this, { level: 3, reason: 999 });
await settled();
@@ -120,9 +128,11 @@ module(
category_id: 88,
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -140,9 +150,11 @@ module(
category_id: 88,
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -160,9 +172,11 @@ module(
category_id: 88,
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -180,9 +194,11 @@ module(
category_id: 88,
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -200,9 +216,11 @@ module(
tags: ["test"],
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
@@ -220,9 +238,11 @@ module(
tags: ["test"],
});
- await render(<template>
- <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicNotificationsButton @topic={{topic}} @expanded={{true}} />
+ </template>
+ );
assert
.dom(".topic-notifications-button .text")
diff --git a/app/assets/javascripts/discourse/tests/integration/components/topic-list-item-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/topic-list-item-test.gjs
index facc422ddb1..d267a3134ec 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/topic-list-item-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/topic-list-item-test.gjs
@@ -15,18 +15,20 @@ module("Integration | Component | topic-list-item", function (hooks) {
const topic2 = store.createRecord("topic", { id: 24235 });
const selected = [topic];
- await render(<template>
- <HbrTopicListItem
- @topic={{topic}}
- @bulkSelectEnabled={{true}}
- @selected={{selected}}
- />
- <HbrTopicListItem
- @topic={{topic2}}
- @bulkSelectEnabled={{true}}
- @selected={{selected}}
- />
- </template>);
+ await render(
+ <template>
+ <HbrTopicListItem
+ @topic={{topic}}
+ @bulkSelectEnabled={{true}}
+ @selected={{selected}}
+ />
+ <HbrTopicListItem
+ @topic={{topic2}}
+ @bulkSelectEnabled={{true}}
+ @selected={{selected}}
+ />
+ </template>
+ );
const checkboxes = [...document.querySelectorAll("input.bulk-select")];
assert.dom(checkboxes[0]).isChecked();
@@ -49,10 +51,12 @@ module("Integration | Component | topic-list-item", function (hooks) {
const store = this.owner.lookup("service:store");
const topic = store.createRecord("topic", { id: 1234, foo: true });
const topic2 = store.createRecord("topic", { id: 1235, foo: false });
- await render(<template>
- <TopicListItem @topic={{topic}} />
- <TopicListItem @topic={{topic2}} />
- </template>);
+ await render(
+ <template>
+ <TopicListItem @topic={{topic}} />
+ <TopicListItem @topic={{topic2}} />
+ </template>
+ );
assert.dom(".topic-list-item[data-topic-id='1234']").hasClass("bar");
assert
diff --git a/app/assets/javascripts/discourse/tests/integration/components/topic-list-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/topic-list-test.gjs
index 2fda07c5d58..b1c704c197e 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/topic-list-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/topic-list-test.gjs
@@ -17,13 +17,15 @@ module("Integration | Component | topic-list", function (hooks) {
store.createRecord("topic", { id: 24235 }),
];
- await render(<template>
- <HbrTopicList
- @canBulkSelect={{true}}
- @bulkSelectHelper={{bulkSelectHelper}}
- @topics={{topics}}
- />
- </template>);
+ await render(
+ <template>
+ <HbrTopicList
+ @canBulkSelect={{true}}
+ @bulkSelectHelper={{bulkSelectHelper}}
+ @topics={{topics}}
+ />
+ </template>
+ );
assert.strictEqual(bulkSelectHelper.selected.length, 0, "defaults to 0");
@@ -62,9 +64,11 @@ module("Integration | Component | topic-list", function (hooks) {
store.createRecord("topic", { id: 24235, pinned: true }),
];
- await render(<template>
- <TopicList @topics={{topics}} @highlightLastVisited={{true}} />
- </template>);
+ await render(
+ <template>
+ <TopicList @topics={{topics}} @highlightLastVisited={{true}} />
+ </template>
+ );
assert.dom(".topic-status .d-icon-thumbtack").exists({ count: 2 });
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/uppy-image-uploader-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/uppy-image-uploader-test.gjs
index 50907b344a2..7afe6909797 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/uppy-image-uploader-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/uppy-image-uploader-test.gjs
@@ -7,14 +7,16 @@ module("Integration | Component | uppy-image-uploader", function (hooks) {
setupRenderingTest(hooks);
test("with image", async function (assert) {
- await render(<template>
- <UppyImageUploader
- @type="avatar"
- @id="uploader"
- @imageUrl="/images/avatar.png"
- @placeholderUrl="/not/used.png"
- />
- </template>);
+ await render(
+ <template>
+ <UppyImageUploader
+ @type="avatar"
+ @id="uploader"
+ @imageUrl="/images/avatar.png"
+ @placeholderUrl="/not/used.png"
+ />
+ </template>
+ );
assert.dom(".d-icon-far-image").exists("displays the upload icon");
assert.dom(".d-icon-trash-can").exists("displays the trash icon");
@@ -29,9 +31,11 @@ module("Integration | Component | uppy-image-uploader", function (hooks) {
});
test("without image", async function (assert) {
- await render(<template>
- <UppyImageUploader @type="site_setting" @id="uploader" />
- </template>);
+ await render(
+ <template>
+ <UppyImageUploader @type="site_setting" @id="uploader" />
+ </template>
+ );
assert.dom(".d-icon-far-image").exists("displays the upload icon");
assert.dom(".d-icon-trash-can").doesNotExist("does not display trash icon");
@@ -42,13 +46,15 @@ module("Integration | Component | uppy-image-uploader", function (hooks) {
});
test("with placeholder", async function (assert) {
- await render(<template>
- <UppyImageUploader
- @type="composer"
- @id="uploader"
- @placeholderUrl="/images/avatar.png"
- />
- </template>);
+ await render(
+ <template>
+ <UppyImageUploader
+ @type="composer"
+ @id="uploader"
+ @placeholderUrl="/images/avatar.png"
+ />
+ </template>
+ );
assert.dom(".d-icon-far-image").exists("displays the upload icon");
assert.dom(".d-icon-trash-can").doesNotExist("does not display trash icon");
@@ -61,10 +67,12 @@ module("Integration | Component | uppy-image-uploader", function (hooks) {
});
test("when dragging image", async function (assert) {
- await render(<template>
- <UppyImageUploader @type="composer" @id="uploader1" />
- <UppyImageUploader @type="composer" @id="uploader2" />
- </template>);
+ await render(
+ <template>
+ <UppyImageUploader @type="composer" @id="uploader1" />
+ <UppyImageUploader @type="composer" @id="uploader2" />
+ </template>
+ );
const dropImage = async (target) => {
const dataTransfer = new DataTransfer();
diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-tip-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/user-tip-test.gjs
index 227384c98cf..a88d26e3eed 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/user-tip-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/user-tip-test.gjs
@@ -12,12 +12,14 @@ module("Integration | Component | UserTip", function (hooks) {
const site = getOwner(this).lookup("service:site");
site.user_tips = { foo: 1, bar: 2, baz: 3 };
- await render(<template>
- <UserTip @id="foo" @titleText="first tip" />
- <UserTip @id="bar" @titleText="second tip" />
- <UserTip @id="baz" @titleText="third tip" />
- <DTooltips />
- </template>);
+ await render(
+ <template>
+ <UserTip @id="foo" @titleText="first tip" />
+ <UserTip @id="bar" @titleText="second tip" />
+ <UserTip @id="baz" @titleText="third tip" />
+ <DTooltips />
+ </template>
+ );
assert.dom(".user-tip__title").hasText("third tip");
});
diff --git a/app/assets/javascripts/discourse/tests/integration/components/webhook-status-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/webhook-status-test.gjs
index 43d6343cc5a..e59e4d20607 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/webhook-status-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/webhook-status-test.gjs
@@ -17,12 +17,14 @@ module("Integration | Component | webhook-status", function (hooks) {
test("deliveryStatus", async function (assert) {
const webhook = new CoreFabricators(getOwner(this)).webhook();
- await render(<template>
- <WebhookStatus
- @deliveryStatuses={{DELIVERY_STATUSES}}
- @webhook={{webhook}}
- />
- </template>);
+ await render(
+ <template>
+ <WebhookStatus
+ @deliveryStatuses={{DELIVERY_STATUSES}}
+ @webhook={{webhook}}
+ />
+ </template>
+ );
assert.dom().hasText("Inactive");
@@ -35,12 +37,14 @@ module("Integration | Component | webhook-status", function (hooks) {
test("statusLabelClass", async function (assert) {
const webhook = new CoreFabricators(getOwner(this)).webhook();
- await render(<template>
- <WebhookStatus
- @deliveryStatuses={{DELIVERY_STATUSES}}
- @webhook={{webhook}}
- />
- </template>);
+ await render(
+ <template>
+ <WebhookStatus
+ @deliveryStatuses={{DELIVERY_STATUSES}}
+ @webhook={{webhook}}
+ />
+ </template>
+ );
assert.dom(".status-label").hasClass("--inactive");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/widgets/topic-status-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/widgets/topic-status-test.gjs
index 735e3b90706..41f73940df9 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/widgets/topic-status-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/components/widgets/topic-status-test.gjs
@@ -16,9 +16,9 @@ module("Integration | Component | Widget | topic-status", function (hooks) {
disableActions: true,
};
- await render(<template>
- <MountWidget @widget="topic-status" @args={{args}} />
- </template>);
+ await render(
+ <template><MountWidget @widget="topic-status" @args={{args}} /></template>
+ );
assert.dom(".topic-status .d-icon-lock").exists();
});
@@ -39,9 +39,9 @@ module("Integration | Component | Widget | topic-status", function (hooks) {
disableActions: true,
};
- await render(<template>
- <MountWidget @widget="topic-status" @args={{args}} />
- </template>);
+ await render(
+ <template><MountWidget @widget="topic-status" @args={{args}} /></template>
+ );
assert.dom(".topic-status .d-icon-far-square-check").exists();
});
@@ -52,9 +52,9 @@ module("Integration | Component | Widget | topic-status", function (hooks) {
topic: store.createRecord("topic", { closed: true, pinned: true }),
};
- await render(<template>
- <MountWidget @widget="topic-status" @args={{args}} />
- </template>);
+ await render(
+ <template><MountWidget @widget="topic-status" @args={{args}} /></template>
+ );
assert.dom(".topic-statuses .pinned").exists("pinned icon is shown");
assert
diff --git a/app/assets/javascripts/discourse/tests/integration/helpers/raw-test.gjs b/app/assets/javascripts/discourse/tests/integration/helpers/raw-test.gjs
index 4d81f4448f3..828eff9280e 100644
--- a/app/assets/javascripts/discourse/tests/integration/helpers/raw-test.gjs
+++ b/app/assets/javascripts/discourse/tests/integration/helpers/raw-test.gjs
@@ -23,9 +23,11 @@ module("Integration | Helper | raw", function (hooks) {
test("can render a template", async function (assert) {
addRawTemplate("raw-test", (params) => `raw test ${params.someArg}`);
- await render(<template>
- <span>{{raw "raw-test" someArg="foo"}}</span>
- </template>);
+ await render(
+ <template>
+ <span>{{raw "raw-test" someArg="foo"}}</span>
+ </template>
+ );
assert.dom(`span`).hasText("raw test foo");
});
@@ -34,9 +36,7 @@ module("Integration | Helper | raw", function (hooks) {
let willDestroyCalled = false;
class MyComponent extends Component {
- <template>
- Hello from glimmer {{@data.someArg}}
- </template>
+ <template>Hello from glimmer {{@data.someArg}}</template>
willDestroy() {
super.willDestroy(...arguments);
@@ -58,16 +58,18 @@ module("Integration | Helper | raw", function (hooks) {
"service:render-glimmer"
);
- await render(<template>
- {{! RenderGlimmerContainer is normally rendered by application.hbs
+ await render(
+ <template>
+ {{! RenderGlimmerContainer is normally rendered by application.hbs
but this is not an acceptance test so we gotta include it manually }}
- <RenderGlimmerContainer />
- <span>
- {{#if testState.showRawTemplate}}
- {{raw "raw-test" someArg="foo"}}
- {{/if}}
- </span>
- </template>);
+ <RenderGlimmerContainer />
+ <span>
+ {{#if testState.showRawTemplate}}
+ {{raw "raw-test" someArg="foo"}}
+ {{/if}}
+ </span>
+ </template>
+ );
assert.dom(`span`).hasText("Hello from glimmer foo");
assert.strictEqual(
@@ -96,10 +98,12 @@ module("Integration | Helper | raw", function (hooks) {
rawRenderGlimmer(this, "span.bar", SimpleTemplate)
);
- await render(<template>
- <RenderGlimmerContainer />
- {{raw "raw-test"}}
- </template>);
+ await render(
+ <template>
+ <RenderGlimmerContainer />
+ {{raw "raw-test"}}
+ </template>
+ );
assert.dom("span.bar").hasText(/^baz$/);
});
@@ -113,9 +117,11 @@ module("Integration | Helper | raw", function (hooks) {
addRawTemplate("raw-test", compile(template));
const items = [1, 2];
- await render(<template>
- <span>{{raw "raw-test" string="foo" items=items}}</span>
- </template>);
+ await render(
+ <template>
+ <span>{{raw "raw-test" string="foo" items=items}}</span>
+ </template>
+ );
assert.dom("span").hasText("foo 1 foo 2");
});
diff --git a/app/assets/javascripts/discourse/tests/unit/components/json-schema-editor-test.gjs b/app/assets/javascripts/discourse/tests/unit/components/json-schema-editor-test.gjs
index 412eed8c0fd..36080db9aad 100644
--- a/app/assets/javascripts/discourse/tests/unit/components/json-schema-editor-test.gjs
+++ b/app/assets/javascripts/discourse/tests/unit/components/json-schema-editor-test.gjs
@@ -27,13 +27,15 @@ module("Unit | Component | <JsonSchemaEditor />", function (hooks) {
const closeModal = () => {};
- await render(<template>
- <JsonSchemaEditor
- @inline={{true}}
- @model={{model}}
- @closeModal={{closeModal}}
- />
- </template>);
+ await render(
+ <template>
+ <JsonSchemaEditor
+ @inline={{true}}
+ @model={{model}}
+ @closeModal={{closeModal}}
+ />
+ </template>
+ );
await click(".json-editor-btn-add");
await fillIn("[name='root[0][color]']", "red");
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/columns-test.js b/app/assets/javascripts/discourse/tests/unit/lib/columns-test.js
index 16864924d21..de125b07e52 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/columns-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/columns-test.js
@@ -10,9 +10,8 @@ module("Unit | Columns", function (hooks) {
});
test("works", function (assert) {
- document.getElementById(
- "qunit-fixture"
- ).innerHTML = `<div class="d-image-grid">
+ document.getElementById("qunit-fixture").innerHTML =
+ `<div class="d-image-grid">
<p><img src="/images/avatar.png" alt role="presentation"><br>
<img src="/images/avatar.png" alt role="presentation"><br>
<img src="/images/avatar.png" alt role="presentation"></p>
@@ -36,9 +35,8 @@ module("Unit | Columns", function (hooks) {
});
test("disabled if items < minCount", function (assert) {
- document.getElementById(
- "qunit-fixture"
- ).innerHTML = `<div class="d-image-grid">
+ document.getElementById("qunit-fixture").innerHTML =
+ `<div class="d-image-grid">
<p><img src="/images/avatar.png" alt role="presentation"><br>
<img src="/images/avatar.png" alt role="presentation"></p>
</div>`;
@@ -61,9 +59,8 @@ module("Unit | Columns", function (hooks) {
});
test("4 items shown in 2x2 grid", function (assert) {
- document.getElementById(
- "qunit-fixture"
- ).innerHTML = `<div class="d-image-grid">
+ document.getElementById("qunit-fixture").innerHTML =
+ `<div class="d-image-grid">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
@@ -103,9 +100,8 @@ module("Unit | Columns", function (hooks) {
});
test("non-image elements", function (assert) {
- document.getElementById(
- "qunit-fixture"
- ).innerHTML = `<div class="d-image-grid">
+ document.getElementById("qunit-fixture").innerHTML =
+ `<div class="d-image-grid">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
<img src="/images/avatar.png" width="20" height="20" role="presentation">
@@ -156,9 +152,8 @@ module("Unit | Columns", function (hooks) {
});
test("renders a single item in a P tag", function (assert) {
- document.getElementById(
- "qunit-fixture"
- ).innerHTML = `<div class="d-image-grid">
+ document.getElementById("qunit-fixture").innerHTML =
+ `<div class="d-image-grid">
<p><img src="/images/avatar.png" alt role="presentation"></p>
</div>`;
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js b/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js
index 19c936b4173..c46e43046dc 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js
@@ -327,9 +327,7 @@ module("Unit | Utility | i18n", function (hooks) {
i18n("with_multiple_interpolate_arguments", {
username: "username",
});
- }, new I18nMissingInterpolationArgument(
- "with_multiple_interpolate_arguments: [missing %{username2} value]"
- ));
+ }, new I18nMissingInterpolationArgument("with_multiple_interpolate_arguments: [missing %{username2} value]"));
} finally {
I18n.testing = false;
}
diff --git a/app/assets/javascripts/discourse/tests/unit/models/extra-nav-item-test.gjs b/app/assets/javascripts/discourse/tests/unit/models/extra-nav-item-test.gjs
index e5b3006c31f..e3f610ad662 100644
--- a/app/assets/javascripts/discourse/tests/unit/models/extra-nav-item-test.gjs
+++ b/app/assets/javascripts/discourse/tests/unit/models/extra-nav-item-test.gjs
@@ -11,7 +11,11 @@ module("Unit | Model | extra-nav-item", function (hooks) {
name: "something",
});
- await render(<template><p>{{extraNavItem.displayName}}</p></template>);
+ await render(
+ <template>
+ <p>{{extraNavItem.displayName}}</p>
+ </template>
+ );
assert.dom("p").hasText("[en.filters.something.title count=0]");
diff --git a/app/assets/javascripts/float-kit/addon/lib/float-kit-instance.js b/app/assets/javascripts/float-kit/addon/lib/float-kit-instance.js
index ef8dc3ee665..f5aed5e390a 100644
--- a/app/assets/javascripts/float-kit/addon/lib/float-kit-instance.js
+++ b/app/assets/javascripts/float-kit/addon/lib/float-kit-instance.js
@@ -214,8 +214,8 @@ export default class FloatKitInstance {
!Array.isArray(this.options.triggers)
) {
return this.site.mobileView
- ? this.options.triggers.mobile ?? ["click"]
- : this.options.triggers.desktop ?? ["click"];
+ ? (this.options.triggers.mobile ?? ["click"])
+ : (this.options.triggers.desktop ?? ["click"]);
}
return this.options.triggers ?? ["click"];
@@ -227,8 +227,8 @@ export default class FloatKitInstance {
!Array.isArray(this.options.untriggers)
) {
return this.site.mobileView
- ? this.options.untriggers.mobile ?? ["click"]
- : this.options.untriggers.desktop ?? ["click"];
+ ? (this.options.untriggers.mobile ?? ["click"])
+ : (this.options.untriggers.desktop ?? ["click"]);
}
return this.options.untriggers ?? ["click"];
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 b7fa22917a6..b89b5610f6c 100644
--- a/app/assets/javascripts/select-kit/addon/components/select-kit.js
+++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js
@@ -737,8 +737,8 @@ export default class SelectKit extends Component.extend(UtilsMixin) {
this.singleSelect && this.value
? this.itemForValue(this.value, this.mainCollection)
: isEmpty(this.selectKit.filter)
- ? null
- : this.mainCollection.firstObject,
+ ? null
+ : this.mainCollection.firstObject,
isLoading: false,
hasNoContent,
});
diff --git a/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs b/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
index af7876c4576..65b1ce72410 100644
--- a/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
+++ b/app/assets/javascripts/select-kit/addon/components/topic-notifications-button.gjs
@@ -9,7 +9,9 @@ import getURL from "discourse/lib/get-url";
import { NotificationLevels } from "discourse/lib/notification-levels";
import I18n, { i18n } from "discourse-i18n";
-const ParagraphWrapper = <template><p class="reason">{{yield}}</p></template>;
+const ParagraphWrapper = <template>
+ <p class="reason">{{yield}}</p>
+</template>;
const EmptyWrapper = <template>
{{! template-lint-disable no-yield-only}}{{yield}}
</template>;
diff --git a/app/assets/stylesheets/admin/admin_report.scss b/app/assets/stylesheets/admin/admin_report.scss
index 6bd32d51505..26f4d7db64a 100644
--- a/app/assets/stylesheets/admin/admin_report.scss
+++ b/app/assets/stylesheets/admin/admin_report.scss
@@ -251,7 +251,9 @@
&:hover {
border: 0;
- box-shadow: 0 0 0 1px var(--primary-300), 0 0 0 4px var(--primary-100);
+ box-shadow:
+ 0 0 0 1px var(--primary-300),
+ 0 0 0 4px var(--primary-100);
transition: all 0.2s ease-in-out;
}
}
diff --git a/app/assets/stylesheets/admin/settings.scss b/app/assets/stylesheets/admin/settings.scss
index ed434d6843f..2c486db435a 100644
--- a/app/assets/stylesheets/admin/settings.scss
+++ b/app/assets/stylesheets/admin/settings.scss
@@ -91,7 +91,9 @@
background-color: var(--secondary);
border: 1px solid var(--primary-low);
border-radius: 3px;
- transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition:
+ border linear 0.2s,
+ box-shadow linear 0.2s;
@media (max-width: $mobile-breakpoint) {
width: 100%;
diff --git a/app/assets/stylesheets/common/base/compose.scss b/app/assets/stylesheets/common/base/compose.scss
index d5d0ca4e56f..7ed125945dd 100644
--- a/app/assets/stylesheets/common/base/compose.scss
+++ b/app/assets/stylesheets/common/base/compose.scss
@@ -18,8 +18,13 @@ html.composer-open {
height: 0;
min-height: 0;
z-index: z("composer", "content");
- transition: height 0.2s, max-width 0.2s, padding-bottom 0.2s, top 0.2s,
- transform 0.2s, min-height 0.2s;
+ transition:
+ height 0.2s,
+ max-width 0.2s,
+ padding-bottom 0.2s,
+ top 0.2s,
+ transform 0.2s,
+ min-height 0.2s;
background-color: var(--secondary);
box-shadow: var(--shadow-composer);
diff --git a/app/assets/stylesheets/common/base/lightbox.scss b/app/assets/stylesheets/common/base/lightbox.scss
index 787ca4652c6..10fc34d0fd6 100644
--- a/app/assets/stylesheets/common/base/lightbox.scss
+++ b/app/assets/stylesheets/common/base/lightbox.scss
@@ -85,7 +85,8 @@ $meta-element-margin: 6px;
}
a.lightbox:hover {
- box-shadow: 0 2px 5px 0 rgba(var(--always-black-rgb), 0.2),
+ box-shadow:
+ 0 2px 5px 0 rgba(var(--always-black-rgb), 0.2),
0 2px 10px 0 rgba(var(--always-black-rgb), 0.2);
}
}
diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss
index eead4319c68..51dfe33003a 100644
--- a/app/assets/stylesheets/common/base/topic-post.scss
+++ b/app/assets/stylesheets/common/base/topic-post.scss
@@ -1682,7 +1682,8 @@ html.discourse-no-touch .fullscreen-table-wrapper:hover {
&.--has-overflow,
&.--editable {
- box-shadow: 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
+ box-shadow:
+ 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
0 2px 10px 0 rgba(var(--always-black-rgb), 0.1);
}
}
@@ -1699,6 +1700,8 @@ html.discourse-no-touch .fullscreen-table-wrapper:hover {
&.read {
visibility: hidden;
opacity: 0;
- transition: visibility 1s, opacity ease-out 1s;
+ transition:
+ visibility 1s,
+ opacity ease-out 1s;
}
}
diff --git a/app/assets/stylesheets/common/components/buttons.scss b/app/assets/stylesheets/common/components/buttons.scss
index 19158fb1fc6..16e520d1cf4 100644
--- a/app/assets/stylesheets/common/components/buttons.scss
+++ b/app/assets/stylesheets/common/components/buttons.scss
@@ -144,7 +144,9 @@
}
.loading-icon {
- animation: rotate-forever 1s infinite linear, fadein 1s;
+ animation:
+ rotate-forever 1s infinite linear,
+ fadein 1s;
}
}
}
diff --git a/app/assets/stylesheets/common/components/composer-toggle-switch.scss b/app/assets/stylesheets/common/components/composer-toggle-switch.scss
index c5442143181..fbd8b801972 100644
--- a/app/assets/stylesheets/common/components/composer-toggle-switch.scss
+++ b/app/assets/stylesheets/common/components/composer-toggle-switch.scss
@@ -41,7 +41,9 @@
width: calc(var(--toggle-switch-height) - 2px);
height: calc(var(--toggle-switch-height) - 4px);
top: 2px;
- transition: left 0.25s, right 0.25s;
+ transition:
+ left 0.25s,
+ right 0.25s;
border-radius: 0.25em;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.1);
@@ -64,7 +66,9 @@
display: inline-block;
position: absolute;
opacity: 0;
- transition: opacity 0.25s left 0.25s, right 0.25s;
+ transition:
+ opacity 0.25s left 0.25s,
+ right 0.25s;
height: 100%;
width: calc(var(--toggle-switch-height) - 2px);
diff --git a/app/assets/stylesheets/common/components/theme-card.scss b/app/assets/stylesheets/common/components/theme-card.scss
index 00aa9b9fe3b..78ffe3e3826 100644
--- a/app/assets/stylesheets/common/components/theme-card.scss
+++ b/app/assets/stylesheets/common/components/theme-card.scss
@@ -17,7 +17,8 @@
transition: box-shadow 0.3s ease-in-out;
&.--updating {
- animation: updating 3s ease-in-out 1,
+ animation:
+ updating 3s ease-in-out 1,
updatingInfinite 3s ease-in-out 3s infinite;
@keyframes updating {
diff --git a/app/assets/stylesheets/common/foundation/base.scss b/app/assets/stylesheets/common/foundation/base.scss
index d22d4911dd9..485948c7253 100644
--- a/app/assets/stylesheets/common/foundation/base.scss
+++ b/app/assets/stylesheets/common/foundation/base.scss
@@ -11,8 +11,9 @@
--d-button-border-radius: 2px;
--d-input-border-radius: 2px;
--d-content-background: initial;
- --d-font-family--monospace: ui-monospace, "Cascadia Mono", "Segoe UI Mono",
- "Liberation Mono", menlo, monaco, consolas, monospace;
+ --d-font-family--monospace:
+ ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", menlo,
+ monaco, consolas, monospace;
--d-button-transition: none;
}
diff --git a/app/assets/stylesheets/desktop/post-action-feedback.scss b/app/assets/stylesheets/desktop/post-action-feedback.scss
index 6701a041e10..71a9204ae4a 100644
--- a/app/assets/stylesheets/desktop/post-action-feedback.scss
+++ b/app/assets/stylesheets/desktop/post-action-feedback.scss
@@ -14,7 +14,9 @@
.--transition {
.post-action-feedback-alert,
.post-action-feedback-svg {
- transition: opacity 0.25s, color 0.25s;
+ transition:
+ opacity 0.25s,
+ color 0.25s;
}
}
diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss
index 1fdde9ebb3c..50887bc6aa4 100644
--- a/app/assets/stylesheets/desktop/topic-post.scss
+++ b/app/assets/stylesheets/desktop/topic-post.scss
@@ -49,7 +49,9 @@
.actions .fade-out {
.discourse-no-touch & {
opacity: 0.7;
- transition: background 0.25s, opacity 0.7s ease-in-out;
+ transition:
+ background 0.25s,
+ opacity 0.7s ease-in-out;
animation: none; // replaces jsuites animation on .fade-out
}
diff --git a/app/assets/stylesheets/mobile/modal.scss b/app/assets/stylesheets/mobile/modal.scss
index 9cc7e72a65f..634ef03a55a 100644
--- a/app/assets/stylesheets/mobile/modal.scss
+++ b/app/assets/stylesheets/mobile/modal.scss
@@ -69,7 +69,9 @@ html:not(.keyboard-visible.mobile-view) {
// legacy
.modal {
&.fade {
- transition: opacity 0.3s linear, top 0.3s ease-out;
+ transition:
+ opacity 0.3s linear,
+ top 0.3s ease-out;
top: -25%;
}
diff --git a/package.json b/package.json
index e248feba365..fe61ddc663c 100644
--- a/package.json
+++ b/package.json
@@ -6,23 +6,23 @@
"license": "GPL-2.0-only",
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.25.9",
- "@discourse/lint-configs": "^2.7.0",
+ "@discourse/lint-configs": "^2.9.0",
"@discourse/moment-timezone-names-translations": "^1.0.0",
"@fortawesome/fontawesome-free": "6.7.2",
"@glint/core": "1.4.1-unstable.34c4510",
"@glint/environment-ember-loose": "1.4.1-unstable.34c4510",
"@glint/environment-ember-template-imports": "1.4.1-unstable.34c4510",
"@glint/template": "1.4.1-unstable.34c4510",
- "@mixer/parallel-prettier": "^2.0.3",
+ "@rdil/parallel-prettier": "^3.0.0",
"@swc/core": "^1.11.7",
"chart.js": "3.5.1",
"chartjs-plugin-datalabels": "2.2.0",
"chrome-launcher": "^1.1.2",
"chrome-remote-interface": "^0.33.3",
"concurrently": "^9.1.2",
- "ember-template-lint": "6.1.0",
+ "ember-template-lint": "7.0.0",
"esbuild": "^0.25.0",
- "eslint": "9.20.1",
+ "eslint": "9.21.0",
"jsdoc": "^4.0.4",
"lefthook": "^1.11.2",
"licensee": "^11.1.1",
@@ -33,10 +33,10 @@
"moment": "2.30.1",
"moment-timezone": "0.5.45",
"pikaday": "1.8.2",
- "prettier": "2.8.8",
+ "prettier": "3.5.3",
"puppeteer-core": "^24.3.1",
"squoosh": "https://codeload.github.com/discourse/squoosh/tar.gz/dc9649d",
- "stylelint": "16.14.1",
+ "stylelint": "16.15.0",
"terser": "^5.39.0",
"typescript": "5.6.x"
},
diff --git a/plugins/chat/assets/javascripts/discourse/lib/fabricators.js b/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
index 655efe9392e..13bae86dfd3 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
@@ -74,8 +74,8 @@ export default class ChatFabricators {
title: args.title
? args.title
: chatable instanceof Category
- ? chatable.name
- : null,
+ ? chatable.name
+ : null,
description: args.description,
chatable,
status: args.status || CHANNEL_STATUSES.open,
diff --git a/plugins/chat/assets/javascripts/discourse/models/chat-message.js b/plugins/chat/assets/javascripts/discourse/models/chat-message.js
index 00e744a482d..a1a3cadfbda 100644
--- a/plugins/chat/assets/javascripts/discourse/models/chat-message.js
+++ b/plugins/chat/assets/javascripts/discourse/models/chat-message.js
@@ -76,7 +76,7 @@ export default class ChatMessage {
this.deletedById = args.deletedById || args.deleted_by_id;
this._deletedAt = args.deletedAt || args.deleted_at;
this.expanded =
- this.hidden || this._deletedAt ? false : args.expanded ?? true;
+ this.hidden || this._deletedAt ? false : (args.expanded ?? true);
this.excerpt = args.excerpt;
this.reviewableId = args.reviewableId ?? args.reviewable_id;
this.userFlagStatus = args.userFlagStatus ?? args.user_flag_status;
@@ -85,7 +85,7 @@ export default class ChatMessage {
this._cooked = args.cooked ?? "";
this.inReplyTo =
args.inReplyTo ??
- (args.in_reply_to ?? args.replyToMsg
+ ((args.in_reply_to ?? args.replyToMsg)
? ChatMessage.create(channel, args.in_reply_to ?? args.replyToMsg)
: null);
this.reactions = this.#initChatMessageReactionModel(args.reactions);
diff --git a/plugins/chat/assets/stylesheets/common/base-common.scss b/plugins/chat/assets/stylesheets/common/base-common.scss
index 1ef735d5dbd..40a7db9754b 100644
--- a/plugins/chat/assets/stylesheets/common/base-common.scss
+++ b/plugins/chat/assets/stylesheets/common/base-common.scss
@@ -162,7 +162,9 @@ html.ios-device.keyboard-visible body #main-outlet .full-page-chat {
.is-online & {
padding: 2px;
- box-shadow: inset 0 0 0 1px var(--success), inset 0 0 0 2px var(--secondary);
+ box-shadow:
+ inset 0 0 0 1px var(--success),
+ inset 0 0 0 2px var(--secondary);
}
}
diff --git a/plugins/chat/assets/stylesheets/common/chat-index.scss b/plugins/chat/assets/stylesheets/common/chat-index.scss
index 67144649d42..260f5de3d3b 100644
--- a/plugins/chat/assets/stylesheets/common/chat-index.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-index.scss
@@ -6,7 +6,9 @@
border-radius: 50%;
font-size: var(--font-up-3);
padding: 0.5rem;
- transition: transform 0.25s ease, box-shadow 0.25s ease;
+ transition:
+ transform 0.25s ease,
+ box-shadow 0.25s ease;
z-index: z("usercard");
box-shadow: 0 5px 5px -1px rgba(0, 0, 0, 0.25);
diff --git a/plugins/chat/assets/stylesheets/common/chat-messages-scroller.scss b/plugins/chat/assets/stylesheets/common/chat-messages-scroller.scss
index 7f05ee58fef..bde32075382 100644
--- a/plugins/chat/assets/stylesheets/common/chat-messages-scroller.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-messages-scroller.scss
@@ -11,6 +11,8 @@
box-sizing: border-box;
@include chat-scrollbar {
- transition: scrollbar-color 0.25s ease-in-out, padding-top 0.2s ease-in-out;
+ transition:
+ scrollbar-color 0.25s ease-in-out,
+ padding-top 0.2s ease-in-out;
}
}
diff --git a/plugins/chat/assets/stylesheets/common/chat-scroll-to-bottom.scss b/plugins/chat/assets/stylesheets/common/chat-scroll-to-bottom.scss
index 76710613f38..25a10799dbb 100644
--- a/plugins/chat/assets/stylesheets/common/chat-scroll-to-bottom.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-scroll-to-bottom.scss
@@ -23,7 +23,9 @@
bottom: -25px;
background: none;
opacity: 0;
- transition: opacity 0.25s ease, transform 0.5s ease;
+ transition:
+ opacity 0.25s ease,
+ transform 0.5s ease;
transform: scale(0.1);
padding: 0;
z-index: z("dropdown");
diff --git a/plugins/chat/assets/stylesheets/common/chat-user-avatar.scss b/plugins/chat/assets/stylesheets/common/chat-user-avatar.scss
index bb45ff02795..ed154984b1e 100644
--- a/plugins/chat/assets/stylesheets/common/chat-user-avatar.scss
+++ b/plugins/chat/assets/stylesheets/common/chat-user-avatar.scss
@@ -6,7 +6,8 @@
&.is-online {
.avatar {
padding: 2px;
- box-shadow: inset 0 0 0 1px var(--success),
+ box-shadow:
+ inset 0 0 0 1px var(--success),
inset 0 0 0 2px var(--secondary);
}
}
diff --git a/plugins/chat/assets/stylesheets/desktop/base-desktop.scss b/plugins/chat/assets/stylesheets/desktop/base-desktop.scss
index c4a3351fe34..1a915ed6698 100644
--- a/plugins/chat/assets/stylesheets/desktop/base-desktop.scss
+++ b/plugins/chat/assets/stylesheets/desktop/base-desktop.scss
@@ -28,7 +28,8 @@
&:hover {
cursor: pointer;
border-radius: var(--d-border-radius);
- box-shadow: 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
+ box-shadow:
+ 0 2px 5px 0 rgba(var(--always-black-rgb), 0.1),
0 2px 10px 0 rgba(var(--always-black-rgb), 0.1);
}
}
diff --git a/plugins/chat/assets/stylesheets/mixins/chat-reaction.scss b/plugins/chat/assets/stylesheets/mixins/chat-reaction.scss
index 4d8a75543c8..f01901c4989 100644
--- a/plugins/chat/assets/stylesheets/mixins/chat-reaction.scss
+++ b/plugins/chat/assets/stylesheets/mixins/chat-reaction.scss
@@ -9,7 +9,9 @@
background: transparent;
cursor: pointer;
user-select: none;
- transition: background 0.2s, border-color 0.2s;
+ transition:
+ background 0.2s,
+ border-color 0.2s;
&.reacted {
border-color: var(--tertiary-medium);
diff --git a/plugins/chat/assets/stylesheets/mobile/chat-channel-row.scss b/plugins/chat/assets/stylesheets/mobile/chat-channel-row.scss
index 3c7eed8161d..0d9f9e6ec9a 100644
--- a/plugins/chat/assets/stylesheets/mobile/chat-channel-row.scss
+++ b/plugins/chat/assets/stylesheets/mobile/chat-channel-row.scss
@@ -6,7 +6,9 @@
margin: 0;
border-radius: 0;
border-bottom: 1px solid var(--primary-low);
- transition: height 0.25s ease-in-out, opacity 0.25s ease-out;
+ transition:
+ height 0.25s ease-in-out,
+ opacity 0.25s ease-out;
transform-origin: top center;
will-change: height, opacity, left;
position: relative;
diff --git a/plugins/chat/test/javascripts/components/channel-name-test.gjs b/plugins/chat/test/javascripts/components/channel-name-test.gjs
index d0ca3b6f1e8..99308868a46 100644
--- a/plugins/chat/test/javascripts/components/channel-name-test.gjs
+++ b/plugins/chat/test/javascripts/components/channel-name-test.gjs
@@ -97,16 +97,26 @@ module("Discourse Chat | Component | <ChannelName />", function (hooks) {
channel.tracking.unreadCount = 1;
let unreadIndicator = true;
- await render(<template>
- <ChannelName @channel={{channel}} @unreadIndicator={{unreadIndicator}} />
- </template>);
+ await render(
+ <template>
+ <ChannelName
+ @channel={{channel}}
+ @unreadIndicator={{unreadIndicator}}
+ />
+ </template>
+ );
assert.dom(".chat-channel-unread-indicator").exists();
unreadIndicator = false;
- await render(<template>
- <ChannelName @channel={{channel}} @unreadIndicator={{unreadIndicator}} />
- </template>);
+ await render(
+ <template>
+ <ChannelName
+ @channel={{channel}}
+ @unreadIndicator={{unreadIndicator}}
+ />
+ </template>
+ );
assert.dom(".chat-channel-unread-indicator").doesNotExist();
});
diff --git a/plugins/chat/test/javascripts/components/thread-settings-test.gjs b/plugins/chat/test/javascripts/components/thread-settings-test.gjs
index 35669b61a9b..b921b0252fb 100644
--- a/plugins/chat/test/javascripts/components/thread-settings-test.gjs
+++ b/plugins/chat/test/javascripts/components/thread-settings-test.gjs
@@ -12,9 +12,11 @@ module("Discourse Chat | Component | <ThreadSettings />", function (hooks) {
this.currentUser.admin = true;
const thread = new ChatFabricators(getOwner(this)).thread();
- await render(<template>
- <ChatModalThreadSettings @inline={{true}} @model={{thread}} />
- </template>);
+ await render(
+ <template>
+ <ChatModalThreadSettings @inline={{true}} @model={{thread}} />
+ </template>
+ );
assert.dom(".discourse-ai-cta").exists();
});
@@ -23,9 +25,11 @@ module("Discourse Chat | Component | <ThreadSettings />", function (hooks) {
this.currentUser.admin = false;
const thread = new ChatFabricators(getOwner(this)).thread();
- await render(<template>
- <ChatModalThreadSettings @inline={{true}} @model={{thread}} />
- </template>);
+ await render(
+ <template>
+ <ChatModalThreadSettings @inline={{true}} @model={{thread}} />
+ </template>
+ );
assert.dom(".discourse-ai-cta").doesNotExist();
});
diff --git a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js
index 2275df4e709..ead4f5aec19 100644
--- a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js
+++ b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js
@@ -180,20 +180,17 @@ function initializeDiscourseLocalDates(api) {
});
});
- addTextDecorateCallback(function (
- text,
- nextElement,
- _previousElement,
- metadata
- ) {
- if (
- metadata.discourseLocalDateStartRangeOpts &&
- nextElement?.attributes.class?.includes("discourse-local-date") &&
- text === "→"
- ) {
- return "";
+ addTextDecorateCallback(
+ function (text, nextElement, _previousElement, metadata) {
+ if (
+ metadata.discourseLocalDateStartRangeOpts &&
+ nextElement?.attributes.class?.includes("discourse-local-date") &&
+ text === "→"
+ ) {
+ return "";
+ }
}
- });
+ );
addTagDecorateCallback(function () {
if (this.element.attributes.class?.includes("discourse-local-date")) {
if (this.metadata.discourseLocalDateStartRangeOpts) {
diff --git a/plugins/poll/assets/javascripts/discourse/initializers/extend-for-poll.gjs b/plugins/poll/assets/javascripts/discourse/initializers/extend-for-poll.gjs
index 87104c76ef6..a1d038877f5 100644
--- a/plugins/poll/assets/javascripts/discourse/initializers/extend-for-poll.gjs
+++ b/plugins/poll/assets/javascripts/discourse/initializers/extend-for-poll.gjs
@@ -43,9 +43,12 @@ function attachPolls(elem, helper) {
}
pollNode.replaceWith(newPollNode);
- helper.renderGlimmer(newPollNode, <template>
- <Poll @poll={{poll}} @post={{post}} @titleHTML={{titleHTML}} />
- </template>);
+ helper.renderGlimmer(
+ newPollNode,
+ <template>
+ <Poll @poll={{poll}} @post={{post}} @titleHTML={{titleHTML}} />
+ </template>
+ );
}
});
}
diff --git a/plugins/styleguide/assets/javascripts/discourse/components/sections/atoms/01-font-scale.hbs b/plugins/styleguide/assets/javascripts/discourse/components/sections/atoms/01-font-scale.hbs
index 5c72ce5a60d..486b23159aa 100644
--- a/plugins/styleguide/assets/javascripts/discourse/components/sections/atoms/01-font-scale.hbs
+++ b/plugins/styleguide/assets/javascripts/discourse/components/sections/atoms/01-font-scale.hbs
@@ -4,7 +4,8 @@
settings, by default these are:
<pre>
Smaller: 14px Normal: 15px
- <span>(default)</span>
+ <span
+ >(default)</span>
Larger: 17px Largest: 19px
</pre>
</p>
@@ -16,14 +17,23 @@
example below increases all text size options by 1px.
<pre>
html {
- <span class="hljs-attribute">font-size</span>: 16px;
- <span>// default font-size </span>
+ <span
+ class="hljs-attribute"
+ >font-size</span>: 16px;
+ <span>// default font-size
+ </span>
&.text-size-smaller {
- <span class="hljs-attribute">font-size</span>: 15px; } &.text-size-larger
+ <span
+ class="hljs-attribute"
+ >font-size</span>: 15px; } &.text-size-larger
{
- <span class="hljs-attribute">font-size</span>: 18px; } &.text-size-largest
+ <span
+ class="hljs-attribute"
+ >font-size</span>: 18px; } &.text-size-largest
{
- <span class="hljs-attribute">font-size</span>: 20px; } }
+ <span
+ class="hljs-attribute"
+ >font-size</span>: 20px; } }
</pre>
</p>
<p>
@@ -36,12 +46,15 @@
</p>
<pre>
.parent {
- <span class="hljs-attribute">font-size</span>: var(--font-up-3);
- <span>// Increases the relative font-size of this element and its children
- by 3 steps in the scale</span>
+ <span
+ class="hljs-attribute"
+ >font-size</span>: var(--font-up-3);
+ <span>// Increases the relative
+ font-size of this element and its children by 3 steps in the scale</span>
.child {
- <span>// If this is set to var(--font-down-3) in Discourse's default CSS,
- the parent font-size increase above would make this equivalent to
+ <span
+ >// If this is set to var(--font-down-3) in Discourse's default CSS, the
+ parent font-size increase above would make this equivalent to
var(--font-0) (var(--font-down-3) + var(--font-up-3) = var(--font-0))</span>
} }
</pre>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 40560c692f2..507472da646 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -35,8 +35,8 @@ importers:
specifier: ^7.25.9
version: 7.25.9(@babel/[email protected])
'@discourse/lint-configs':
- specifier: ^2.7.0
+ specifier: ^2.9.0
'@discourse/moment-timezone-names-translations':
specifier: ^1.0.0
version: 1.0.0
@@ -55,9 +55,9 @@ importers:
'@glint/template':
specifier: 1.4.1-unstable.34c4510
version: 1.4.1-unstable.34c4510
- '@mixer/parallel-prettier':
- specifier: ^2.0.3
- version: 2.0.3([email protected])
+ '@rdil/parallel-prettier':
+ specifier: ^3.0.0
+ version: 3.0.0([email protected])
'@swc/core':
specifier: ^1.11.7
version: 1.11.7
@@ -77,14 +77,14 @@ importers:
specifier: ^9.1.2
version: 9.1.2
ember-template-lint:
- specifier: 6.1.0
- version: 6.1.0
+ specifier: 7.0.0
+ version: 7.0.0(@babel/[email protected])
esbuild:
specifier: ^0.25.0
version: 0.25.0
eslint:
- specifier: 9.20.1
- version: 9.20.1
+ specifier: 9.21.0
+ version: 9.21.0
jsdoc:
specifier: ^4.0.4
version: 4.0.4
@@ -99,10 +99,10 @@ importers:
version: 2.6.2([email protected])
lint-to-the-future-ember-template:
specifier: ^3.0.0
- version: 3.0.0([email protected])
+ version: 3.0.0([email protected](@babel/[email protected]))
lint-to-the-future-eslint:
specifier: ^3.0.0
- version: 3.0.0([email protected])
+ version: 3.0.0([email protected])
magnific-popup:
specifier: 1.1.0
version: 1.1.0
@@ -116,8 +116,8 @@ importers:
specifier: 1.8.2
version: 1.8.2
prettier:
- specifier: 2.8.8
- version: 2.8.8
+ specifier: 3.5.3
+ version: 3.5.3
puppeteer-core:
specifier: ^24.3.1
version: 24.3.1
@@ -125,8 +125,8 @@ importers:
specifier: https://codeload.github.com/discourse/squoosh/tar.gz/dc9649d
version: https://codeload.github.com/discourse/squoosh/tar.gz/dc9649d
stylelint:
- specifier: 16.14.1
- version: 16.14.1([email protected])
+ specifier: 16.15.0
+ version: 16.15.0([email protected])
terser:
specifier: ^5.39.0
version: 5.39.0
@@ -1745,13 +1745,13 @@ packages:
'@discourse/[email protected]':
resolution: {integrity: sha512-Jn1gdiyHMGUsmUfLFf4Q7VnTAv0l7NePbegU6pKhKHEmbzV3FosGxq30fTOYgVyTS1bxqGjlA6LvQttJpv3ROw==}
- '@discourse/[email protected]':
- resolution: {integrity: sha512-lkLHJVgWoweG4QMw9mwrwP30HYhzjdOHtbOlJpcLth/ZqQFhDDIiU0VchsT6JB5gfocQ+7G26WYyR3bTuGEHOg==}
+ '@discourse/[email protected]':
+ resolution: {integrity: sha512-CAIrJK6MUhkBQpPHpJyFmfRgV1jmd70JtKVazIx0ja4qIae1XHNTm02AzhYFKx0VY+K0ODFxTUPgFstys6Lc1w==}
peerDependencies:
- ember-template-lint: 6.1.0
- eslint: 9.20.1
- prettier: 2.8.8
- stylelint: 16.14.1
+ ember-template-lint: 7.0.0
+ eslint: 9.21.0
+ prettier: 3.5.3
+ stylelint: 16.15.0
'@discourse/[email protected]':
resolution: {integrity: sha512-4xr1QWQ0nzmFa2ZXQgWZA+dtE/BU2ePA+qkJWPFzNpq4ZnQi8MmMMAS2285t3rc2ySMBQqYaAArmcSUiufUgRA==}
@@ -2051,24 +2051,24 @@ packages:
resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/[email protected]':
resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/[email protected]':
- resolution: {integrity: sha512-+0TjwR1eAUdZtvv/ir1mGX+v0tUoR3VEPB8Up0LLJC+whRW0GgBBtpbOkg/a/U4Dxa6l5a3l9AJ1aWIQVyoWJA==}
+ '@eslint/[email protected]':
+ resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@faker-js/[email protected]':
@@ -2344,12 +2344,6 @@ packages:
'@messageformat/[email protected]':
resolution: {integrity: sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==}
- '@mixer/[email protected]':
- resolution: {integrity: sha512-42ImvDusmxjpQLHEmZrljV/+L9ynfmaTe5ooLMTTLyELulUJtJW8vBXCadQdodfZ5wjr2Sg3YGIzWE0rnBsfDg==}
- hasBin: true
- peerDependencies:
- prettier: ^2.0.0
-
'@nicolo-ribaudo/[email protected]':
resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==}
@@ -2447,6 +2441,12 @@ packages:
engines: {node: '>=18'}
hasBin: true
+ resolution: {integrity: sha512-A+dgYJNMHNZu+9Wxvu/1/x2JHduOvysar+qMXptk966eQpg+ETC/i0e+rPeMUw54+mkC35f4RTnFmJgrQ/R7dQ==}
+ hasBin: true
+ peerDependencies:
+ prettier: 3.x
+
'@sigstore/[email protected]':
resolution: {integrity: sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==}
engines: {node: ^16.14.0 || >=18.0.0}
@@ -2496,8 +2496,8 @@ packages:
'@socket.io/[email protected]':
resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==}
- '@stylistic/[email protected]':
- resolution: {integrity: sha512-2EGKM6WHnZSidWKCu6ePJCqdpgWiEU1Bt26ktWEfTpCmRP+2vRQ6ViK8X6DLwu4+F0zPLy/Txe2HhI3qJFUvqA==}
+ '@stylistic/[email protected]':
+ resolution: {integrity: sha512-MiJr6wvyzMYl/wElmj8Jns8zH7Q1w8XoVtm+WM6yDaTrfxryMyb8n0CMxt82fo42RoLIfxAEtM6tmQVxqhk0/A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: '>=9.0.0'
@@ -3077,10 +3077,6 @@ packages:
resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==}
- resolution: {integrity: sha512-CtWYYHU/MgK88rxMrLfkD356dApswtR/kWZ/c6JifG1m10e7tBBrs/366dFzWMAoqYmG5/JSh+94tUSpIwh+ag==}
- engines: {node: '>= 12.*'}
-
resolution: {integrity: sha512-TNdiTQdPhXlx02pzG//UyVPSKE7SNWjY0n4So/ZnjQpWwaM5LvWBLkWa1JKll5u06HNscHD91XZPuwrMg1kadQ==}
engines: {node: '>= 12.*'}
@@ -3904,6 +3900,10 @@ packages:
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
engines: {node: '>= 0.6'}
+ resolution: {integrity: sha512-uBAmklAxqmem7WX/F7YA4eWBTegGLJ93MOPSJaJliAuzTNgF3u/H9YLlJ6Nae9/FwV+037OuXc75hvcmub1qww==}
+ engines: {node: '>= 18'}
+
resolution: {integrity: sha512-htLIdtfhhKW2fHlFLnZH7GFzHSdSpHhDLrWVswkNiiPMZ5uXq5JfrGboQKFhNQuAAFF8VNB2EYUj3MsdJrKKpg==}
@@ -4424,16 +4424,12 @@ packages:
peerDependencies:
'@glimmer/component': ^1.1.2
- resolution: {integrity: sha512-OS8TUVG2kQYYwP3netunLVfeijPoOKIs1SvPQRTNOQX4Pu8xGGBEZmrv0U1YTnQn12Eg+p6w/0UdGbUnITjyzw==}
- engines: {node: 12.* || >= 14}
-
resolution: {integrity: sha512-jZ5D6KLKU8up/AynZltmKh4lkXBPgTGSPgomprI/55XvIVqn42UNUpEz7ra/mO3QiGODDZOUesbggPe49i38sQ==}
engines: {node: 16.* || >= 18}
- resolution: {integrity: sha512-UyzLPcyneG3mnbBfewyYIlV7fy6JKHQVAJy5a9+URdJKkZKN+3vQkQzIIlsz6dP/GpoXVB+datns5HlfMfliSA==}
+ resolution: {integrity: sha512-LWAgk/kpcYrMCIWBxC7tf+yd2t870Sk0nUAOSvow0TQxmbLADRPNlqijW3+yGf8CGzEK1eLUInzJQdm23xJxyQ==}
engines: {node: ^18.18.0 || >= 20.9.0}
hasBin: true
@@ -4654,8 +4650,8 @@ packages:
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- resolution: {integrity: sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==}
+ resolution: {integrity: sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
hasBin: true
peerDependencies:
@@ -7025,15 +7021,22 @@ packages:
resolution: {integrity: sha512-jkPAvt1BfRi0RKamweJdEcnjkeu7Es8yix3bJ+KgBC5VpG/Ln4JE3hYN6vJym4qprm8Xo5adhWpm3HCoft1dOw==}
- resolution: {integrity: sha512-L/15ujsvuOpuIB9y9XJJs/QOPgdot76T0U1Q34C19igS1lsaL/cdRw8rXIVC5Z2x362yZI33Qodo//7kK7ItkA==}
- engines: {node: 14.* || 16.* || >= 18}
+ resolution: {integrity: sha512-Ude3MJyPBMr/Er5aSS9Y0dsnHWX3prpJB+Jj/BKKUT/EvG2ftnIMBsZXmRu68RJA62JJB8MdKBloYmCu2pTRNg==}
+ engines: {node: 18.* || >= 20}
+ peerDependencies:
+ prettier: '>= 3.0.0'
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
hasBin: true
+ resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==}
+ engines: {node: '>=14'}
+ hasBin: true
+
resolution: {integrity: sha512-is0ctgGdPJ5951KulgfzvHGwJtZ5ck8l042vRkV6jrkpBzTmb/lueTqguWHy2JfVA+RY6gFVlaZgUS0j7S/dsw==}
engines: {node: '>= 0.9.0'}
@@ -7932,8 +7935,8 @@ packages:
peerDependencies:
stylelint: ^16.0.2
- resolution: {integrity: sha512-oqCL7AC3786oTax35T/nuLL8p2C3k/8rHKAooezrPGRvUX0wX+qqs5kMWh5YYT4PHQgVDobHT4tw55WgpYG6Sw==}
+ resolution: {integrity: sha512-OK6Rs7EPdcdmjqiDycadZY4fw3f5/TC1X6/tGjnF3OosbwCeNs7nG+79MCAtjEg7ckwqTJTsku08e0Rmaz5nUw==}
engines: {node: '>=18.12.0'}
hasBin: true
@@ -7949,8 +7952,8 @@ packages:
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==}
+ resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==}
engines: {node: '>=14.18'}
@@ -8149,9 +8152,6 @@ packages:
resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==}
engines: {node: '>= 14.0.0'}
- resolution: {integrity: sha512-6uBtdkw3jHXkPtx/e9xB/5vcngMm17CyJYsS2YZeQ+9FdRnt6Ev5g931Sg2p+dxbtMGoCm13m3ax/obicTZIkQ==}
-
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
@@ -8222,8 +8222,8 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
- resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}
+ resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
engines: {node: '>=14.17'}
hasBin: true
@@ -8366,9 +8366,6 @@ packages:
resolution: {integrity: sha512-d7KLgL1LD3U3fgnvWEY1cQXoO/q6EQ1BSz48Sa149V/5zVTAbgmZIpyI8TRi6U9/JNyeYLlTKsEMPtLC27RFUg==}
engines: {node: ^18.17.0 || >=20.5.0}
- resolution: {integrity: sha512-nd2HUpKc6RWblPZQ2GDuI65sxJ2n/UqZwSBVtj64xlWjMx0m7ZB2m9b2JS3v1f+n9VWH/dd1CMhkHfP6pIdckA==}
-
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
@@ -8737,11 +8734,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@babel/core': 7.26.9([email protected])
'@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1
- eslint: 9.20.1
+ eslint: 9.21.0
eslint-visitor-keys: 2.1.0
semver: 6.3.1
@@ -9522,26 +9519,26 @@ snapshots:
'@discourse/[email protected]': {}
dependencies:
'@babel/core': 7.26.9([email protected])
- '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
+ '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
'@babel/plugin-proposal-decorators': 7.25.9(@babel/[email protected])
- '@stylistic/eslint-plugin-js': 4.0.1([email protected])
- ember-template-lint: 6.1.0
- eslint: 9.20.1
- eslint-plugin-decorator-position: 6.0.0(@babel/[email protected](@babel/[email protected])([email protected]))([email protected])
- eslint-plugin-ember: 12.5.0(@babel/[email protected])([email protected])
- eslint-plugin-qunit: 8.1.2([email protected])
- eslint-plugin-simple-import-sort: 12.1.1([email protected])
- eslint-plugin-sort-class-members: 1.21.0([email protected])
+ '@stylistic/eslint-plugin-js': 4.2.0([email protected])
+ ember-template-lint: 7.0.0(@babel/[email protected])
+ eslint: 9.21.0
+ eslint-plugin-decorator-position: 6.0.0(@babel/[email protected](@babel/[email protected])([email protected]))([email protected])
+ eslint-plugin-ember: 12.5.0(@babel/[email protected])([email protected])
+ eslint-plugin-qunit: 8.1.2([email protected])
+ eslint-plugin-simple-import-sort: 12.1.1([email protected])
+ eslint-plugin-sort-class-members: 1.21.0([email protected])
globals: 16.0.0
- prettier: 2.8.8
- prettier-plugin-ember-template-tag: 0.3.2
- stylelint: 16.14.1([email protected])
- stylelint-config-standard: 37.0.0([email protected]([email protected]))
- stylelint-config-standard-scss: 14.0.0([email protected])([email protected]([email protected]))
- typescript: 5.7.3
+ prettier: 3.5.3
+ prettier-plugin-ember-template-tag: 2.0.4([email protected])
+ stylelint: 16.15.0([email protected])
+ stylelint-config-standard: 37.0.0([email protected]([email protected]))
+ stylelint-config-standard-scss: 14.0.0([email protected])([email protected]([email protected]))
+ typescript: 5.8.2
transitivePeerDependencies:
- '@typescript-eslint/parser'
- postcss
@@ -9915,9 +9912,9 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@eslint-community/[email protected]([email protected])':
+ '@eslint-community/[email protected]([email protected])':
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
eslint-visitor-keys: 3.4.3
'@eslint-community/[email protected]': {}
@@ -9930,11 +9927,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
'@types/json-schema': 7.0.15
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
ajv: 6.12.6
debug: 4.4.0([email protected])
@@ -9948,13 +9945,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@eslint/[email protected]': {}
+ '@eslint/[email protected]': {}
'@eslint/[email protected]': {}
- '@eslint/[email protected]':
+ '@eslint/[email protected]':
dependencies:
- '@eslint/core': 0.11.0
+ '@eslint/core': 0.12.0
levn: 0.4.1
'@faker-js/[email protected]': {}
@@ -10336,16 +10333,6 @@ snapshots:
dependencies:
make-plural: 7.4.0
- dependencies:
- chalk: 4.1.2
- commander: 7.2.0
- glob-stream: 7.0.0
- ignore: 5.3.2
- ora: 5.4.1
- prettier: 2.8.8
- rxjs: 6.6.7
-
'@nicolo-ribaudo/[email protected]':
dependencies:
eslint-scope: 5.1.1
@@ -10521,6 +10508,16 @@ snapshots:
- bare-buffer
- supports-color
+ dependencies:
+ chalk: 4.1.2
+ commander: 7.2.0
+ glob-stream: 7.0.0
+ ignore: 5.3.2
+ ora: 5.4.1
+ prettier: 3.5.3
+ rxjs: 6.6.7
+
'@sigstore/[email protected]':
dependencies:
'@sigstore/protobuf-specs': 0.3.2
@@ -10579,9 +10576,9 @@ snapshots:
'@socket.io/[email protected]': {}
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
eslint-visitor-keys: 4.2.0
espree: 10.3.0
@@ -11197,8 +11194,6 @@ snapshots:
-
@@ -12189,6 +12184,10 @@ snapshots:
dependencies:
safe-buffer: 5.2.1
+ dependencies:
+ content-tag: 3.1.1(patch_hash=lgdkxhmahesfzwpl4vwprolz5m)
+
[email protected](patch_hash=lgdkxhmahesfzwpl4vwprolz5m): {}
@@ -12963,10 +12962,10 @@ snapshots:
dependencies:
'@babel/core': 7.26.9([email protected])
- '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
+ '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
'@glimmer/syntax': 0.92.3
content-tag: 2.0.3
eslint-scope: 7.2.2
@@ -13116,20 +13115,6 @@ snapshots:
- supports-color
- webpack
- dependencies:
- babel-import-util: 0.2.0
- broccoli-stew: 3.0.0
- ember-cli-babel-plugin-helpers: 1.1.1
- ember-cli-version-checker: 5.1.2
- line-column: 1.0.2
- magic-string: 0.25.9
- parse-static-imports: 1.1.0
- string.prototype.matchall: 4.0.12
- validate-peer-dependencies: 1.2.0
- transitivePeerDependencies:
- - supports-color
-
dependencies:
broccoli-stew: 3.0.0
@@ -13138,14 +13123,20 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
+ '@babel/generator': 7.26.9
+ '@babel/parser': 7.26.9
+ '@babel/plugin-syntax-typescript': 7.25.9(@babel/[email protected])
+ '@babel/plugin-transform-typescript': 7.26.8(@babel/[email protected])
+ '@babel/traverse': 7.26.9([email protected])
'@lint-todo/utils': 13.1.1
aria-query: 5.3.2
chalk: 5.4.1
ci-info: 4.1.0
+ content-tag: 3.1.1(patch_hash=lgdkxhmahesfzwpl4vwprolz5m)
+ content-tag-utils: 0.3.1
date-fns: 3.6.0
- ember-template-imports: 3.4.2
ember-template-recast: 6.1.5
eslint-formatter-kakoune: 1.0.0
find-up: 7.0.0
@@ -13159,6 +13150,7 @@ snapshots:
v8-compile-cache: 2.4.0
yargs: 17.7.2
transitivePeerDependencies:
+ - '@babel/core'
- supports-color
@@ -13405,27 +13397,27 @@ snapshots:
dependencies:
'@babel/core': 7.26.9([email protected])
'@babel/plugin-proposal-decorators': 7.25.9(@babel/[email protected])
'@ember-data/rfc395-data': 0.0.4
ember-rfc176-data: 0.3.18
- eslint: 9.20.1
+ eslint: 9.21.0
snake-case: 3.0.4
optionalDependencies:
- '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
+ '@babel/eslint-parser': 7.26.8(@babel/[email protected])([email protected])
transitivePeerDependencies:
- supports-color
dependencies:
'@ember-data/rfc395-data': 0.0.4
css-tree: 3.1.0
- ember-eslint-parser: 0.5.9(@babel/[email protected])([email protected])
+ ember-eslint-parser: 0.5.9(@babel/[email protected])([email protected])
ember-rfc176-data: 0.3.18
- eslint: 9.20.1
- eslint-utils: 3.0.0([email protected])
+ eslint: 9.21.0
+ eslint-utils: 3.0.0([email protected])
estraverse: 5.3.0
lodash.camelcase: 4.3.0
lodash.kebabcase: 4.1.1
@@ -13434,20 +13426,20 @@ snapshots:
transitivePeerDependencies:
- '@babel/core'
dependencies:
- eslint-utils: 3.0.0([email protected])
+ eslint-utils: 3.0.0([email protected])
requireindex: 1.2.0
transitivePeerDependencies:
- eslint
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
dependencies:
@@ -13464,9 +13456,9 @@ snapshots:
esrecurse: 4.3.0
estraverse: 5.3.0
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
eslint-visitor-keys: 2.1.0
@@ -13475,15 +13467,15 @@ snapshots:
dependencies:
- '@eslint-community/eslint-utils': 4.4.1([email protected])
+ '@eslint-community/eslint-utils': 4.4.1([email protected])
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.19.2
- '@eslint/core': 0.11.0
- '@eslint/eslintrc': 3.2.0
- '@eslint/js': 9.20.0
- '@eslint/plugin-kit': 0.2.6
+ '@eslint/core': 0.12.0
+ '@eslint/eslintrc': 3.3.0
+ '@eslint/js': 9.21.0
+ '@eslint/plugin-kit': 0.2.7
'@humanfs/node': 0.16.6
'@humanwhocodes/module-importer': 1.0.1
'@humanwhocodes/retry': 0.4.2
@@ -15109,15 +15101,15 @@ snapshots:
dependencies:
uc.micro: 2.1.0
dependencies:
content-tag: 3.1.1(patch_hash=lgdkxhmahesfzwpl4vwprolz5m)
- ember-template-lint: 6.1.0
+ ember-template-lint: 7.0.0(@babel/[email protected])
walk-sync: 2.2.0
dependencies:
- eslint: 9.20.1
+ eslint: 9.21.0
import-cwd: 3.0.0
walk-sync: 3.0.0
@@ -16137,19 +16129,18 @@ snapshots:
fake-xml-http-request: 2.1.2
route-recognizer: 0.3.4
dependencies:
'@babel/core': 7.26.9([email protected])
- '@glimmer/syntax': 0.84.3
- ember-cli-htmlbars: 6.3.0
- ember-template-imports: 3.4.2
- prettier: 2.8.8
- ts-replace-all: 1.0.0
+ content-tag: 2.0.3
+ prettier: 3.5.3
transitivePeerDependencies:
- supports-color
+
@@ -17151,42 +17142,42 @@ snapshots:
dependencies:
postcss-scss: 4.0.9([email protected])
- stylelint: 16.14.1([email protected])
- stylelint-config-recommended: 14.0.1([email protected]([email protected]))
- stylelint-scss: 6.11.0([email protected]([email protected]))
+ stylelint: 16.15.0([email protected])
+ stylelint-config-recommended: 14.0.1([email protected]([email protected]))
+ stylelint-scss: 6.11.0([email protected]([email protected]))
optionalDependencies:
postcss: 8.5.3
dependencies:
- stylelint: 16.14.1([email protected])
+ stylelint: 16.15.0([email protected])
dependencies:
- stylelint: 16.14.1([email protected])
+ stylelint: 16.15.0([email protected])
dependencies:
- stylelint: 16.14.1([email protected])
- stylelint-config-recommended-scss: 14.1.0([email protected])([email protected]([email protected]))
- stylelint-config-standard: 36.0.1([email protected]([email protected]))
+ stylelint: 16.15.0([email protected])
+ stylelint-config-recommended-scss: 14.1.0([email protected])([email protected]([email protected]))
+ stylelint-config-standard: 36.0.1([email protected]([email protected]))
optionalDependencies:
postcss: 8.5.3
dependencies:
- stylelint: 16.14.1([email protected])
- stylelint-config-recommended: 14.0.1([email protected]([email protected]))
+ stylelint: 16.15.0([email protected])
+ stylelint-config-recommended: 14.0.1([email protected]([email protected]))
dependencies:
- stylelint: 16.14.1([email protected])
- stylelint-config-recommended: 15.0.0([email protected]([email protected]))
+ stylelint: 16.15.0([email protected])
+ stylelint-config-recommended: 15.0.0([email protected]([email protected]))
dependencies:
css-tree: 3.1.0
is-plain-object: 5.0.0
@@ -17196,9 +17187,9 @@ snapshots:
postcss-resolve-nested-selector: 0.1.6
postcss-selector-parser: 7.1.0
postcss-value-parser: 4.2.0
- stylelint: 16.14.1([email protected])
+ stylelint: 16.15.0([email protected])
dependencies:
'@csstools/css-parser-algorithms': 3.0.4(@csstools/[email protected])
'@csstools/css-tokenizer': 3.0.3
@@ -17234,7 +17225,7 @@ snapshots:
postcss-value-parser: 4.2.0
resolve-from: 5.0.0
string-width: 4.2.3
- supports-hyperlinks: 3.1.0
+ supports-hyperlinks: 3.2.0
svg-tags: 1.0.0
table: 6.9.0
write-file-atomic: 5.0.1
@@ -17254,7 +17245,7 @@ snapshots:
dependencies:
has-flag: 4.0.0
dependencies:
has-flag: 4.0.0
supports-color: 7.2.0
@@ -17582,10 +17573,6 @@ snapshots:
- dependencies:
- core-js: 3.41.0
-
@@ -17664,7 +17651,7 @@ snapshots:
@@ -17784,11 +17771,6 @@ snapshots:
- dependencies:
- resolve-package-path: 3.1.0
- semver: 7.7.1
-
[email protected](patch_hash=ng672yys7q7cl7vz44xn3y54uq):