From a17d54d0bf723683b57d79b0b21093d1b60d9454 Mon Sep 17 00:00:00 2001
From: Jarek Radosz
Date: Fri, 30 Oct 2020 17:37:32 +0100
Subject: [PATCH] DEV: De-arrowify tests (#11068)
Using arrow functions changes `this` context, which is undesired in tests, e.g. it makes it impossible to setup things like pretender (`this.server`) in `beforeEach` hooks.
Ember guides always use classic functions in examples (e.g. https://guides.emberjs.com/release/testing/test-types/), and that's what it uses in its own test suite, as do various addons and ember apps.
It was also already used in Discourse where `this` was required. Moving forward, it will be needed in more places as we migrate toward ember-cli.
(I might later add a custom rule to eslint-discourse-ember to enforce this)
---
.../discourse/tests/acceptance/about-test.js | 2 +-
.../tests/acceptance/account-created-test.js | 8 +-
.../tests/acceptance/admin-emails-test.js | 2 +-
.../acceptance/admin-search-log-term-test.js | 2 +-
.../acceptance/admin-search-logs-test.js | 2 +-
.../acceptance/admin-site-settings-test.js | 12 +--
.../tests/acceptance/admin-site-text-test.js | 4 +-
.../acceptance/admin-suspend-user-test.js | 6 +-
.../acceptance/admin-user-badges-test.js | 2 +-
.../acceptance/admin-user-emails-test.js | 8 +-
.../tests/acceptance/admin-user-index-test.js | 4 +-
.../tests/acceptance/admin-users-list-test.js | 8 +-
.../acceptance/admin-watched-words-test.js | 6 +-
.../tests/acceptance/auth-complete-test.js | 2 +-
.../discourse/tests/acceptance/badges-test.js | 4 +-
.../tests/acceptance/bookmarks-test.js | 16 +--
.../tests/acceptance/category-banner-test.js | 6 +-
.../tests/acceptance/category-chooser-test.js | 4 +-
.../acceptance/category-edit-security-test.js | 8 +-
.../tests/acceptance/category-edit-test.js | 10 +-
.../tests/acceptance/category-new-test.js | 2 +-
.../tests/acceptance/click-track-test.js | 2 +-
.../tests/acceptance/composer-actions-test.js | 36 +++----
.../acceptance/composer-attachment-test.js | 4 +-
.../acceptance/composer-edit-conflict-test.js | 6 +-
.../acceptance/composer-hyperlink-test.js | 2 +-
.../tests/acceptance/composer-onebox-test.js | 2 +-
.../tests/acceptance/composer-tags-test.js | 4 +-
.../tests/acceptance/composer-test.js | 50 +++++-----
.../acceptance/composer-topic-links-test.js | 14 +--
.../acceptance/composer-uncategorized-test.js | 4 +-
.../create-account-external-test.js | 2 +-
.../create-account-user-fields-test.js | 2 +-
.../tests/acceptance/custom-html-set-test.js | 6 +-
.../acceptance/custom-html-template-test.js | 2 +-
.../tests/acceptance/dashboard-test.js | 16 +--
.../tests/acceptance/emoji-picker-test.js | 12 +--
.../discourse/tests/acceptance/emoji-test.js | 4 +-
.../tests/acceptance/encoded-category-test.js | 2 +-
.../tests/acceptance/flag-post-test.js | 8 +-
.../tests/acceptance/forgot-password-test.js | 2 +-
.../tests/acceptance/group-index-test.js | 6 +-
.../group-manage-categories-test.js | 6 +-
.../group-manage-interaction-test.js | 4 +-
.../acceptance/group-manage-logs-test.js | 2 +-
.../group-manage-membership-test.js | 4 +-
.../acceptance/group-manage-profile-test.js | 6 +-
.../acceptance/group-manage-tags-test.js | 6 +-
.../tests/acceptance/group-requests-test.js | 2 +-
.../discourse/tests/acceptance/group-test.js | 12 +--
.../tests/acceptance/groups-index-test.js | 2 +-
.../tests/acceptance/groups-new-test.js | 4 +-
.../tests/acceptance/hamburger-menu-test.js | 2 +-
.../tests/acceptance/hashtags-test.js | 2 +-
.../tests/acceptance/invite-accept-test.js | 2 +-
.../invite-show-user-fields-test.js | 2 +-
.../tests/acceptance/jump-to-test.js | 4 +-
.../acceptance/keyboard-shortcuts-test.js | 2 +-
.../tests/acceptance/login-required-test.js | 2 +-
...email-and-hide-email-address-taken-test.js | 2 +-
...in-with-email-and-no-social-logins-test.js | 4 +-
.../login-with-email-disabled-test.js | 2 +-
.../tests/acceptance/login-with-email-test.js | 2 +-
.../tests/acceptance/mobile-discovery-test.js | 2 +-
.../tests/acceptance/mobile-sign-in-test.js | 2 +-
.../tests/acceptance/mobile-users-test.js | 2 +-
.../tests/acceptance/new-message-test.js | 4 +-
.../tests/acceptance/new-topic-test.js | 4 +-
.../acceptance/notifications-filter-test.js | 6 +-
.../tests/acceptance/page-publishing-test.js | 2 +-
.../tests/acceptance/password-reset-test.js | 4 +-
.../tests/acceptance/personal-message-test.js | 4 +-
.../plugin-keyboard-shortcut-test.js | 4 +-
.../plugin-outlet-connector-class-test.js | 2 +-
.../plugin-outlet-decorator-test.js | 2 +-
.../plugin-outlet-multi-template-test.js | 2 +-
.../plugin-outlet-single-template-test.js | 2 +-
.../tests/acceptance/post-admin-menu-test.js | 4 +-
.../tests/acceptance/preferences-test.js | 30 +++---
.../acceptance/raw-plugin-outlet-test.js | 2 +-
.../tests/acceptance/redirect-to-top-test.js | 6 +-
.../tests/acceptance/reports-test.js | 4 +-
.../discourse/tests/acceptance/review-test.js | 14 +--
.../tests/acceptance/search-full-test.js | 32 +++---
.../tests/acceptance/search-mobile-test.js | 2 +-
.../discourse/tests/acceptance/search-test.js | 14 +--
.../share-and-invite-desktop-test.js | 6 +-
.../share-and-invite-mobile-test.js | 6 +-
.../tests/acceptance/shared-drafts-test.js | 2 +-
.../tests/acceptance/sign-in-test.js | 16 +--
.../discourse/tests/acceptance/static-test.js | 2 +-
.../tests/acceptance/tag-groups-test.js | 4 +-
.../acceptance/tags-intersection-test.js | 2 +-
.../discourse/tests/acceptance/tags-test.js | 10 +-
.../tests/acceptance/topic-admin-menu-test.js | 8 +-
.../tests/acceptance/topic-anonymous-test.js | 10 +-
.../tests/acceptance/topic-discovery-test.js | 8 +-
.../tests/acceptance/topic-edit-timer-test.js | 16 +--
.../topic-footer-buttons-mobile-test.js | 2 +-
.../acceptance/topic-list-tracker-test.js | 2 +-
.../tests/acceptance/topic-move-posts-test.js | 8 +-
.../topic-notifications-button-test.js | 2 +-
.../acceptance/topic-quote-button-test.js | 2 +-
.../discourse/tests/acceptance/topic-test.js | 48 ++++-----
.../tests/acceptance/unknown-test.js | 6 +-
.../tests/acceptance/user-anonymous-test.js | 8 +-
.../tests/acceptance/user-bookmarks-test.js | 6 +-
.../tests/acceptance/user-card-test.js | 2 +-
.../acceptance/user-drafts-stream-test.js | 4 +-
.../user-preferences-interface-test.js | 14 +--
.../discourse/tests/acceptance/user-test.js | 16 +--
.../discourse/tests/acceptance/users-test.js | 8 +-
.../components/keyboard-shortcuts-test.js | 10 +-
.../tests/unit/ember/resolver-test.js | 16 +--
.../tests/unit/lib/allow-lister-test.js | 2 +-
.../discourse/tests/unit/lib/bbcode-test.js | 2 +-
.../discourse/tests/unit/lib/bookmark-test.js | 6 +-
.../tests/unit/lib/break-string-test.js | 2 +-
.../tests/unit/lib/category-badge-test.js | 10 +-
.../unit/lib/click-track-edit-history-test.js | 6 +-
.../unit/lib/click-track-profile-page-test.js | 6 +-
.../tests/unit/lib/click-track-test.js | 36 +++----
.../discourse/tests/unit/lib/computed-test.js | 12 +--
.../discourse/tests/unit/lib/emoji-test.js | 2 +-
.../discourse/tests/unit/lib/get-url-test.js | 12 +--
.../tests/unit/lib/highlight-search-test.js | 4 +-
.../discourse/tests/unit/lib/i18n-test.js | 12 +--
.../tests/unit/lib/icon-library-test.js | 4 +-
.../tests/unit/lib/key-value-store-test.js | 4 +-
.../tests/unit/lib/link-mentions-test.js | 2 +-
.../tests/unit/lib/load-script-test.js | 6 +-
.../discourse/tests/unit/lib/oneboxer-test.js | 4 +-
.../tests/unit/lib/preload-store-test.js | 14 +--
.../tests/unit/lib/pretty-text-test.js | 98 +++++++++----------
.../tests/unit/lib/sanitizer-test.js | 8 +-
.../tests/unit/lib/screen-track-test.js | 2 +-
.../discourse/tests/unit/lib/search-test.js | 4 +-
.../discourse/tests/unit/lib/sharing-test.js | 4 +-
.../tests/unit/lib/text-direction-test.js | 4 +-
.../tests/unit/lib/to-markdown-test.js | 44 ++++-----
.../tests/unit/lib/upload-short-url-test.js | 10 +-
.../discourse/tests/unit/lib/uploads-test.js | 6 +-
.../discourse/tests/unit/lib/url-test.js | 14 +--
.../tests/unit/lib/user-search-test.js | 10 +-
.../tests/unit/lib/utilities-test.js | 22 ++---
.../tests/unit/mixins/setting-object-test.js | 8 +-
.../tests/unit/mixins/singleton-test.js | 10 +-
.../discourse/tests/unit/models/badge-test.js | 12 +--
.../tests/unit/models/category-test.js | 12 +--
.../tests/unit/models/composer-test.js | 18 ++--
.../tests/unit/models/email-log-test.js | 4 +-
.../discourse/tests/unit/models/group-test.js | 2 +-
.../tests/unit/models/invite-test.js | 2 +-
.../tests/unit/models/nav-item-test.js | 4 +-
.../tests/unit/models/post-stream-test.js | 66 ++++++-------
.../discourse/tests/unit/models/post-test.js | 12 +--
.../tests/unit/models/report-test.js | 26 ++---
.../tests/unit/models/rest-model-test.js | 14 +--
.../tests/unit/models/result-set-test.js | 6 +-
.../tests/unit/models/session-test.js | 2 +-
.../discourse/tests/unit/models/site-test.js | 6 +-
.../unit/models/staff-action-log-test.js | 2 +-
.../discourse/tests/unit/models/store-test.js | 38 +++----
.../tests/unit/models/topic-details-test.js | 4 +-
.../discourse/tests/unit/models/topic-test.js | 22 ++---
.../unit/models/topic-tracking-state-test.js | 4 +-
.../tests/unit/models/user-action-test.js | 2 +-
.../tests/unit/models/user-badge-test.js | 12 +--
.../tests/unit/models/user-drafts-test.js | 4 +-
.../tests/unit/models/user-stream-test.js | 4 +-
.../discourse/tests/unit/models/user-test.js | 12 +--
.../wizard/test/acceptance/wizard-test.js | 4 +-
.../wizard/test/models/wizard-field-test.js | 6 +-
.../acceptance/details-button-test.js.es6 | 4 +-
.../lib/details-cooked-test.js.es6 | 2 +-
.../local-dates-composer-test.js.es6 | 2 +-
.../lib/date-with-zone-helper-test.js.es6 | 6 +-
.../lib/local-date-builder-test.js.es6 | 18 ++--
.../acceptance/poll-breakdown-test.js.es6 | 4 +-
.../poll-builder-disabled-test.js.es6 | 6 +-
.../poll-builder-enabled-test.js.es6 | 8 +-
.../acceptance/poll-pie-chart-test.js.es6 | 2 +-
.../acceptance/poll-quote-test.js.es6 | 2 +-
.../polls-bar-chart-test-desktop.js.es6 | 6 +-
.../polls-bar-chart-test-mobile.js.es6 | 2 +-
185 files changed, 762 insertions(+), 762 deletions(-)
diff --git a/app/assets/javascripts/discourse/tests/acceptance/about-test.js b/app/assets/javascripts/discourse/tests/acceptance/about-test.js
index 9f0afe82ed1..f16b59924eb 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/about-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/about-test.js
@@ -4,7 +4,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("About", function () {
- test("viewing", async (assert) => {
+ test("viewing", async function (assert) {
await visit("/about");
assert.ok($("body.about-page").length, "has body class");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js
index a7111dd8616..2931a3961b6 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/account-created-test.js
@@ -6,7 +6,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import PreloadStore from "discourse/lib/preload-store";
acceptance("Account Created", function () {
- test("account created - message", async (assert) => {
+ test("account created - message", async function (assert) {
PreloadStore.store("accountCreated", {
message: "Hello World",
});
@@ -21,7 +21,7 @@ acceptance("Account Created", function () {
assert.notOk(exists(".activation-controls"));
});
- test("account created - resend email", async (assert) => {
+ test("account created - resend email", async function (assert) {
PreloadStore.store("accountCreated", {
message: "Hello World",
username: "eviltrout",
@@ -45,7 +45,7 @@ acceptance("Account Created", function () {
assert.equal(email, "eviltrout@example.com");
});
- test("account created - update email - cancel", async (assert) => {
+ test("account created - update email - cancel", async function (assert) {
PreloadStore.store("accountCreated", {
message: "Hello World",
username: "eviltrout",
@@ -65,7 +65,7 @@ acceptance("Account Created", function () {
assert.equal(currentPath(), "account-created.index");
});
- test("account created - update email - submit", async (assert) => {
+ test("account created - update email - submit", async function (assert) {
PreloadStore.store("accountCreated", {
message: "Hello World",
username: "eviltrout",
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js
index 871a229dd66..30c3c1b4082 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-emails-test.js
@@ -28,7 +28,7 @@ acceptance("Admin - Emails", function (needs) {
});
});
- test("shows selected and elided text", async (assert) => {
+ test("shows selected and elided text", async function (assert) {
await visit("/admin/email/advanced-test");
await fillIn("textarea.email-body", EMAIL.trim());
await click(".email-advanced-test button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js
index 654e6d00aed..723534e0ea4 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-log-term-test.js
@@ -6,7 +6,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Log Term", function (needs) {
needs.user();
- test("show search log term details", async (assert) => {
+ test("show search log term details", async function (assert) {
await visit("/admin/logs/search_logs/term?term=ruby");
assert.ok($("div.search-logs-filter").length, "has the search type filter");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js
index 576059584cc..c5bb95d914b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-search-logs-test.js
@@ -6,7 +6,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Search Logs", function (needs) {
needs.user();
- test("show search logs", async (assert) => {
+ test("show search logs", async function (assert) {
await visit("/admin/logs/search_logs");
assert.ok($("table.search-logs-list.grid").length, "has the div class");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js
index a0ea84dcaec..411abacf789 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-settings-test.js
@@ -30,7 +30,7 @@ acceptance("Admin - Site Settings", function (needs) {
updatedTitle = null;
});
- test("upload site setting", async (assert) => {
+ test("upload site setting", async function (assert) {
await visit("/admin/site_settings");
assert.ok(
@@ -41,7 +41,7 @@ acceptance("Admin - Site Settings", function (needs) {
assert.ok(exists(".row.setting.upload .undo"), "undo button is present");
});
- test("changing value updates dirty state", async (assert) => {
+ test("changing value updates dirty state", async function (assert) {
await visit("/admin/site_settings");
await fillIn("#setting-filter", " title ");
assert.equal(count(".row.setting"), 1, "filter returns 1 site setting");
@@ -88,7 +88,7 @@ acceptance("Admin - Site Settings", function (needs) {
);
});
- test("always shows filtered site settings if a filter is set", async (assert) => {
+ test("always shows filtered site settings if a filter is set", async function (assert) {
await visit("/admin/site_settings");
await fillIn("#setting-filter", "title");
assert.equal(count(".row.setting"), 1);
@@ -102,7 +102,7 @@ acceptance("Admin - Site Settings", function (needs) {
assert.equal(count(".row.setting"), 1);
});
- test("filter settings by plugin name", async (assert) => {
+ test("filter settings by plugin name", async function (assert) {
await visit("/admin/site_settings");
await fillIn("#setting-filter", "plugin:discourse-logo");
@@ -113,7 +113,7 @@ acceptance("Admin - Site Settings", function (needs) {
assert.equal(count(".row.setting"), 0);
});
- test("category name is preserved", async (assert) => {
+ test("category name is preserved", async function (assert) {
await visit("admin/site_settings/category/basic?filter=menu");
assert.equal(
currentURL(),
@@ -121,7 +121,7 @@ acceptance("Admin - Site Settings", function (needs) {
);
});
- test("shows all_results if current category has none", async (assert) => {
+ test("shows all_results if current category has none", async function (assert) {
await visit("admin/site_settings");
await click(".admin-nav .basic a");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js
index cf9d843dbce..4b92cd02d2d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-site-text-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Site Texts", function (needs) {
needs.user();
- test("search for a key", async (assert) => {
+ test("search for a key", async function (assert) {
await visit("/admin/customize/site_texts");
await fillIn(".site-text-search", "Test");
@@ -28,7 +28,7 @@ acceptance("Admin - Site Texts", function (needs) {
assert.ok(exists(".site-text.overridden"));
});
- test("edit and revert a site text by key", async (assert) => {
+ test("edit and revert a site text by key", async function (assert) {
await visit("/admin/customize/site_texts/site.test");
assert.equal(queryAll(".title h3").text(), "site.test");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js
index 244af8af9a5..a54ef489da0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-suspend-user-test.js
@@ -25,7 +25,7 @@ acceptance("Admin - Suspend User", function (needs) {
);
});
- test("suspend a user - cancel", async (assert) => {
+ test("suspend a user - cancel", async function (assert) {
await visit("/admin/users/1234/regular");
await click(".suspend-user");
@@ -36,7 +36,7 @@ acceptance("Admin - Suspend User", function (needs) {
assert.equal(queryAll(".suspend-user-modal:visible").length, 0);
});
- test("suspend a user - cancel with input", async (assert) => {
+ test("suspend a user - cancel with input", async function (assert) {
await visit("/admin/users/1234/regular");
await click(".suspend-user");
@@ -63,7 +63,7 @@ acceptance("Admin - Suspend User", function (needs) {
assert.equal(queryAll(".bootbox.modal:visible").length, 0);
});
- test("suspend, then unsuspend a user", async (assert) => {
+ test("suspend, then unsuspend a user", async function (assert) {
const suspendUntilCombobox = selectKit(".suspend-until .combobox");
await visit("/admin/flags/active");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js
index 83ca86f9801..7d750e7e93b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-badges-test.js
@@ -6,7 +6,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Users Badges", function (needs) {
needs.user();
- test("lists badges", async (assert) => {
+ test("lists badges", async function (assert) {
await visit("/admin/users/1/eviltrout/badges");
assert.ok(exists(`span[data-badge-name="Badge 8"]`));
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js
index 3a9e081ec7e..e8ea7305029 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-emails-test.js
@@ -35,13 +35,13 @@ function assertMultipleSecondary(assert, firstEmail, secondEmail) {
acceptance("Admin - User Emails", function (needs) {
needs.user();
- test("viewing self without secondary emails", async (assert) => {
+ test("viewing self without secondary emails", async function (assert) {
await visit("/admin/users/1/eviltrout");
assertNoSecondary(assert);
});
- test("viewing self with multiple secondary emails", async (assert) => {
+ test("viewing self with multiple secondary emails", async function (assert) {
await visit("/admin/users/3/markvanlan");
assert.equal(
@@ -57,14 +57,14 @@ acceptance("Admin - User Emails", function (needs) {
);
});
- test("viewing another user with no secondary email", async (assert) => {
+ test("viewing another user with no secondary email", async function (assert) {
await visit("/admin/users/1234/regular");
await click(`.display-row.secondary-emails button`);
assertNoSecondary(assert);
});
- test("viewing another account with secondary emails", async (assert) => {
+ test("viewing another account with secondary emails", async function (assert) {
await visit("/admin/users/1235/regular1");
await click(`.display-row.secondary-emails button`);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js
index dad654e1778..786bbba7024 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-user-index-test.js
@@ -39,7 +39,7 @@ acceptance("Admin - User Index", function (needs) {
});
});
- test("can edit username", async (assert) => {
+ test("can edit username", async function (assert) {
await visit("/admin/users/2/sam");
assert.equal(queryAll(".display-row.username .value").text().trim(), "sam");
@@ -60,7 +60,7 @@ acceptance("Admin - User Index", function (needs) {
);
});
- test("will clear unsaved groups when switching user", async (assert) => {
+ test("will clear unsaved groups when switching user", async function (assert) {
await visit("/admin/users/2/sam");
assert.equal(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js
index 8efbf5192a9..27b6e45195d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-users-list-test.js
@@ -8,14 +8,14 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Users List", function (needs) {
needs.user();
- test("lists users", async (assert) => {
+ test("lists users", async function (assert) {
await visit("/admin/users/list/active");
assert.ok(exists(".users-list .user"));
assert.ok(!exists(".user:eq(0) .email small"), "escapes email");
});
- test("sorts users", async (assert) => {
+ test("sorts users", async function (assert) {
await visit("/admin/users/list/active");
assert.ok(exists(".users-list .user"));
@@ -39,7 +39,7 @@ acceptance("Admin - Users List", function (needs) {
);
});
- test("toggles email visibility", async (assert) => {
+ test("toggles email visibility", async function (assert) {
await visit("/admin/users/list/active");
assert.ok(exists(".users-list .user"));
@@ -61,7 +61,7 @@ acceptance("Admin - Users List", function (needs) {
);
});
- test("switching tabs", async (assert) => {
+ test("switching tabs", async function (assert) {
const activeUser = "eviltrout";
const suspectUser = "sam";
const activeTitle = I18n.t("admin.users.titles.active");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js
index ce2b6a258d2..fd9e279e2e9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/admin-watched-words-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Admin - Watched Words", function (needs) {
needs.user();
- test("list words in groups", async (assert) => {
+ test("list words in groups", async function (assert) {
await visit("/admin/logs/watched_words/action/block");
assert.ok(exists(".watched-words-list"));
@@ -44,7 +44,7 @@ acceptance("Admin - Watched Words", function (needs) {
assert.ok(!exists(".watched-words-list .watched-word"), "Empty word list.");
});
- test("add words", async (assert) => {
+ test("add words", async function (assert) {
await visit("/admin/logs/watched_words/action/block");
click(".show-words-checkbox");
@@ -61,7 +61,7 @@ acceptance("Admin - Watched Words", function (needs) {
assert.equal(found.length, 1);
});
- test("remove words", async (assert) => {
+ test("remove words", async function (assert) {
await visit("/admin/logs/watched_words/action/block");
await click(".show-words-checkbox");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js
index 3783f68704c..be2d0572526 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/auth-complete-test.js
@@ -20,7 +20,7 @@ acceptance("Auth Complete", function (needs) {
.removeChild(document.getElementById("data-authentication"));
});
- test("when login not required", async (assert) => {
+ test("when login not required", async function (assert) {
await visit("/");
assert.equal(currentPath(), "discovery.latest", "it stays on the homepage");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/badges-test.js b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js
index 575259f87c4..48837da4c86 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/badges-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/badges-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Badges", function (needs) {
needs.user();
- test("Visit Badge Pages", async (assert) => {
+ test("Visit Badge Pages", async function (assert) {
await visit("/badges");
assert.ok($("body.badges-page").length, "has body class");
@@ -20,7 +20,7 @@ acceptance("Badges", function (needs) {
assert.ok(!exists(".badge-card:eq(0) script"));
});
- test("shows correct badge titles to choose from", async (assert) => {
+ test("shows correct badge titles to choose from", async function (assert) {
const availableBadgeTitles = selectKit(".select-kit");
await visit("/badges/50/custombadge");
await availableBadgeTitles.expand();
diff --git a/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js
index b4226be962f..15a86b3da6e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/bookmarks-test.js
@@ -39,7 +39,7 @@ acceptance("Bookmarking", function (needs) {
);
});
- test("Bookmarks modal opening", async (assert) => {
+ test("Bookmarks modal opening", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
assert.ok(
@@ -48,7 +48,7 @@ acceptance("Bookmarking", function (needs) {
);
});
- test("Bookmarks modal selecting reminder type", async (assert) => {
+ test("Bookmarks modal selecting reminder type", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
@@ -79,7 +79,7 @@ acceptance("Bookmarking", function (needs) {
]);
});
- test("Saving a bookmark with a reminder", async (assert) => {
+ test("Saving a bookmark with a reminder", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
await fillIn("input#bookmark-name", "Check this out later");
@@ -98,7 +98,7 @@ acceptance("Bookmarking", function (needs) {
assert.deepEqual(steps, ["tomorrow"]);
});
- test("Opening the options panel and remembering the option", async (assert) => {
+ test("Opening the options panel and remembering the option", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
await click(".bookmark-options-button");
@@ -119,7 +119,7 @@ acceptance("Bookmarking", function (needs) {
assert.deepEqual(steps, ["none"]);
});
- test("Saving a bookmark with no reminder or name", async (assert) => {
+ test("Saving a bookmark with no reminder or name", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
await click("#save-bookmark");
@@ -137,7 +137,7 @@ acceptance("Bookmarking", function (needs) {
assert.deepEqual(steps, ["none"]);
});
- test("Deleting a bookmark with a reminder", async (assert) => {
+ test("Deleting a bookmark with a reminder", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
await click("#tap_tile_tomorrow");
@@ -169,7 +169,7 @@ acceptance("Bookmarking", function (needs) {
);
});
- test("Cancelling saving a bookmark", async (assert) => {
+ test("Cancelling saving a bookmark", async function (assert) {
await visit("/t/internationalization-localization/280");
await openBookmarkModal();
await click(".d-modal-cancel");
@@ -179,7 +179,7 @@ acceptance("Bookmarking", function (needs) {
);
});
- test("Editing a bookmark", async (assert) => {
+ test("Editing a bookmark", async function (assert) {
await visit("/t/internationalization-localization/280");
let now = moment.tz(loggedInUser().resolvedTimezone(loggedInUser()));
let tomorrow = now.add(1, "day").format("YYYY-MM-DD");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js
index a4b8ab01967..61738d61bb8 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/category-banner-test.js
@@ -37,7 +37,7 @@ acceptance("Category Banners", function (needs) {
],
});
- test("Does not display category banners when not set", async (assert) => {
+ test("Does not display category banners when not set", async function (assert) {
await visit("/c/test-read-only-without-banner");
await click("#create-topic");
@@ -48,7 +48,7 @@ acceptance("Category Banners", function (needs) {
);
});
- test("Displays category banners when set", async (assert) => {
+ test("Displays category banners when set", async function (assert) {
await visit("/c/test-read-only-with-banner");
await click("#create-topic");
@@ -85,7 +85,7 @@ acceptance("Anonymous Category Banners", function (needs) {
],
});
- test("Does not display category banners when set", async (assert) => {
+ test("Does not display category banners when set", async function (assert) {
await visit("/c/test-read-only-with-banner");
assert.ok(
!visible(".category-read-only-banner"),
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js
index ea618282948..bd7ef8217d0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/category-chooser-test.js
@@ -9,7 +9,7 @@ acceptance("CategoryChooser", function (needs) {
allow_uncategorized_topics: false,
});
- test("does not display uncategorized if not allowed", async (assert) => {
+ test("does not display uncategorized if not allowed", async function (assert) {
const categoryChooser = selectKit(".category-chooser");
await visit("/");
@@ -19,7 +19,7 @@ acceptance("CategoryChooser", function (needs) {
assert.ok(categoryChooser.rowByIndex(0).name() !== "uncategorized");
});
- test("prefill category when category_id is set", async (assert) => {
+ test("prefill category when category_id is set", async function (assert) {
await visit("/new-topic?category_id=1");
assert.equal(selectKit(".category-chooser").header().value(), 1);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js
index cdefbb2d339..00dc3b86bdb 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-security-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Category Edit - security", function (needs) {
needs.user();
- test("default", async (assert) => {
+ test("default", async function (assert) {
await visit("/c/bug/edit/security");
const $firstItem = queryAll(".permission-list li:eq(0)");
@@ -19,7 +19,7 @@ acceptance("Category Edit - security", function (needs) {
assert.equal(permission, "Create / Reply / See");
});
- test("removing a permission", async (assert) => {
+ test("removing a permission", async function (assert) {
const availableGroups = selectKit(".available-groups");
await visit("/c/bug/edit/security");
@@ -43,7 +43,7 @@ acceptance("Category Edit - security", function (needs) {
);
});
- test("adding a permission", async (assert) => {
+ test("adding a permission", async function (assert) {
const availableGroups = selectKit(".available-groups");
const permissionSelector = selectKit(".permission-selector");
@@ -67,7 +67,7 @@ acceptance("Category Edit - security", function (needs) {
assert.equal(permission, "Reply / See");
});
- test("adding a previously removed permission", async (assert) => {
+ test("adding a previously removed permission", async function (assert) {
const availableGroups = selectKit(".available-groups");
await visit("/c/bug/edit/security");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js
index eb751c85a4e..6743a4512e9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/category-edit-test.js
@@ -10,7 +10,7 @@ acceptance("Category Edit", function (needs) {
needs.user();
needs.settings({ email_in: true });
- test("Editing the category", async (assert) => {
+ test("Editing the category", async function (assert) {
await visit("/c/bug");
await click("button.edit-category");
@@ -57,7 +57,7 @@ acceptance("Category Edit", function (needs) {
);
});
- test("Index Route", async (assert) => {
+ test("Index Route", async function (assert) {
await visit("/c/bug/edit");
assert.equal(
currentURL(),
@@ -66,7 +66,7 @@ acceptance("Category Edit", function (needs) {
);
});
- test("Slugless Route", async (assert) => {
+ test("Slugless Route", async function (assert) {
await visit("/c/1-category/edit");
assert.equal(
currentURL(),
@@ -76,7 +76,7 @@ acceptance("Category Edit", function (needs) {
assert.equal(queryAll("input.category-name").val(), "bug");
});
- test("Error Saving", async (assert) => {
+ test("Error Saving", async function (assert) {
await visit("/c/bug/edit/settings");
await fillIn(".email-in", "duplicate@example.com");
await click("#save-category");
@@ -88,7 +88,7 @@ acceptance("Category Edit", function (needs) {
assert.ok(!visible(".bootbox"));
});
- test("Subcategory list settings", async (assert) => {
+ test("Subcategory list settings", async function (assert) {
await visit("/c/bug/edit/settings");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js b/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js
index 21a85d6533e..df3d11510e5 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/category-new-test.js
@@ -9,7 +9,7 @@ import sinon from "sinon";
acceptance("Category New", function (needs) {
needs.user();
- test("Creating a new category", async (assert) => {
+ test("Creating a new category", async function (assert) {
await visit("/new-category");
assert.ok(queryAll(".badge-category"));
diff --git a/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js
index 5b7b918c07f..a0403c39f5f 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/click-track-test.js
@@ -12,7 +12,7 @@ acceptance("Click Track", function (needs) {
});
});
- test("Do not track mentions", async (assert) => {
+ test("Do not track mentions", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
queryAll(".user-card.show").length === 0,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
index 3721f168586..19776e45ef5 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-actions-test.js
@@ -19,7 +19,7 @@ acceptance("Composer Actions", function (needs) {
needs.settings({ enable_whispers: true });
needs.site({ can_tag_topics: true });
- test("creating new topic and then reply_as_private_message keeps attributes", async (assert) => {
+ test("creating new topic and then reply_as_private_message keeps attributes", async function (assert) {
await visit("/");
await click("button#create-topic");
@@ -34,7 +34,7 @@ acceptance("Composer Actions", function (needs) {
assert.ok(queryAll(".d-editor-input").val(), "this is the reply");
});
- test("replying to post", async (assert) => {
+ test("replying to post", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -52,7 +52,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(composerActions.rowByIndex(5).value(), undefined);
});
- test("replying to post - reply_as_private_message", async (assert) => {
+ test("replying to post - reply_as_private_message", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -68,7 +68,7 @@ acceptance("Composer Actions", function (needs) {
);
});
- test("replying to post - reply_to_topic", async (assert) => {
+ test("replying to post - reply_to_topic", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -95,7 +95,7 @@ acceptance("Composer Actions", function (needs) {
);
});
- test("replying to post - toggle_whisper", async (assert) => {
+ test("replying to post - toggle_whisper", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -113,7 +113,7 @@ acceptance("Composer Actions", function (needs) {
);
});
- test("replying to post - reply_as_new_topic", async (assert) => {
+ test("replying to post - reply_as_new_topic", async function (assert) {
sinon
.stub(Draft, "get")
.returns(Promise.resolve({ draft: "", draft_sequence: 0 }));
@@ -144,7 +144,7 @@ acceptance("Composer Actions", function (needs) {
sinon.restore();
});
- test("reply_as_new_topic without a new_topic draft", async (assert) => {
+ test("reply_as_new_topic without a new_topic draft", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".create.reply");
const composerActions = selectKit(".composer-actions");
@@ -153,7 +153,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(exists(queryAll(".bootbox")), false);
});
- test("reply_as_new_group_message", async (assert) => {
+ test("reply_as_new_group_message", async function (assert) {
await visit("/t/lorem-ipsum-dolor-sit-amet/130");
await click(".create.reply");
const composerActions = selectKit(".composer-actions");
@@ -168,7 +168,7 @@ acceptance("Composer Actions", function (needs) {
assert.deepEqual(items, ["foo", "foo_group"]);
});
- test("hide component if no content", async (assert) => {
+ test("hide component if no content", async function (assert) {
await visit("/");
await click("button#create-topic");
@@ -184,7 +184,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(composerActions.rows().length, 2);
});
- test("interactions", async (assert) => {
+ test("interactions", async function (assert) {
const composerActions = selectKit(".composer-actions");
const quote = "Life is like riding a bicycle.";
@@ -265,7 +265,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(composerActions.rows().length, 3);
});
- test("replying to post - toggle_topic_bump", async (assert) => {
+ test("replying to post - toggle_topic_bump", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -293,7 +293,7 @@ acceptance("Composer Actions", function (needs) {
);
});
- test("replying to post as staff", async (assert) => {
+ test("replying to post as staff", async function (assert) {
const composerActions = selectKit(".composer-actions");
updateCurrentUser({ admin: true });
@@ -305,7 +305,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(composerActions.rowByIndex(4).value(), "toggle_topic_bump");
});
- test("replying to post as TL3 user", async (assert) => {
+ test("replying to post as TL3 user", async function (assert) {
const composerActions = selectKit(".composer-actions");
updateCurrentUser({ moderator: false, admin: false, trust_level: 3 });
@@ -323,7 +323,7 @@ acceptance("Composer Actions", function (needs) {
});
});
- test("replying to post as TL4 user", async (assert) => {
+ test("replying to post as TL4 user", async function (assert) {
const composerActions = selectKit(".composer-actions");
updateCurrentUser({ moderator: false, admin: false, trust_level: 4 });
@@ -335,7 +335,7 @@ acceptance("Composer Actions", function (needs) {
assert.equal(composerActions.rowByIndex(3).value(), "toggle_topic_bump");
});
- test("replying to first post - reply_as_private_message", async (assert) => {
+ test("replying to first post - reply_as_private_message", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -351,7 +351,7 @@ acceptance("Composer Actions", function (needs) {
);
});
- test("editing post", async (assert) => {
+ test("editing post", async function (assert) {
const composerActions = selectKit(".composer-actions");
await visit("/t/internationalization-localization/280");
@@ -385,7 +385,7 @@ acceptance("Composer Actions With New Topic Draft", function (needs) {
needs.hooks.beforeEach(() => _clearSnapshots());
needs.hooks.afterEach(() => _clearSnapshots());
- test("shared draft", async (assert) => {
+ test("shared draft", async function (assert) {
stubDraftResponse();
try {
toggleCheckDraftPopup(true);
@@ -427,7 +427,7 @@ acceptance("Composer Actions With New Topic Draft", function (needs) {
sinon.restore();
});
- test("reply_as_new_topic with new_topic draft", async (assert) => {
+ test("reply_as_new_topic with new_topic draft", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".create.reply");
const composerActions = selectKit(".composer-actions");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js
index 519e68b9d2e..5ff1f10dc2e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-attachment-test.js
@@ -33,7 +33,7 @@ acceptance("Composer Attachment", function (needs) {
needs.user();
needs.pretender(pretender);
- test("attachments are cooked properly", async (assert) => {
+ test("attachments are cooked properly", async function (assert) {
await writeInComposer(assert);
assert.equal(
queryAll(".d-editor-preview:visible").html().trim(),
@@ -47,7 +47,7 @@ acceptance("Composer Attachment - Secure Media Enabled", function (needs) {
needs.settings({ secure_media: true });
needs.pretender(pretender);
- test("attachments are cooked properly when secure media is enabled", async (assert) => {
+ test("attachments are cooked properly when secure media is enabled", async function (assert) {
await writeInComposer(assert);
assert.equal(
queryAll(".d-editor-preview:visible").html().trim(),
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js
index 83f637ccf38..31dec2844d7 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-edit-conflict-test.js
@@ -15,7 +15,7 @@ acceptance("Composer - Edit conflict", function (needs) {
});
});
- test("Edit a post that causes an edit conflict", async (assert) => {
+ test("Edit a post that causes an edit conflict", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:eq(0) button.show-more-actions");
await click(".topic-post:eq(0) button.edit");
@@ -33,7 +33,7 @@ acceptance("Composer - Edit conflict", function (needs) {
await click(".modal .btn-primary");
});
- test("Should not send originalText when posting a new reply", async (assert) => {
+ test("Should not send originalText when posting a new reply", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:eq(0) button.reply");
await fillIn(
@@ -43,7 +43,7 @@ acceptance("Composer - Edit conflict", function (needs) {
assert.ok(lastBody.indexOf("originalText") === -1);
});
- test("Should send originalText when editing a reply", async (assert) => {
+ test("Should send originalText when editing a reply", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:eq(0) button.show-more-actions");
await click(".topic-post:eq(0) button.edit");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js
index 425285ac38e..21444ce3a14 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-hyperlink-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Composer - Hyperlink", function (needs) {
needs.user();
- test("add a hyperlink to a reply", async (assert) => {
+ test("add a hyperlink to a reply", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:first-child button.reply");
await fillIn(".d-editor-input", "This is a link to ");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js
index ee0c0d7df12..8f442244526 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-onebox-test.js
@@ -10,7 +10,7 @@ acceptance("Composer - Onebox", function (needs) {
enable_markdown_linkify: true,
});
- test("Preview update should respect max_oneboxes_per_post site setting", async (assert) => {
+ test("Preview update should respect max_oneboxes_per_post site setting", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js
index 2b2cbe1b3d5..47feb7c70ad 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-tags-test.js
@@ -16,7 +16,7 @@ acceptance("Composer - Tags", function (needs) {
});
needs.site({ can_tag_topics: true });
- test("staff bypass tag validation rule", async (assert) => {
+ test("staff bypass tag validation rule", async function (assert) {
await visit("/");
await click("#create-topic");
@@ -33,7 +33,7 @@ acceptance("Composer - Tags", function (needs) {
assert.notEqual(currentURL(), "/");
});
- test("users do not bypass tag validation rule", async (assert) => {
+ test("users do not bypass tag validation rule", async function (assert) {
await visit("/");
await click("#create-topic");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
index 8e0919e0a62..a86dd87cbd4 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js
@@ -24,7 +24,7 @@ acceptance("Composer", function (needs) {
});
});
- skip("Tests the Composer controls", async (assert) => {
+ skip("Tests the Composer controls", async function (assert) {
await visit("/");
assert.ok(exists("#create-topic"), "the create button is visible");
@@ -102,7 +102,7 @@ acceptance("Composer", function (needs) {
assert.ok(!exists(".bootbox.modal"), "the confirmation can be cancelled");
});
- test("Composer upload placeholder", async (assert) => {
+ test("Composer upload placeholder", async function (assert) {
await visit("/");
await click("#create-topic");
@@ -198,7 +198,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Create a topic with server side errors", async (assert) => {
+ test("Create a topic with server side errors", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "this title triggers an error");
@@ -210,7 +210,7 @@ acceptance("Composer", function (needs) {
assert.ok(exists(".d-editor-input"), "the composer input is visible");
});
- test("Create a Topic", async (assert) => {
+ test("Create a Topic", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "Internationalization Localization");
@@ -226,7 +226,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Create an enqueued Topic", async (assert) => {
+ test("Create an enqueued Topic", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "Internationalization Localization");
@@ -239,7 +239,7 @@ acceptance("Composer", function (needs) {
assert.ok(invisible(".d-modal"), "the modal can be dismissed");
});
- test("Can display a message and route to a URL", async (assert) => {
+ test("Can display a message and route to a URL", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "This title doesn't matter");
@@ -259,7 +259,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Create a Reply", async (assert) => {
+ test("Create a Reply", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
@@ -282,7 +282,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Can edit a post after starting a reply", async (assert) => {
+ test("Can edit a post after starting a reply", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .create");
@@ -300,7 +300,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Posting on a different topic", async (assert) => {
+ test("Posting on a different topic", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
await fillIn(
@@ -320,7 +320,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Create an enqueued Reply", async (assert) => {
+ test("Create an enqueued Reply", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.notOk(queryAll(".pending-posts .reviewable-item").length);
@@ -347,7 +347,7 @@ acceptance("Composer", function (needs) {
assert.ok(queryAll(".pending-posts .reviewable-item").length);
});
- test("Edit the first post", async (assert) => {
+ test("Edit the first post", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
@@ -385,7 +385,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer can switch between edits", async (assert) => {
+ test("Composer can switch between edits", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.edit");
@@ -402,7 +402,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer with dirty edit can toggle to another edit", async (assert) => {
+ test("Composer with dirty edit can toggle to another edit", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.edit");
@@ -418,7 +418,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer can toggle between edit and reply", async (assert) => {
+ test("Composer can toggle between edit and reply", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.edit");
@@ -437,7 +437,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer can toggle whispers", async (assert) => {
+ test("Composer can toggle whispers", async function (assert) {
const menu = selectKit(".toolbar-popup-menu-options");
await visit("/t/this-is-a-test-topic/9");
@@ -472,7 +472,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer can toggle layouts (open, fullscreen and draft)", async (assert) => {
+ test("Composer can toggle layouts (open, fullscreen and draft)", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.reply");
@@ -511,7 +511,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer can toggle between reply and createTopic", async (assert) => {
+ test("Composer can toggle between reply and createTopic", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.reply");
@@ -557,7 +557,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer with dirty reply can toggle to edit", async (assert) => {
+ test("Composer with dirty reply can toggle to edit", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.reply");
@@ -572,7 +572,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer draft with dirty reply can toggle to edit", async (assert) => {
+ test("Composer draft with dirty reply can toggle to edit", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.reply");
@@ -592,7 +592,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Composer draft can switch to draft in new context without destroying current draft", async (assert) => {
+ test("Composer draft can switch to draft in new context without destroying current draft", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await click(".topic-post:eq(0) button.reply");
@@ -614,7 +614,7 @@ acceptance("Composer", function (needs) {
);
});
- test("Checks for existing draft", async (assert) => {
+ test("Checks for existing draft", async function (assert) {
try {
toggleCheckDraftPopup(true);
@@ -634,7 +634,7 @@ acceptance("Composer", function (needs) {
}
});
- test("Can switch states without abandon popup", async (assert) => {
+ test("Can switch states without abandon popup", async function (assert) {
try {
toggleCheckDraftPopup(true);
@@ -684,7 +684,7 @@ acceptance("Composer", function (needs) {
sinon.restore();
});
- test("Loading draft also replaces the recipients", async (assert) => {
+ test("Loading draft also replaces the recipients", async function (assert) {
try {
toggleCheckDraftPopup(true);
@@ -706,7 +706,7 @@ acceptance("Composer", function (needs) {
}
});
- test("Deleting the text content of the first post in a private message", async (assert) => {
+ test("Deleting the text content of the first post in a private message", async function (assert) {
await visit("/t/34");
await click("#post_1 .d-icon-ellipsis-h");
@@ -730,7 +730,7 @@ acceptance("Composer", function (needs) {
);
};
- test("Image resizing buttons", async (assert) => {
+ test("Image resizing buttons", async function (assert) {
await visit("/");
await click("#create-topic");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js
index a918ebdc330..ace51f6bcd8 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-topic-links-test.js
@@ -12,7 +12,7 @@ acceptance("Composer topic featured links", function (needs) {
enable_markdown_linkify: true,
});
- test("onebox with title", async (assert) => {
+ test("onebox with title", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "http://www.example.com/has-title.html");
@@ -31,7 +31,7 @@ acceptance("Composer topic featured links", function (needs) {
);
});
- test("onebox result doesn't include a title", async (assert) => {
+ test("onebox result doesn't include a title", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "http://www.example.com/no-title.html");
@@ -50,7 +50,7 @@ acceptance("Composer topic featured links", function (needs) {
);
});
- test("no onebox result", async (assert) => {
+ test("no onebox result", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "http://www.example.com/nope-onebox.html");
@@ -69,7 +69,7 @@ acceptance("Composer topic featured links", function (needs) {
);
});
- test("ignore internal links", async (assert) => {
+ test("ignore internal links", async function (assert) {
await visit("/");
await click("#create-topic");
const title = "http://" + window.location.hostname + "/internal-page.html";
@@ -91,7 +91,7 @@ acceptance("Composer topic featured links", function (needs) {
);
});
- test("link is longer than max title length", async (assert) => {
+ test("link is longer than max title length", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn(
@@ -113,7 +113,7 @@ acceptance("Composer topic featured links", function (needs) {
);
});
- test("onebox with title but extra words in title field", async (assert) => {
+ test("onebox with title but extra words in title field", async function (assert) {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "http://www.example.com/has-title.html test");
@@ -146,7 +146,7 @@ acceptance(
allow_uncategorized_topics: false,
});
- test("Pasting a link enables the text input area", async (assert) => {
+ test("Pasting a link enables the text input area", async function (assert) {
await visit("/");
await click("#create-topic");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js
index 94663d2df09..c58ce1855f4 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/composer-uncategorized-test.js
@@ -14,7 +14,7 @@ acceptance(
allow_uncategorized_topics: false,
});
- test("Disable body until category is selected", async (assert) => {
+ test("Disable body until category is selected", async function (assert) {
await visit("/");
await click("#create-topic");
assert.ok(exists(".d-editor-input"), "the composer input is visible");
@@ -80,7 +80,7 @@ acceptance(
},
],
});
- test("Enable composer/body if no topic templates present", async (assert) => {
+ test("Enable composer/body if no topic templates present", async function (assert) {
await visit("/");
await click("#create-topic");
assert.ok(exists(".d-editor-input"), "the composer input is visible");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js
index f74626bb119..03a3b280bc1 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-external-test.js
@@ -21,7 +21,7 @@ acceptance("Create Account - external auth", function (needs) {
.removeChild(document.getElementById("data-authentication"));
});
- test("when skip is disabled (default)", async (assert) => {
+ test("when skip is disabled (default)", async function (assert) {
await visit("/");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js
index 1d5e5f2848a..66785ccf3d5 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/create-account-user-fields-test.js
@@ -28,7 +28,7 @@ acceptance("Create Account - User Fields", function (needs) {
],
});
- test("create account with user fields", async (assert) => {
+ test("create account with user fields", async function (assert) {
await visit("/");
await click("header .sign-up-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js
index afde1c0ff63..fc107c14d86 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-set-test.js
@@ -7,12 +7,12 @@ import { setCustomHTML } from "discourse/helpers/custom-html";
import PreloadStore from "discourse/lib/preload-store";
acceptance("CustomHTML set", function () {
- test("has no custom HTML in the top", async (assert) => {
+ test("has no custom HTML in the top", async function (assert) {
await visit("/static/faq");
assert.ok(!exists("span.custom-html-test"), "it has no markup");
});
- test("renders set HTML", async (assert) => {
+ test("renders set HTML", async function (assert) {
setCustomHTML("top", 'HTML ');
await visit("/static/faq");
@@ -23,7 +23,7 @@ acceptance("CustomHTML set", function () {
);
});
- test("renders preloaded HTML", async (assert) => {
+ test("renders preloaded HTML", async function (assert) {
PreloadStore.store("customHTML", {
top: "monster ",
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
index e8f58c12dac..ce10631ae92 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
@@ -14,7 +14,7 @@ acceptance("CustomHTML template", function (needs) {
delete Ember.TEMPLATES["top"];
});
- test("renders custom template", async (assert) => {
+ test("renders custom template", async function (assert) {
await visit("/static/faq");
assert.equal(
queryAll("span.top-span").text(),
diff --git a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
index bf4269d963b..0ce5b65de0e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
@@ -24,13 +24,13 @@ acceptance("Dashboard", function (needs) {
],
});
- test("default", async (assert) => {
+ test("default", async function (assert) {
await visit("/admin");
assert.ok(exists(".dashboard"), "has dashboard-next class");
});
- test("tabs", async (assert) => {
+ test("tabs", async function (assert) {
await visit("/admin");
assert.ok(exists(".dashboard .navigation-item.general"), "general tab");
@@ -42,7 +42,7 @@ acceptance("Dashboard", function (needs) {
assert.ok(exists(".dashboard .navigation-item.reports"), "reports tab");
});
- test("general tab", async (assert) => {
+ test("general tab", async function (assert) {
await visit("/admin");
assert.ok(exists(".admin-report.signups"), "signups report");
assert.ok(exists(".admin-report.posts"), "posts report");
@@ -65,7 +65,7 @@ acceptance("Dashboard", function (needs) {
);
});
- test("activity metrics", async (assert) => {
+ test("activity metrics", async function (assert) {
await visit("/admin");
assert.ok(exists(".admin-report.page-view-total-reqs .today-count"));
@@ -74,7 +74,7 @@ acceptance("Dashboard", function (needs) {
assert.ok(exists(".admin-report.page-view-total-reqs .thirty-days-count"));
});
- test("reports tab", async (assert) => {
+ test("reports tab", async function (assert) {
await visit("/admin");
await click(".dashboard .navigation-item.reports .navigation-link");
@@ -112,7 +112,7 @@ acceptance("Dashboard", function (needs) {
);
});
- test("reports filters", async (assert) => {
+ test("reports filters", async function (assert) {
await visit(
'/admin/reports/signups_with_groups?end_date=2018-07-16&filters=%7B"group"%3A88%7D&start_date=2018-06-16'
);
@@ -131,7 +131,7 @@ acceptance("Dashboard: dashboard_visible_tabs", function (needs) {
needs.user();
needs.settings({ dashboard_visible_tabs: "general|security|reports" });
- test("visible tabs", async (assert) => {
+ test("visible tabs", async function (assert) {
await visit("/admin");
assert.ok(exists(".dashboard .navigation-item.general"), "general tab");
@@ -151,7 +151,7 @@ acceptance("Dashboard: dashboard_hidden_reports", function (needs) {
dashboard_hidden_reports: "posts|dau_by_mau",
});
- test("hidden reports", async (assert) => {
+ test("hidden reports", async function (assert) {
await visit("/admin");
assert.ok(exists(".admin-report.signups.is-visible"), "signups report");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js
index 5fc9ba7146a..6c8c5c05a4e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-picker-test.js
@@ -15,7 +15,7 @@ acceptance("EmojiPicker", function (needs) {
this.emojiStore.reset();
});
- test("emoji picker can be opened/closed", async (assert) => {
+ test("emoji picker can be opened/closed", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
@@ -26,7 +26,7 @@ acceptance("EmojiPicker", function (needs) {
assert.notOk(exists(".emoji-picker.opened"), "it closes the picker");
});
- test("emoji picker triggers event when picking emoji", async (assert) => {
+ test("emoji picker triggers event when picking emoji", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
await click("button.emoji.btn");
@@ -39,7 +39,7 @@ acceptance("EmojiPicker", function (needs) {
);
});
- test("emoji picker adds leading whitespace before emoji", async (assert) => {
+ test("emoji picker adds leading whitespace before emoji", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
@@ -64,7 +64,7 @@ acceptance("EmojiPicker", function (needs) {
);
});
- test("emoji picker has a list of recently used emojis", async (assert) => {
+ test("emoji picker has a list of recently used emojis", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
await click("button.emoji.btn");
@@ -102,7 +102,7 @@ acceptance("EmojiPicker", function (needs) {
);
});
- test("emoji picker correctly orders recently used emojis", async (assert) => {
+ test("emoji picker correctly orders recently used emojis", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
await click("button.emoji.btn");
@@ -125,7 +125,7 @@ acceptance("EmojiPicker", function (needs) {
);
});
- test("emoji picker persists state", async (assert) => {
+ test("emoji picker persists state", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
await click("button.emoji.btn");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js
index 660db5a7180..c56702807d3 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/emoji-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Emoji", function (needs) {
needs.user();
- test("emoji is cooked properly", async (assert) => {
+ test("emoji is cooked properly", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
@@ -18,7 +18,7 @@ acceptance("Emoji", function (needs) {
);
});
- test("skin toned emoji is cooked properly", async (assert) => {
+ test("skin toned emoji is cooked properly", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js
index f6b240ef2d6..9695c696f5a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/encoded-category-test.js
@@ -43,7 +43,7 @@ acceptance("Encoded Sub Category Discovery", function (needs) {
);
});
- test("Visit subcategory by slug", async (assert) => {
+ test("Visit subcategory by slug", async function (assert) {
let bodySelector =
"body.category-\\%E6\\%BC\\%A2\\%E5\\%AD\\%97-parent-\\%E6\\%BC\\%A2\\%E5\\%AD\\%97-subcategory";
await visit("/c/%E6%BC%A2%E5%AD%97-parent/%E6%BC%A2%E5%AD%97-subcategory");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js b/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js
index d2a7de19f93..e4b5a84f73f 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/flag-post-test.js
@@ -82,13 +82,13 @@ acceptance("flagging", function (needs) {
});
});
- test("Flag modal opening", async (assert) => {
+ test("Flag modal opening", async function (assert) {
await visit("/t/internationalization-localization/280");
await openFlagModal();
assert.ok(exists(".flag-modal-body"), "it shows the flag modal");
});
- test("Flag take action dropdown exists", async (assert) => {
+ test("Flag take action dropdown exists", async function (assert) {
await visit("/t/internationalization-localization/280");
await openFlagModal();
await click("#radio_inappropriate");
@@ -101,7 +101,7 @@ acceptance("flagging", function (needs) {
assert.ok(exists(".silence-user-modal"), "it shows the silence modal");
});
- test("Can silence from take action", async (assert) => {
+ test("Can silence from take action", async function (assert) {
await visit("/t/internationalization-localization/280");
await openFlagModal();
await click("#radio_inappropriate");
@@ -116,7 +116,7 @@ acceptance("flagging", function (needs) {
assert.equal(queryAll(".bootbox.modal:visible").length, 0);
});
- test("Gets dismissable warning from canceling incomplete silence from take action", async (assert) => {
+ test("Gets dismissable warning from canceling incomplete silence from take action", async function (assert) {
await visit("/t/internationalization-localization/280");
await openFlagModal();
await click("#radio_inappropriate");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js
index 6a34f91319c..afc3cfd2d90 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/forgot-password-test.js
@@ -16,7 +16,7 @@ acceptance("Forgot password", function (needs) {
});
});
- test("requesting password reset", async (assert) => {
+ test("requesting password reset", async function (assert) {
await visit("/");
await click("header .login-button");
await click("#forgot-password-link");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js
index 3d26edbb742..3c310d1bad9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js
@@ -9,7 +9,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Group Members - Anonymous", function () {
- test("Viewing Members as anon user", async (assert) => {
+ test("Viewing Members as anon user", async function (assert) {
await visit("/g/discourse");
assert.ok(
@@ -34,7 +34,7 @@ acceptance("Group Members - Anonymous", function () {
acceptance("Group Members", function (needs) {
needs.user();
- test("Viewing Members as a group owner", async (assert) => {
+ test("Viewing Members as a group owner", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/g/discourse");
@@ -47,7 +47,7 @@ acceptance("Group Members", function (needs) {
);
});
- test("Viewing Members as an admin user", async (assert) => {
+ test("Viewing Members as an admin user", async function (assert) {
await visit("/g/discourse");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js
index e2a823a27e6..9134746b600 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-categories-test.js
@@ -8,7 +8,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Category Notification Defaults", function () {
- test("As an anonymous user", async (assert) => {
+ test("As an anonymous user", async function (assert) {
await visit("/g/discourse/manage/categories");
assert.ok(
@@ -20,7 +20,7 @@ acceptance("Managing Group Category Notification Defaults", function () {
acceptance("Managing Group Category Notification Defaults", function (needs) {
needs.user();
- test("As an admin", async (assert) => {
+ test("As an admin", async function (assert) {
await visit("/g/discourse/manage/categories");
assert.ok(
@@ -29,7 +29,7 @@ acceptance("Managing Group Category Notification Defaults", function (needs) {
);
});
- test("As a group owner", async (assert) => {
+ test("As a group owner", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/g/discourse/manage/categories");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js
index e06f5a44bfb..d6ef2070559 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-interaction-test.js
@@ -10,7 +10,7 @@ acceptance("Managing Group Interaction Settings", function (needs) {
needs.user();
needs.settings({ email_in: true });
- test("As an admin", async (assert) => {
+ test("As an admin", async function (assert) {
updateCurrentUser({
moderator: false,
admin: true,
@@ -50,7 +50,7 @@ acceptance("Managing Group Interaction Settings", function (needs) {
);
});
- test("As a group owner", async (assert) => {
+ test("As a group owner", async function (assert) {
updateCurrentUser({
moderator: false,
admin: false,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js
index 9962fa69610..ae04d2c584c 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-logs-test.js
@@ -94,7 +94,7 @@ acceptance("Group logs", function (needs) {
});
});
- test("Browsing group logs", async (assert) => {
+ test("Browsing group logs", async function (assert) {
await visit("/g/snorlax/manage/logs");
assert.ok(
queryAll("tr.group-manage-logs-row").length === 2,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js
index bfb85261f32..d35a04db356 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-membership-test.js
@@ -10,7 +10,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Managing Group Membership", function (needs) {
needs.user();
- test("As an admin", async (assert) => {
+ test("As an admin", async function (assert) {
updateCurrentUser({ can_create_group: true });
await visit("/g/alternative-group/manage/membership");
@@ -79,7 +79,7 @@ acceptance("Managing Group Membership", function (needs) {
assert.equal(emailDomains.header().value(), "foo.com");
});
- test("As a group owner", async (assert) => {
+ test("As a group owner", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/g/discourse/manage/membership");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js
index b250f941d76..5a68938e00a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-profile-test.js
@@ -8,7 +8,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Profile", function () {
- test("As an anonymous user", async (assert) => {
+ test("As an anonymous user", async function (assert) {
await visit("/g/discourse/manage/profile");
assert.ok(
@@ -21,7 +21,7 @@ acceptance("Managing Group Profile", function () {
acceptance("Managing Group Profile", function (needs) {
needs.user();
- test("As an admin", async (assert) => {
+ test("As an admin", async function (assert) {
await visit("/g/discourse/manage/profile");
assert.ok(
@@ -42,7 +42,7 @@ acceptance("Managing Group Profile", function (needs) {
);
});
- test("As a group owner", async (assert) => {
+ test("As a group owner", async function (assert) {
updateCurrentUser({
moderator: false,
admin: false,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js
index 9f204d9a627..f5a8cfc7161 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-manage-tags-test.js
@@ -8,7 +8,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Managing Group Tag Notification Defaults", function () {
- test("As an anonymous user", async (assert) => {
+ test("As an anonymous user", async function (assert) {
await visit("/g/discourse/manage/tags");
assert.ok(
@@ -21,7 +21,7 @@ acceptance("Managing Group Tag Notification Defaults", function () {
acceptance("Managing Group Tag Notification Defaults", function (needs) {
needs.user();
- test("As an admin", async (assert) => {
+ test("As an admin", async function (assert) {
await visit("/g/discourse/manage/tags");
assert.ok(
@@ -30,7 +30,7 @@ acceptance("Managing Group Tag Notification Defaults", function (needs) {
);
});
- test("As a group owner", async (assert) => {
+ test("As a group owner", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/g/discourse/manage/tags");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js
index d51e715636e..2d847bdb770 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-requests-test.js
@@ -83,7 +83,7 @@ acceptance("Group Requests", function (needs) {
});
});
- test("Group Requests", async (assert) => {
+ test("Group Requests", async function (assert) {
await visit("/g/Macdonald/requests");
assert.equal(queryAll(".group-members tr").length, 2);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-test.js
index 10c304104b6..5ecf61bb907 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/group-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/group-test.js
@@ -76,7 +76,7 @@ acceptance("Group - Anonymous", function (needs) {
);
});
- test("Anonymous Viewing Automatic Group", async (assert) => {
+ test("Anonymous Viewing Automatic Group", async function (assert) {
await visit("/g/moderators");
assert.equal(
@@ -185,7 +185,7 @@ acceptance("Group - Authenticated", function (needs) {
);
});
- test("User Viewing Group", async (assert) => {
+ test("User Viewing Group", async function (assert) {
await visit("/g");
await click(".group-index-request");
@@ -218,7 +218,7 @@ acceptance("Group - Authenticated", function (needs) {
);
});
- test("Admin viewing group messages when there are no messages", async (assert) => {
+ test("Admin viewing group messages when there are no messages", async function (assert) {
await visit("/g/alternative-group");
await click(".nav-pills li a[title='Messages']");
@@ -229,7 +229,7 @@ acceptance("Group - Authenticated", function (needs) {
);
});
- test("Admin viewing group messages", async (assert) => {
+ test("Admin viewing group messages", async function (assert) {
await visit("/g/discourse");
await click(".nav-pills li a[title='Messages']");
@@ -240,7 +240,7 @@ acceptance("Group - Authenticated", function (needs) {
);
});
- test("Admin Viewing Group", async (assert) => {
+ test("Admin Viewing Group", async function (assert) {
await visit("/g/discourse");
assert.ok(
@@ -260,7 +260,7 @@ acceptance("Group - Authenticated", function (needs) {
);
});
- test("Moderator Viewing Group", async (assert) => {
+ test("Moderator Viewing Group", async function (assert) {
await visit("/g/alternative-group");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js
index cda15526a77..b44f36170e0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/groups-index-test.js
@@ -9,7 +9,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Groups", function () {
- test("Browsing Groups", async (assert) => {
+ test("Browsing Groups", async function (assert) {
await visit("/g?username=eviltrout");
assert.equal(count(".group-box"), 1, "it displays user's groups");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js
index 7bc7477397c..54910a26e22 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/groups-new-test.js
@@ -5,7 +5,7 @@ import I18n from "I18n";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Group - Anonymous", function () {
- test("As an anon user", async (assert) => {
+ test("As an anon user", async function (assert) {
await visit("/g");
assert.equal(
@@ -18,7 +18,7 @@ acceptance("New Group - Anonymous", function () {
acceptance("New Group - Authenticated", function (needs) {
needs.user();
- test("Creating a new group", async (assert) => {
+ test("Creating a new group", async function (assert) {
await visit("/g");
await click(".groups-header-new");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js
index 9cb1c2cdc8e..86fc7f53f57 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/hamburger-menu-test.js
@@ -13,7 +13,7 @@ acceptance("Opening the hamburger menu with some reviewables", function (
needs.pretender((server, helper) => {
server.get("/review/count.json", () => helper.response({ count: 3 }));
});
- test("As a staff member", async (assert) => {
+ test("As a staff member", async function (assert) {
updateCurrentUser({ moderator: true, admin: false });
await visit("/");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js
index 3907dd352aa..83b29950ca3 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/hashtags-test.js
@@ -18,7 +18,7 @@ acceptance("Category and Tag Hashtags", function (needs) {
});
});
- test("hashtags are cooked properly", async (assert) => {
+ test("hashtags are cooked properly", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-buttons .btn.create");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js
index 89a7a7bc720..64927d05af0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/invite-accept-test.js
@@ -8,7 +8,7 @@ import PreloadStore from "discourse/lib/preload-store";
acceptance("Invite Accept", function (needs) {
needs.settings({ full_name_required: true });
- test("Invite Acceptance Page", async (assert) => {
+ test("Invite Acceptance Page", async function (assert) {
PreloadStore.store("invite_info", {
invited_by: {
id: 123,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js
index 97c90017624..9a14943854d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/invite-show-user-fields-test.js
@@ -28,7 +28,7 @@ acceptance("Accept Invite - User Fields", function (needs) {
],
});
- test("accept invite with user fields", async (assert) => {
+ test("accept invite with user fields", async function (assert) {
PreloadStore.store("invite_info", {
invited_by: {
id: 123,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js
index 30be0a24067..48058d15236 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/jump-to-test.js
@@ -21,7 +21,7 @@ acceptance("Jump to", function (needs) {
});
});
- test("default", async (assert) => {
+ test("default", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("nav#topic-progress .nums");
await click("button.jump-to-post");
@@ -38,7 +38,7 @@ acceptance("Jump to", function (needs) {
);
});
- test("invalid date", async (assert) => {
+ test("invalid date", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("nav#topic-progress .nums");
await click("button.jump-to-post");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js b/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js
index a86810b0b87..235d1773a4f 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/keyboard-shortcuts-test.js
@@ -23,7 +23,7 @@ acceptance("Keyboard Shortcuts", function (needs) {
});
});
- test("go to first suggested topic", async (assert) => {
+ test("go to first suggested topic", async function (assert) {
await visit("/t/this-is-a-test-topic/9");
await keyEvent(document, "keypress", "g".charCodeAt(0));
await keyEvent(document, "keypress", "s".charCodeAt(0));
diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js
index aaf60309bf0..c6490e113d7 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/login-required-test.js
@@ -6,7 +6,7 @@ import { acceptance, invisible } from "discourse/tests/helpers/qunit-helpers";
acceptance("Login Required", function (needs) {
needs.settings({ login_required: true });
- test("redirect", async (assert) => {
+ test("redirect", async function (assert) {
await visit("/latest");
assert.equal(currentPath(), "login", "it redirects them to login");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js
index 320911e7c6e..701e28cf1a5 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-hide-email-address-taken-test.js
@@ -16,7 +16,7 @@ acceptance("Login with email - hide email address taken", function (needs) {
});
});
- test("with hide_email_address_taken enabled", async (assert) => {
+ test("with hide_email_address_taken enabled", async function (assert) {
await visit("/");
await click("header .login-button");
await fillIn("#login-account-name", "someuser@example.com");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js
index 7567cd2ec49..4d5204798b1 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-and-no-social-logins-test.js
@@ -9,14 +9,14 @@ acceptance("Login with email - no social logins", function (needs) {
needs.pretender((server, helper) => {
server.post("/u/email-login", () => helper.response({ success: "OK" }));
});
- test("with login with email enabled", async (assert) => {
+ test("with login with email enabled", async function (assert) {
await visit("/");
await click("header .login-button");
assert.ok(exists(".login-with-email-button"));
});
- test("with login with email disabled", async (assert) => {
+ test("with login with email disabled", async function (assert) {
await visit("/");
await click("header .login-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js
index b506d75a419..f31517f3705 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-disabled-test.js
@@ -9,7 +9,7 @@ acceptance("Login with email disabled", function (needs) {
enable_facebook_logins: true,
});
- test("with email button", async (assert) => {
+ test("with email button", async function (assert) {
await visit("/");
await click("header .login-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js
index b59938e5fc7..2e6df8184e7 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/login-with-email-test.js
@@ -18,7 +18,7 @@ acceptance("Login with email", function (needs) {
);
});
- test("with email button", async (assert) => {
+ test("with email button", async function (assert) {
await visit("/");
await click("header .login-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js
index 377f9a5d896..550d2e4c3ea 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-discovery-test.js
@@ -5,7 +5,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic Discovery - Mobile", function (needs) {
needs.mobileView();
- test("Visit Discovery Pages", async (assert) => {
+ test("Visit Discovery Pages", async function (assert) {
await visit("/");
assert.ok(exists(".topic-list"), "The list of topics was rendered");
assert.ok(exists(".topic-list .topic-list-item"), "has topics");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js
index 21f2b5a802a..bb21a4023c3 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-sign-in-test.js
@@ -5,7 +5,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Signing In - Mobile", function (needs) {
needs.mobileView();
- test("sign in", async (assert) => {
+ test("sign in", async function (assert) {
await visit("/");
await click("header .login-button");
assert.ok(exists("#login-form"), "it shows the login modal");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js
index ac61ffa2c83..1aec2d9466b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/mobile-users-test.js
@@ -5,7 +5,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("User Directory - Mobile", function (needs) {
needs.mobileView();
- test("Visit Page", async (assert) => {
+ test("Visit Page", async function (assert) {
await visit("/u");
assert.ok(exists(".directory .user"), "has a list of users");
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js
index 9fc2484c9de..7cbbaf4e446 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/new-message-test.js
@@ -5,7 +5,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Message - Anonymous", function () {
- test("accessing new-message route when logged out", async (assert) => {
+ test("accessing new-message route when logged out", async function (assert) {
await visit(
"/new-message?username=charlie&title=message%20title&body=message%20body"
);
@@ -17,7 +17,7 @@ acceptance("New Message - Anonymous", function () {
acceptance("New Message - Authenticated", function (needs) {
needs.user();
- test("accessing new-message route when logged in", async (assert) => {
+ test("accessing new-message route when logged in", async function (assert) {
await visit(
"/new-message?username=charlie&title=message%20title&body=message%20body"
);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js
index cd211b61672..2ae375b295f 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/new-topic-test.js
@@ -6,7 +6,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("New Topic - Anonymous", function () {
- test("accessing new-topic route when logged out", async (assert) => {
+ test("accessing new-topic route when logged out", async function (assert) {
await visit("/new-topic?title=topic%20title&body=topic%20body");
assert.ok(exists(".modal.login-modal"), "it shows the login modal");
@@ -15,7 +15,7 @@ acceptance("New Topic - Anonymous", function () {
acceptance("New Topic - Authenticated", function (needs) {
needs.user();
- test("accessing new-topic route when logged in", async (assert) => {
+ test("accessing new-topic route when logged in", async function (assert) {
await visit(
"/new-topic?title=topic%20title&body=topic%20body&category=bug"
);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js
index a4ec9a19e9d..187e4a80163 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/notifications-filter-test.js
@@ -7,13 +7,13 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Notifications filter", function (needs) {
needs.user();
- test("Notifications filter true", async (assert) => {
+ test("Notifications filter true", async function (assert) {
await visit("/u/eviltrout/notifications");
assert.ok(queryAll(".large-notification").length >= 0);
});
- test("Notifications filter read", async (assert) => {
+ test("Notifications filter read", async function (assert) {
await visit("/u/eviltrout/notifications");
const dropdown = selectKit(".notifications-filter");
@@ -23,7 +23,7 @@ acceptance("Notifications filter", function (needs) {
assert.ok(queryAll(".large-notification").length >= 0);
});
- test("Notifications filter unread", async (assert) => {
+ test("Notifications filter unread", async function (assert) {
await visit("/u/eviltrout/notifications");
const dropdown = selectKit(".notifications-filter");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js
index a819687581e..3f97193dbce 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/page-publishing-test.js
@@ -25,7 +25,7 @@ acceptance("Page Publishing", function (needs) {
});
});
- test("can publish a page via modal", async (assert) => {
+ test("can publish a page via modal", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:eq(0) button.show-more-actions");
await click(".topic-post:eq(0) button.show-post-admin-menu");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js
index ec79b84b749..58dd51bb13d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/password-reset-test.js
@@ -59,7 +59,7 @@ acceptance("Password Reset", function (needs) {
});
});
- test("Password Reset Page", async (assert) => {
+ test("Password Reset Page", async function (assert) {
PreloadStore.store("password_reset", { is_developer: false });
await visit("/u/password-reset/myvalidtoken");
@@ -93,7 +93,7 @@ acceptance("Password Reset", function (needs) {
assert.ok(DiscourseURL.redirectTo.calledWith("/"), "form is gone");
});
- test("Password Reset Page With Second Factor", async (assert) => {
+ test("Password Reset Page With Second Factor", async function (assert) {
PreloadStore.store("password_reset", {
is_developer: false,
second_factor_required: true,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js
index d27b79d315a..ad9c88d03a3 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/personal-message-test.js
@@ -8,7 +8,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Personal Message", function (needs) {
needs.user();
- test("footer edit button", async (assert) => {
+ test("footer edit button", async function (assert) {
await visit("/t/pm-for-testing/12");
assert.ok(
@@ -17,7 +17,7 @@ acceptance("Personal Message", function (needs) {
);
});
- test("suggested messages", async (assert) => {
+ test("suggested messages", async function (assert) {
await visit("/t/pm-for-testing/12");
assert.equal(
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 2641eaeee26..053834dc7c6 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,7 +11,7 @@ acceptance("Plugin Keyboard Shortcuts - Logged In", function (needs) {
needs.hooks.beforeEach(function () {
KeyboardShortcutInitializer.initialize(this.container);
});
- test("a plugin can add a keyboard shortcut", async (assert) => {
+ test("a plugin can add a keyboard shortcut", async function (assert) {
withPluginApi("0.8.38", (api) => {
api.addKeyboardShortcut("]", () => {
$("#qunit-fixture").html(
@@ -34,7 +34,7 @@ acceptance("Plugin Keyboard Shortcuts - Anonymous", function (needs) {
needs.hooks.beforeEach(function () {
KeyboardShortcutInitializer.initialize(this.container);
});
- test("a plugin can add a keyboard shortcut with an option", async (assert) => {
+ test("a plugin can add a keyboard shortcut with an option", async function (assert) {
let spy = sinon.spy(KeyboardShortcuts, "_bindToPath");
withPluginApi("0.8.38", (api) => {
api.addKeyboardShortcut("]", () => {}, {
diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js
index b7897f3d569..5d72aada13d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-connector-class-test.js
@@ -67,7 +67,7 @@ acceptance("Plugin Outlet - Connector Class", function (needs) {
delete Ember.TEMPLATES[`${PREFIX}/user-profile-primary/dont-render`];
});
- test("Renders a template into the outlet", async (assert) => {
+ test("Renders a template into the outlet", async function (assert) {
await visit("/u/eviltrout");
assert.ok(
queryAll(".user-profile-primary-outlet.hello").length === 1,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js
index 721f555eca6..2a7c843c3bf 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-decorator-test.js
@@ -42,7 +42,7 @@ acceptance("Plugin Outlet - Decorator", function (needs) {
delete Ember.TEMPLATES[`${PREFIX}/discovery-list-container-top/bar`];
});
- test("Calls the plugin callback with the rendered outlet", async (assert) => {
+ test("Calls the plugin callback with the rendered outlet", async function (assert) {
await visit("/");
const fooConnector = queryAll(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js
index be36be14feb..80ead275a17 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-multi-template-test.js
@@ -25,7 +25,7 @@ acceptance("Plugin Outlet - Multi Template", function (needs) {
clearCache();
});
- test("Renders a template into the outlet", async (assert) => {
+ test("Renders a template into the outlet", async function (assert) {
await visit("/u/eviltrout");
assert.ok(
queryAll(".user-profile-primary-outlet.hello").length === 1,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js
index 75eedd4403a..3915cad663a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/plugin-outlet-single-template-test.js
@@ -17,7 +17,7 @@ acceptance("Plugin Outlet - Single Template", function (needs) {
delete Ember.TEMPLATES[CONNECTOR];
});
- test("Renders a template into the outlet", async (assert) => {
+ test("Renders a template into the outlet", async function (assert) {
await visit("/u/eviltrout");
assert.ok(
queryAll(".user-profile-primary-outlet.hello").length === 1,
diff --git a/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js
index 5cda91ea8c3..a8d08aeab26 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/post-admin-menu-test.js
@@ -4,7 +4,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Post - Admin Menu - Anonymous", function () {
- test("Enter as a anon user", async (assert) => {
+ test("Enter as a anon user", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".show-more-actions");
@@ -22,7 +22,7 @@ acceptance("Post - Admin Menu - Anonymous", function () {
acceptance("Post - Admin Menu - Authenticated", function (needs) {
needs.user();
- test("Enter as a user with group moderator permissions", async (assert) => {
+ test("Enter as a user with group moderator permissions", async function (assert) {
await visit("/t/topic-for-group-moderators/2480");
await click(".show-more-actions");
await click(".show-post-admin-menu");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js
index 55b8fa9f245..8ff2f6edcbb 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/preferences-test.js
@@ -71,7 +71,7 @@ function preferencesPretender(server, helper) {
acceptance("User Preferences", function (needs) {
needs.user();
needs.pretender(preferencesPretender);
- test("update some fields", async (assert) => {
+ test("update some fields", async function (assert) {
await visit("/u/eviltrout/preferences");
assert.ok($("body.user-preferences-page").length, "has the body class");
@@ -128,12 +128,12 @@ acceptance("User Preferences", function (needs) {
);
});
- test("username", async (assert) => {
+ test("username", async function (assert) {
await visit("/u/eviltrout/preferences/username");
assert.ok(exists("#change_username"), "it has the input element");
});
- test("email", async (assert) => {
+ test("email", async function (assert) {
await visit("/u/eviltrout/preferences/email");
assert.ok(exists("#change-email"), "it has the input element");
@@ -147,7 +147,7 @@ acceptance("User Preferences", function (needs) {
);
});
- test("email field always shows up", async (assert) => {
+ test("email field always shows up", async function (assert) {
await visit("/u/eviltrout/preferences/email");
assert.ok(exists("#change-email"), "it has the input element");
@@ -161,7 +161,7 @@ acceptance("User Preferences", function (needs) {
assert.ok(exists("#change-email"), "it has the input element");
});
- test("connected accounts", async (assert) => {
+ test("connected accounts", async function (assert) {
await visit("/u/eviltrout/preferences/account");
assert.ok(
@@ -182,7 +182,7 @@ acceptance("User Preferences", function (needs) {
.indexOf("Connect") > -1;
});
- test("second factor totp", async (assert) => {
+ test("second factor totp", async function (assert) {
await visit("/u/eviltrout/preferences/second-factor");
assert.ok(exists("#password"), "it has a password input");
@@ -203,7 +203,7 @@ acceptance("User Preferences", function (needs) {
);
});
- test("second factor security keys", async (assert) => {
+ test("second factor security keys", async function (assert) {
await visit("/u/eviltrout/preferences/second-factor");
assert.ok(exists("#password"), "it has a password input");
@@ -229,7 +229,7 @@ acceptance("User Preferences", function (needs) {
}
});
- test("default avatar selector", async (assert) => {
+ test("default avatar selector", async function (assert) {
await visit("/u/eviltrout/preferences");
await click(".pref-avatar .btn");
@@ -266,7 +266,7 @@ acceptance("Second Factor Backups", function (needs) {
});
});
- test("second factor backup", async (assert) => {
+ test("second factor backup", async function (assert) {
updateCurrentUser({ second_factor_enabled: true });
await visit("/u/eviltrout/preferences/second-factor");
await click(".edit-2fa-backup");
@@ -294,7 +294,7 @@ acceptance("Avatar selector when selectable avatars is enabled", function (
);
});
- test("selectable avatars", async (assert) => {
+ test("selectable avatars", async function (assert) {
await visit("/u/eviltrout/preferences");
await click(".pref-avatar .btn");
assert.ok(
@@ -308,7 +308,7 @@ acceptance("User Preferences when badges are disabled", function (needs) {
needs.settings({ enable_badges: false });
needs.pretender(preferencesPretender);
- test("visit my preferences", async (assert) => {
+ test("visit my preferences", async function (assert) {
await visit("/u/eviltrout/preferences");
assert.ok($("body.user-preferences-page").length, "has the body class");
assert.equal(
@@ -319,7 +319,7 @@ acceptance("User Preferences when badges are disabled", function (needs) {
assert.ok(exists(".user-preferences"), "it shows the preferences");
});
- test("recently connected devices", async (assert) => {
+ test("recently connected devices", async function (assert) {
await visit("/u/eviltrout/preferences");
assert.equal(
@@ -374,7 +374,7 @@ acceptance(
});
});
- test("setting featured topic on profile", async (assert) => {
+ test("setting featured topic on profile", async function (assert) {
await visit("/u/eviltrout/preferences/profile");
assert.ok(
@@ -429,7 +429,7 @@ acceptance("Custom User Fields", function (needs) {
});
needs.pretender(preferencesPretender);
- test("can select an option from a dropdown", async (assert) => {
+ test("can select an option from a dropdown", async function (assert) {
await visit("/u/eviltrout/preferences/profile");
assert.ok(exists(".user-field"), "it has at least one user field");
await click(".user-field.dropdown");
@@ -455,7 +455,7 @@ acceptance(
top_menu: "categories|latest|top|bookmarks",
});
- test("selecting bookmarks as home directs home to bookmarks", async (assert) => {
+ test("selecting bookmarks as home directs home to bookmarks", async function (assert) {
await visit("/u/eviltrout/preferences/interface");
assert.ok(exists(".home .combo-box"), "it has a home selector combo-box");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js
index 0787e20e223..b700fa0433a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/raw-plugin-outlet-test.js
@@ -22,7 +22,7 @@ acceptance("Raw Plugin Outlet", function (needs) {
needs.hooks.afterEach(() => {
removeRawTemplate(CONNECTOR);
});
- test("Renders the raw plugin outlet", async (assert) => {
+ test("Renders the raw plugin outlet", async function (assert) {
await visit("/");
assert.ok(queryAll(".topic-lala").length > 0, "it renders the outlet");
assert.equal(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js b/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js
index eed2fdbc17a..cf52d73df43 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/redirect-to-top-test.js
@@ -20,7 +20,7 @@ acceptance("Redirect to Top", function (needs) {
});
needs.user();
- test("redirects categories to weekly top", async (assert) => {
+ test("redirects categories to weekly top", async function (assert) {
updateCurrentUser({
should_be_redirected_to_top: true,
redirected_to_top: {
@@ -37,7 +37,7 @@ acceptance("Redirect to Top", function (needs) {
);
});
- test("redirects latest to monthly top", async (assert) => {
+ test("redirects latest to monthly top", async function (assert) {
updateCurrentUser({
should_be_redirected_to_top: true,
redirected_to_top: {
@@ -50,7 +50,7 @@ acceptance("Redirect to Top", function (needs) {
assert.equal(currentPath(), "discovery.topMonthly", "it works for latest");
});
- test("redirects root to All top", async (assert) => {
+ test("redirects root to All top", async function (assert) {
updateCurrentUser({
should_be_redirected_to_top: true,
redirected_to_top: {
diff --git a/app/assets/javascripts/discourse/tests/acceptance/reports-test.js b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js
index 7cd84386290..4978ba53a80 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/reports-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/reports-test.js
@@ -6,7 +6,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Reports", function (needs) {
needs.user();
- test("Visit reports page", async (assert) => {
+ test("Visit reports page", async function (assert) {
await visit("/admin/reports");
assert.equal($(".reports-list .report").length, 1);
@@ -21,7 +21,7 @@ acceptance("Reports", function (needs) {
);
});
- test("Visit report page", async (assert) => {
+ test("Visit report page", async function (assert) {
await visit("/admin/reports/staff_logins");
assert.ok(exists(".export-csv-btn"));
diff --git a/app/assets/javascripts/discourse/tests/acceptance/review-test.js b/app/assets/javascripts/discourse/tests/acceptance/review-test.js
index b668751afe0..84acbbedb2a 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/review-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/review-test.js
@@ -9,7 +9,7 @@ acceptance("Review", function (needs) {
const user = ".reviewable-item[data-reviewable-id=1234]";
- test("It returns a list of reviewable items", async (assert) => {
+ test("It returns a list of reviewable items", async function (assert) {
await visit("/review");
assert.ok(queryAll(".reviewable-item").length, "has a list of items");
@@ -28,7 +28,7 @@ acceptance("Review", function (needs) {
);
});
- test("Grouped by topic", async (assert) => {
+ test("Grouped by topic", async function (assert) {
await visit("/review/topics");
assert.ok(
queryAll(".reviewable-topic").length,
@@ -36,7 +36,7 @@ acceptance("Review", function (needs) {
);
});
- test("Settings", async (assert) => {
+ test("Settings", async function (assert) {
await visit("/review/settings");
assert.ok(
@@ -52,7 +52,7 @@ acceptance("Review", function (needs) {
assert.ok(queryAll(".reviewable-settings .saved").length, "it saved");
});
- test("Flag related", async (assert) => {
+ test("Flag related", async function (assert) {
await visit("/review");
assert.ok(
@@ -72,7 +72,7 @@ acceptance("Review", function (needs) {
);
});
- test("Flag related", async (assert) => {
+ test("Flag related", async function (assert) {
await visit("/review/1");
assert.ok(
@@ -81,7 +81,7 @@ acceptance("Review", function (needs) {
);
});
- test("Clicking the buttons triggers actions", async (assert) => {
+ test("Clicking the buttons triggers actions", async function (assert) {
await visit("/review");
await click(`${user} .reviewable-action.approve`);
assert.equal(
@@ -91,7 +91,7 @@ acceptance("Review", function (needs) {
);
});
- test("Editing a reviewable", async (assert) => {
+ test("Editing a reviewable", async function (assert) {
const topic = ".reviewable-item[data-reviewable-id=4321]";
await visit("/review");
assert.ok(queryAll(`${topic} .reviewable-action.approve`).length);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
index 3700265d7a2..cd0e411b07d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/search-full-test.js
@@ -91,7 +91,7 @@ acceptance("Search - Full Page", function (needs) {
});
});
- test("perform various searches", async (assert) => {
+ test("perform various searches", async function (assert) {
await visit("/search");
assert.ok($("body.search-page").length, "has body class");
@@ -111,7 +111,7 @@ acceptance("Search - Full Page", function (needs) {
assert.ok(queryAll(".fps-topic").length === 1, "has one post");
});
- test("escape search term", async (assert) => {
+ test("escape search term", async function (assert) {
await visit("/search");
await fillIn(".search-query", "@gmail.com");
@@ -123,7 +123,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- skip("update username through advanced search ui", async (assert) => {
+ skip("update username through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await fillIn(".search-advanced-options .user-selector", "admin");
@@ -156,7 +156,7 @@ acceptance("Search - Full Page", function (needs) {
});
});
- test("update category through advanced search ui", async (assert) => {
+ test("update category through advanced search ui", async function (assert) {
const categoryChooser = selectKit(
".search-advanced-options .category-chooser"
);
@@ -180,7 +180,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update in:title filter through advanced search ui", async (assert) => {
+ test("update in:title filter through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await click(".search-advanced-options .in-title");
@@ -203,7 +203,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update in:likes filter through advanced search ui", async (assert) => {
+ test("update in:likes filter through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await click(".search-advanced-options .in-likes");
@@ -219,7 +219,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update in:personal filter through advanced search ui", async (assert) => {
+ test("update in:personal filter through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await click(".search-advanced-options .in-private");
@@ -243,7 +243,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update in:seen filter through advanced search ui", async (assert) => {
+ test("update in:seen filter through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await click(".search-advanced-options .in-seen");
@@ -267,7 +267,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update in filter through advanced search ui", async (assert) => {
+ test("update in filter through advanced search ui", async function (assert) {
const inSelector = selectKit(".search-advanced-options .select-kit#in");
await visit("/search");
@@ -288,7 +288,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update status through advanced search ui", async (assert) => {
+ test("update status through advanced search ui", async function (assert) {
const statusSelector = selectKit(
".search-advanced-options .select-kit#status"
);
@@ -311,7 +311,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("doesn't update status filter header if wrong value entered through searchbox", async (assert) => {
+ test("doesn't update status filter header if wrong value entered through searchbox", async function (assert) {
const statusSelector = selectKit(
".search-advanced-options .select-kit#status"
);
@@ -323,7 +323,7 @@ acceptance("Search - Full Page", function (needs) {
assert.equal(statusSelector.header().label(), "any", 'has "any" populated');
});
- test("doesn't update in filter header if wrong value entered through searchbox", async (assert) => {
+ test("doesn't update in filter header if wrong value entered through searchbox", async function (assert) {
const inSelector = selectKit(".search-advanced-options .select-kit#in");
await visit("/search");
@@ -333,7 +333,7 @@ acceptance("Search - Full Page", function (needs) {
assert.equal(inSelector.header().label(), "any", 'has "any" populated');
});
- test("update post time through advanced search ui", async (assert) => {
+ test("update post time through advanced search ui", async function (assert) {
await visit("/search?expanded=true&q=after:2018-08-22");
assert.equal(
@@ -366,7 +366,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update min post count through advanced search ui", async (assert) => {
+ test("update min post count through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await fillIn("#search-min-post-count", "5");
@@ -383,7 +383,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("update max post count through advanced search ui", async (assert) => {
+ test("update max post count through advanced search ui", async function (assert) {
await visit("/search");
await fillIn(".search-query", "none");
await fillIn("#search-max-post-count", "5");
@@ -400,7 +400,7 @@ acceptance("Search - Full Page", function (needs) {
);
});
- test("validate advanced search when initially empty", async (assert) => {
+ test("validate advanced search when initially empty", async function (assert) {
await visit("/search?expanded=true");
await click(".search-advanced-options .in-likes");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
index 0e6d297fe26..95c26640810 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/search-mobile-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Search - Mobile", function (needs) {
needs.mobileView();
- test("search", async (assert) => {
+ test("search", async function (assert) {
await visit("/");
await click("#search-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/search-test.js b/app/assets/javascripts/discourse/tests/acceptance/search-test.js
index d081613bb43..8a38ca2f722 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/search-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/search-test.js
@@ -19,7 +19,7 @@ acceptance("Search - Anonymous", function (needs) {
});
});
- test("search", async (assert) => {
+ test("search", async function (assert) {
await visit("/");
await click("#search-button");
@@ -48,7 +48,7 @@ acceptance("Search - Anonymous", function (needs) {
);
});
- test("search for a tag", async (assert) => {
+ test("search for a tag", async function (assert) {
await visit("/");
await click("#search-button");
@@ -58,7 +58,7 @@ acceptance("Search - Anonymous", function (needs) {
assert.ok(exists(".search-menu .results ul li"), "it shows results");
});
- test("search scope checkbox", async (assert) => {
+ test("search scope checkbox", async function (assert) {
await visit("/tag/important");
await click("#search-button");
assert.ok(
@@ -91,7 +91,7 @@ acceptance("Search - Anonymous", function (needs) {
);
});
- test("Search with context", async (assert) => {
+ test("Search with context", async function (assert) {
await visit("/t/internationalization-localization/280/1");
await click("#search-button");
@@ -126,7 +126,7 @@ acceptance("Search - Anonymous", function (needs) {
assert.ok(!$(".search-context input[type=checkbox]").is(":checked"));
});
- test("Right filters are shown to anonymous users", async (assert) => {
+ test("Right filters are shown to anonymous users", async function (assert) {
const inSelector = selectKit(".select-kit#in");
await visit("/search?expanded=true");
@@ -153,7 +153,7 @@ acceptance("Search - Anonymous", function (needs) {
acceptance("Search - Authenticated", function (needs) {
needs.user();
- test("Right filters are shown to logged-in users", async (assert) => {
+ test("Right filters are shown to logged-in users", async function (assert) {
const inSelector = selectKit(".select-kit#in");
await visit("/search?expanded=true");
@@ -181,7 +181,7 @@ acceptance("Search - with tagging enabled", function (needs) {
needs.user();
needs.settings({ tagging_enabled: true });
- test("displays tags", async (assert) => {
+ test("displays tags", async function (assert) {
await visit("/");
await click("#search-button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js
index de2bda0fe2d..ead72fad11b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-desktop-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Share and Invite modal - desktop", function (needs) {
needs.user();
- test("Topic footer button", async (assert) => {
+ test("Topic footer button", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
@@ -69,7 +69,7 @@ acceptance("Share and Invite modal - desktop", function (needs) {
);
});
- test("Post date link", async (assert) => {
+ test("Post date link", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#post_2 .post-info.post-date a");
@@ -80,7 +80,7 @@ acceptance("Share and Invite modal - desktop", function (needs) {
acceptance("Share url with badges disabled - desktop", function (needs) {
needs.user();
needs.settings({ enable_badges: false });
- test("topic footer button - badges disabled - desktop", async (assert) => {
+ test("topic footer button - badges disabled - desktop", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-footer-button-share-and-invite");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js
index 1846134abe9..07696332d07 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/share-and-invite-mobile-test.js
@@ -9,7 +9,7 @@ acceptance("Share and Invite modal - mobile", function (needs) {
needs.user();
needs.mobileView();
- test("Topic footer mobile button", async (assert) => {
+ test("Topic footer mobile button", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
@@ -57,7 +57,7 @@ acceptance("Share and Invite modal - mobile", function (needs) {
);
});
- test("Post date link", async (assert) => {
+ test("Post date link", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#post_2 .post-info.post-date a");
@@ -71,7 +71,7 @@ acceptance("Share url with badges disabled - mobile", function (needs) {
needs.settings({
enable_badges: false,
});
- test("topic footer button - badges disabled - mobile", async (assert) => {
+ test("topic footer button - badges disabled - mobile", async function (assert) {
await visit("/t/internationalization-localization/280");
const subject = selectKit(".topic-footer-mobile-dropdown");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js
index 982eae40129..df5d370a0b9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/shared-drafts-test.js
@@ -5,7 +5,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Shared Drafts", function () {
- test("Viewing", async (assert) => {
+ test("Viewing", async function (assert) {
await visit("/t/some-topic/9");
assert.ok(queryAll(".shared-draft-controls").length === 1);
let categoryChooser = selectKit(".shared-draft-controls .category-chooser");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js
index 3d074a49948..1010e86d594 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/sign-in-test.js
@@ -5,7 +5,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Signing In", function () {
- test("sign in", async (assert) => {
+ test("sign in", async function (assert) {
await visit("/");
await click("header .login-button");
assert.ok(exists(".login-modal"), "it shows the login modal");
@@ -29,7 +29,7 @@ acceptance("Signing In", function () {
);
});
- test("sign in - not activated", async (assert) => {
+ test("sign in - not activated", async function (assert) {
await visit("/");
await click("header .login-button");
assert.ok(exists(".login-modal"), "it shows the login modal");
@@ -51,7 +51,7 @@ acceptance("Signing In", function () {
assert.ok(!exists(".modal-body small"), "it escapes the email address");
});
- test("sign in - not activated - edit email", async (assert) => {
+ test("sign in - not activated - edit email", async function (assert) {
await visit("/");
await click("header .login-button");
assert.ok(exists(".login-modal"), "it shows the login modal");
@@ -72,7 +72,7 @@ acceptance("Signing In", function () {
assert.equal(queryAll(".modal-body b").text(), "different@example.com");
});
- test("second factor", async (assert) => {
+ test("second factor", async function (assert) {
await visit("/");
await click("header .login-button");
@@ -105,7 +105,7 @@ acceptance("Signing In", function () {
);
});
- test("security key", async (assert) => {
+ test("security key", async function (assert) {
await visit("/");
await click("header .login-button");
@@ -131,7 +131,7 @@ acceptance("Signing In", function () {
assert.not(exists("#login-button:visible"), "hides the login button");
});
- test("create account", async (assert) => {
+ test("create account", async function (assert) {
await visit("/");
await click("header .sign-up-button");
@@ -170,7 +170,7 @@ acceptance("Signing In", function () {
);
});
- test("second factor backup - valid token", async (assert) => {
+ test("second factor backup - valid token", async function (assert) {
await visit("/");
await click("header .login-button");
await fillIn("#login-account-name", "eviltrout");
@@ -186,7 +186,7 @@ acceptance("Signing In", function () {
);
});
- test("second factor backup - invalid token", async (assert) => {
+ test("second factor backup - invalid token", async function (assert) {
await visit("/");
await click("header .login-button");
await fillIn("#login-account-name", "eviltrout");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/static-test.js b/app/assets/javascripts/discourse/tests/acceptance/static-test.js
index a0450d8d358..78e7b3f9bcb 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/static-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/static-test.js
@@ -4,7 +4,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Static", function () {
- test("Static Pages", async (assert) => {
+ test("Static Pages", async function (assert) {
await visit("/faq");
assert.ok($("body.static-faq").length, "has the body class");
assert.ok(exists(".body-page"), "The content is present");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js
index ffab0fe8492..feddcff454f 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/tag-groups-test.js
@@ -35,7 +35,7 @@ acceptance("Tag Groups", function (needs) {
});
});
- test("tag groups can be saved and deleted", async (assert) => {
+ test("tag groups can be saved and deleted", async function (assert) {
const tags = selectKit(".tag-chooser");
await visit("/tag_groups");
@@ -51,7 +51,7 @@ acceptance("Tag Groups", function (needs) {
assert.ok(!queryAll(".tag-group-content .btn.btn-danger")[0].disabled);
});
- test("tag groups can have multiple groups added to them", async (assert) => {
+ test("tag groups can have multiple groups added to them", async function (assert) {
const tags = selectKit(".tag-chooser");
const groups = selectKit(".group-chooser");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js
index ee69c9f9962..3b88f42e7a0 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/tags-intersection-test.js
@@ -31,7 +31,7 @@ acceptance("Tags intersection", function (needs) {
});
});
- test("Populate tags when creating new topic", async (assert) => {
+ test("Populate tags when creating new topic", async function (assert) {
await visit("/tags/intersection/first/second");
await click("#create-topic");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js
index 5fa41d42079..3dfe9526922 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/tags-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/tags-test.js
@@ -10,7 +10,7 @@ import {
acceptance("Tags", function (needs) {
needs.user();
- test("list the tags", async (assert) => {
+ test("list the tags", async function (assert) {
await visit("/tags");
assert.ok($("body.tags-page").length, "has the body class");
@@ -85,7 +85,7 @@ acceptance("Tags listed by group", function (needs) {
);
});
- test("list the tags in groups", async (assert) => {
+ test("list the tags in groups", async function (assert) {
await visit("/tags");
assert.equal(
$(".tag-list").length,
@@ -126,7 +126,7 @@ acceptance("Tags listed by group", function (needs) {
);
});
- test("new topic button is not available for staff-only tags", async (assert) => {
+ test("new topic button is not available for staff-only tags", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/tag/regular-tag");
@@ -225,7 +225,7 @@ acceptance("Tag info", function (needs) {
);
});
- test("tag info can show synonyms", async (assert) => {
+ test("tag info can show synonyms", async function (assert) {
updateCurrentUser({ moderator: false, admin: false });
await visit("/tag/planters");
@@ -250,7 +250,7 @@ acceptance("Tag info", function (needs) {
assert.ok(!exists("#delete-tag"), "can't delete tag");
});
- test("admin can manage tags", async (assert) => {
+ test("admin can manage tags", async function (assert) {
updateCurrentUser({ moderator: false, admin: true });
await visit("/tag/planters");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js
index 141a7f7853a..d6169b7b3c1 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-admin-menu-test.js
@@ -7,7 +7,7 @@ import {
} from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic - Admin Menu Anonymous Users", function () {
- test("Enter as a regular user", async (assert) => {
+ test("Enter as a regular user", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(exists("#topic"), "The topic was rendered");
assert.ok(
@@ -19,7 +19,7 @@ acceptance("Topic - Admin Menu Anonymous Users", function () {
acceptance("Topic - Admin Menu", function (needs) {
needs.user();
- test("Enter as a user with group moderator permissions", async (assert) => {
+ test("Enter as a user with group moderator permissions", async function (assert) {
updateCurrentUser({ moderator: false, admin: false, trust_level: 1 });
await visit("/t/topic-for-group-moderators/2480");
@@ -30,7 +30,7 @@ acceptance("Topic - Admin Menu", function (needs) {
);
});
- test("Enter as a user with moderator and admin permissions", async (assert) => {
+ test("Enter as a user with moderator and admin permissions", async function (assert) {
updateCurrentUser({ moderator: true, admin: true, trust_level: 4 });
await visit("/t/internationalization-localization/280");
@@ -41,7 +41,7 @@ acceptance("Topic - Admin Menu", function (needs) {
);
});
- test("Toggle the menu as admin focuses the first item", async (assert) => {
+ test("Toggle the menu as admin focuses the first item", async function (assert) {
updateCurrentUser({ admin: true });
await visit("/t/internationalization-localization/280");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js
index 0e56339e87e..d538bd71320 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-anonymous-test.js
@@ -5,7 +5,7 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic - Anonymous", function () {
- test("Enter a Topic", async (assert) => {
+ test("Enter a Topic", async function (assert) {
await visit("/t/internationalization-localization/280/1");
assert.ok(exists("#topic"), "The topic was rendered");
assert.ok(exists("#topic .cooked"), "The topic has cooked posts");
@@ -15,24 +15,24 @@ acceptance("Topic - Anonymous", function () {
);
});
- test("Enter without an id", async (assert) => {
+ test("Enter without an id", async function (assert) {
await visit("/t/internationalization-localization");
assert.ok(exists("#topic"), "The topic was rendered");
});
- test("Enter a 404 topic", async (assert) => {
+ test("Enter a 404 topic", async function (assert) {
await visit("/t/not-found/404");
assert.ok(!exists("#topic"), "The topic was not rendered");
assert.ok(exists(".topic-error"), "An error message is displayed");
});
- test("Enter without access", async (assert) => {
+ test("Enter without access", async function (assert) {
await visit("/t/i-dont-have-access/403");
assert.ok(!exists("#topic"), "The topic was not rendered");
assert.ok(exists(".topic-error"), "An error message is displayed");
});
- test("Enter with 500 errors", async (assert) => {
+ test("Enter with 500 errors", async function (assert) {
await visit("/t/throws-error/500");
assert.ok(!exists("#topic"), "The topic was not rendered");
assert.ok(exists(".topic-error"), "An error message is displayed");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js
index 755b017adf1..b706ab2e013 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-discovery-test.js
@@ -13,7 +13,7 @@ acceptance("Topic Discovery", function (needs) {
show_pinned_excerpt_desktop: true,
});
- test("Visit Discovery Pages", async (assert) => {
+ test("Visit Discovery Pages", async function (assert) {
await visit("/");
assert.ok($("body.navigation-topics").length, "has the default navigation");
assert.ok(exists(".topic-list"), "The list of topics was rendered");
@@ -72,7 +72,7 @@ acceptance("Topic Discovery", function (needs) {
);
});
- test("Clearing state after leaving a category", async (assert) => {
+ test("Clearing state after leaving a category", async function (assert) {
await visit("/c/dev");
assert.ok(
exists(".topic-list-item[data-topic-id=11994] .topic-excerpt"),
@@ -85,7 +85,7 @@ acceptance("Topic Discovery", function (needs) {
);
});
- test("Live update unread state", async (assert) => {
+ test("Live update unread state", async function (assert) {
await visit("/");
assert.ok(
exists(".topic-list-item:not(.visited) a[data-topic-id='11995']"),
@@ -114,7 +114,7 @@ acceptance("Topic Discovery", function (needs) {
);
});
- test("Using period chooser when query params are present", async (assert) => {
+ test("Using period chooser when query params are present", async function (assert) {
await visit("/top?f=foo&d=bar");
sinon.stub(DiscourseURL, "routeTo");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js
index da35fd8e6e5..f9eb57d63e8 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js
@@ -25,7 +25,7 @@ acceptance("Topic - Edit timer", function (needs) {
);
});
- test("default", async (assert) => {
+ test("default", async function (assert) {
updateCurrentUser({ moderator: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -40,7 +40,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.equal(futureDateInputSelector.header().value(), null);
});
- test("autoclose - specific time", async (assert) => {
+ test("autoclose - specific time", async function (assert) {
updateCurrentUser({ moderator: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -61,7 +61,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(regex.test(html));
});
- skip("autoclose", async (assert) => {
+ skip("autoclose", async function (assert) {
updateCurrentUser({ moderator: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -123,7 +123,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(regex3.test(html3));
});
- test("close temporarily", async (assert) => {
+ test("close temporarily", async function (assert) {
updateCurrentUser({ moderator: true });
const timerType = selectKit(".select-kit.timer-type");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -174,7 +174,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(regex2.test(html2));
});
- test("schedule", async (assert) => {
+ test("schedule", async function (assert) {
updateCurrentUser({ moderator: true });
const timerType = selectKit(".select-kit.timer-type");
const categoryChooser = selectKit(".modal-body .category-chooser");
@@ -212,7 +212,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(regex.test(text));
});
- test("TL4 can't auto-delete", async (assert) => {
+ test("TL4 can't auto-delete", async function (assert) {
updateCurrentUser({ moderator: false, admin: false, trust_level: 4 });
await visit("/t/internationalization-localization");
@@ -226,7 +226,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(!timerType.rowByValue("delete").exists());
});
- test("auto delete", async (assert) => {
+ test("auto delete", async function (assert) {
updateCurrentUser({ moderator: true });
const timerType = selectKit(".select-kit.timer-type");
const futureDateInputSelector = selectKit(".future-date-input-selector");
@@ -257,7 +257,7 @@ acceptance("Topic - Edit timer", function (needs) {
assert.ok(regex.test(html));
});
- test("Inline delete timer", async (assert) => {
+ test("Inline delete timer", async function (assert) {
updateCurrentUser({ moderator: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js
index f64412210d5..1950e23d2cf 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-footer-buttons-mobile-test.js
@@ -37,7 +37,7 @@ acceptance("Topic footer buttons mobile", function (needs) {
_test = undefined;
});
- test("default", async (assert) => {
+ test("default", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.equal(_test, null);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js
index b799fa071e0..4b3cb170e97 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-list-tracker-test.js
@@ -8,7 +8,7 @@ import {
} from "discourse/lib/topic-list-tracker";
acceptance("Topic list tracking", function () {
- test("Navigation", async (assert) => {
+ test("Navigation", async function (assert) {
await visit("/");
let url = await nextTopicUrl();
assert.equal(url, "/t/error-after-upgrade-to-0-9-7-9/11557");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js
index d0f15e24ef3..fa9de352e8e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-move-posts-test.js
@@ -7,7 +7,7 @@ import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("Topic move posts", function (needs) {
needs.user();
- test("default", async (assert) => {
+ test("default", async function (assert) {
await visit("/t/internationalization-localization");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
@@ -50,7 +50,7 @@ acceptance("Topic move posts", function (needs) {
);
});
- test("moving all posts", async (assert) => {
+ test("moving all posts", async function (assert) {
await visit("/t/internationalization-localization");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
@@ -86,7 +86,7 @@ acceptance("Topic move posts", function (needs) {
);
});
- test("moving posts from personal message", async (assert) => {
+ test("moving posts from personal message", async function (assert) {
await visit("/t/pm-for-testing/12");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
@@ -122,7 +122,7 @@ acceptance("Topic move posts", function (needs) {
);
});
- test("group moderator moving posts", async (assert) => {
+ test("group moderator moving posts", async function (assert) {
await visit("/t/topic-for-group-moderators/2480");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js
index 68be05e8334..8b36d5211ab 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-notifications-button-test.js
@@ -12,7 +12,7 @@ acceptance("Topic Notifications button", function (needs) {
});
});
- test("Updating topic notification level", async (assert) => {
+ test("Updating topic notification level", async function (assert) {
const notificationOptions = selectKit(
"#topic-footer-buttons .topic-notifications-options"
);
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js
index bb4e6ffc2ae..f85d400bf75 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-quote-button-test.js
@@ -22,7 +22,7 @@ acceptance("Topic - Quote button - logged in", function (needs) {
share_quote_buttons: "twitter|email",
});
- test("Does not show the quote share buttons by default", async (assert) => {
+ test("Does not show the quote share buttons by default", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_5 blockquote");
assert.ok(exists(".insert-quote"), "it shows the quote button");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js
index 34182e32eb5..cc4ebc548dd 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/topic-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-test.js
@@ -26,7 +26,7 @@ acceptance("Topic", function (needs) {
});
});
- test("Reply as new topic", async (assert) => {
+ test("Reply as new topic", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("button.share:eq(0)");
await click(".reply-as-new-topic a");
@@ -45,7 +45,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Reply as new message", async (assert) => {
+ test("Reply as new message", async function (assert) {
await visit("/t/pm-for-testing/12");
await click("button.share:eq(0)");
await click(".reply-as-new-topic a");
@@ -79,14 +79,14 @@ acceptance("Topic", function (needs) {
);
});
- test("Share Modal", async (assert) => {
+ test("Share Modal", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:first-child button.share");
assert.ok(exists("#share-link"), "it shows the share modal");
});
- test("Showing and hiding the edit controls", async (assert) => {
+ test("Showing and hiding the edit controls", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-title .d-icon-pencil-alt");
@@ -102,7 +102,7 @@ acceptance("Topic", function (needs) {
assert.ok(!exists("#edit-title"), "it hides the editing controls");
});
- test("Updating the topic title and category", async (assert) => {
+ test("Updating the topic title and category", async function (assert) {
const categoryChooser = selectKit(".title-wrapper .category-chooser");
await visit("/t/internationalization-localization/280");
@@ -125,7 +125,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Marking a topic as wiki", async (assert) => {
+ test("Marking a topic as wiki", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
@@ -140,7 +140,7 @@ acceptance("Topic", function (needs) {
assert.ok(queryAll("a.wiki").length === 1, "it shows the wiki icon");
});
- test("Visit topic routes", async (assert) => {
+ test("Visit topic routes", async function (assert) {
await visit("/t/12");
assert.equal(
@@ -158,7 +158,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Updating the topic title with emojis", async (assert) => {
+ test("Updating the topic title with emojis", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-title .d-icon-pencil-alt");
@@ -173,7 +173,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Updating the topic title with unicode emojis", async (assert) => {
+ test("Updating the topic title with unicode emojis", async function (assert) {
await visit("/t/internationalization-localization/280");
await click("#topic-title .d-icon-pencil-alt");
@@ -204,7 +204,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Suggested topics", async (assert) => {
+ test("Suggested topics", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.equal(
@@ -213,7 +213,7 @@ acceptance("Topic", function (needs) {
);
});
- test("Deleting a topic", async (assert) => {
+ test("Deleting a topic", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".topic-post:eq(0) button.show-more-actions");
await click(".widget-button.delete");
@@ -242,7 +242,7 @@ acceptance("Topic", function (needs) {
assert.ok(exists(".topic-admin-recover"), "it shows the recover button");
});
- test("Group category moderator posts", async (assert) => {
+ test("Group category moderator posts", async function (assert) {
await visit("/t/topic-for-group-moderators/2480");
assert.ok(exists(".category-moderator"), "it has a class applied");
@@ -256,7 +256,7 @@ acceptance("Topic featured links", function (needs) {
topic_featured_link_enabled: true,
max_topic_title_length: 80,
});
- test("remove featured link", async (assert) => {
+ test("remove featured link", async function (assert) {
await visit("/t/-/299/1");
assert.ok(
exists(".title-wrapper .topic-featured-link"),
@@ -274,7 +274,7 @@ acceptance("Topic featured links", function (needs) {
assert.ok(!exists(".title-wrapper .topic-featured-link"), "link is gone");
});
- test("Converting to a public topic", async (assert) => {
+ test("Converting to a public topic", async function (assert) {
await visit("/t/test-pm/34");
assert.ok(exists(".private_message"));
await click(".toggle-admin-menu");
@@ -290,7 +290,7 @@ acceptance("Topic featured links", function (needs) {
assert.ok(!exists(".private_message"));
});
- test("Unpinning unlisted topic", async (assert) => {
+ test("Unpinning unlisted topic", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".toggle-admin-menu");
@@ -307,7 +307,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("selecting posts", async (assert) => {
+ test("selecting posts", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
@@ -323,7 +323,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("select below", async (assert) => {
+ test("select below", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
@@ -346,14 +346,14 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("View Hidden Replies", async (assert) => {
+ test("View Hidden Replies", async function (assert) {
await visit("/t/internationalization-localization/280");
await click(".gap");
assert.equal(queryAll(".gap").length, 0, "it hides gap");
});
- test("Quoting a quote keeps the original poster name", async (assert) => {
+ test("Quoting a quote keeps the original poster name", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_5 blockquote");
await click(".quote-button .insert-quote");
@@ -365,7 +365,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("Quoting a quote of a different topic keeps the original topic title", async (assert) => {
+ test("Quoting a quote of a different topic keeps the original topic title", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_9 blockquote");
await click(".quote-button .insert-quote");
@@ -379,7 +379,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("Quoting a quote with the Reply button keeps the original poster name", async (assert) => {
+ test("Quoting a quote with the Reply button keeps the original poster name", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_5 blockquote");
await click(".reply");
@@ -391,7 +391,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("Quoting a quote with replyAsNewTopic keeps the original poster name", async (assert) => {
+ test("Quoting a quote with replyAsNewTopic keeps the original poster name", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_5 blockquote");
await keyEvent(document, "keypress", "j".charCodeAt(0));
@@ -404,7 +404,7 @@ acceptance("Topic featured links", function (needs) {
);
});
- test("Quoting by selecting text can mark the quote as full", async (assert) => {
+ test("Quoting by selecting text can mark the quote as full", async function (assert) {
await visit("/t/internationalization-localization/280");
selectText("#post_5 .cooked");
await click(".quote-button .insert-quote");
@@ -426,7 +426,7 @@ acceptance("Topic with title decorated", function (needs) {
});
});
});
- test("Decorate topic title", async (assert) => {
+ test("Decorate topic title", async function (assert) {
await visit("/t/internationalization-localization/280");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js
index 764d3875c18..7c4074a17d9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/unknown-test.js
@@ -27,17 +27,17 @@ acceptance("Unknown", function (needs) {
});
});
- test("Permalink Unknown URL", async (assert) => {
+ test("Permalink Unknown URL", async function (assert) {
await visit("/url-that-doesn't-exist");
assert.ok(exists(".page-not-found"), "The not found content is present");
});
- test("Permalink URL to a Topic", async (assert) => {
+ test("Permalink URL to a Topic", async function (assert) {
await visit("/viewtopic.php?f=8&t=280");
assert.equal(currentURL(), "/t/internationalization-localization/280");
});
- test("Permalink URL to a static page", async (assert) => {
+ test("Permalink URL to a static page", async function (assert) {
await visit("/not-the-url-for-faq");
assert.equal(currentURL(), "/faq");
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js
index ad2218e3b09..3338177075e 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js
@@ -4,13 +4,13 @@ import { test } from "qunit";
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
acceptance("User Anonymous", function () {
- test("Root URL", async (assert) => {
+ test("Root URL", async function (assert) {
await visit("/u/eviltrout");
assert.ok($("body.user-summary-page").length, "has the body class");
assert.equal(currentPath(), "user.summary", "it defaults to summary");
});
- test("Filters", async (assert) => {
+ test("Filters", async function (assert) {
await visit("/u/eviltrout/activity");
assert.ok($("body.user-activity-page").length, "has the body class");
assert.ok(exists(".user-main .about"), "it has the about section");
@@ -27,13 +27,13 @@ acceptance("User Anonymous", function () {
assert.ok(exists(".user-stream.filter-5"), "stream has filter class");
});
- test("Badges", async (assert) => {
+ test("Badges", async function (assert) {
await visit("/u/eviltrout/badges");
assert.ok($("body.user-badges-page").length, "has the body class");
assert.ok(exists(".user-badges-list .badge-card"), "shows a badge");
});
- test("Restricted Routes", async (assert) => {
+ test("Restricted Routes", async function (assert) {
await visit("/u/eviltrout/preferences");
assert.equal(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js
index ef54c4dd275..75225c360a6 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-bookmarks-test.js
@@ -10,7 +10,7 @@ import { cloneJSON } from "discourse-common/lib/object";
acceptance("User's bookmarks", function (needs) {
needs.user();
- test("removing a bookmark with no reminder does not show a confirmation", async (assert) => {
+ test("removing a bookmark with no reminder does not show a confirmation", async function (assert) {
await visit("/u/eviltrout/activity/bookmarks");
assert.ok(queryAll(".bookmark-list-item").length > 0);
@@ -33,7 +33,7 @@ acceptance("User's bookmarks - reminder", function (needs) {
});
});
- test("removing a bookmark with a reminder shows a confirmation", async (assert) => {
+ test("removing a bookmark with a reminder shows a confirmation", async function (assert) {
await visit("/u/eviltrout/activity/bookmarks");
const dropdown = selectKit(".bookmark-actions-dropdown");
@@ -58,7 +58,7 @@ acceptance("User's bookmarks - no bookmarks", function (needs) {
);
});
- test("listing users bookmarks - no bookmarks", async (assert) => {
+ test("listing users bookmarks - no bookmarks", async function (assert) {
await visit("/u/eviltrout/activity/bookmarks");
assert.equal(queryAll(".alert.alert-info").text(), "no bookmarks");
});
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js
index 90ca96785fd..14bf3baabce 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js
@@ -15,7 +15,7 @@ acceptance("User Card - Show Local Time", function (needs) {
server.get("/u/charlie/card.json", () => helper.response(cardResponse));
});
- test("user card local time - does not update timezone for another user", async (assert) => {
+ test("user card local time - does not update timezone for another user", async function (assert) {
User.current().changeTimezone("Australia/Brisbane");
await visit("/t/internationalization-localization/280");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js
index dd88a1826d6..d62f8fb6db3 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-drafts-stream-test.js
@@ -7,7 +7,7 @@ import { click } from "@ember/test-helpers";
acceptance("User Drafts", function (needs) {
needs.user();
- test("Stream", async (assert) => {
+ test("Stream", async function (assert) {
await visit("/u/eviltrout/activity/drafts");
assert.ok(queryAll(".user-stream-item").length === 3, "has drafts");
@@ -18,7 +18,7 @@ acceptance("User Drafts", function (needs) {
);
});
- test("Stream - resume draft", async (assert) => {
+ test("Stream - resume draft", async function (assert) {
await visit("/u/eviltrout/activity/drafts");
assert.ok(queryAll(".user-stream-item").length > 0, "has drafts");
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js
index 75585eb55e3..7bdd500f66d 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-preferences-interface-test.js
@@ -12,7 +12,7 @@ import { click } from "@ember/test-helpers";
acceptance("User Preferences - Interface", function (needs) {
needs.user();
- test("font size change", async (assert) => {
+ test("font size change", async function (assert) {
removeCookie("text_size");
const savePreferences = async () => {
@@ -57,12 +57,12 @@ acceptance("User Preferences - Interface", function (needs) {
removeCookie("text_size");
});
- test("does not show option to disable dark mode by default", async (assert) => {
+ test("does not show option to disable dark mode by default", async function (assert) {
await visit("/u/eviltrout/preferences/interface");
assert.equal($(".control-group.dark-mode").length, 0);
});
- test("shows light/dark color scheme pickers", async (assert) => {
+ test("shows light/dark color scheme pickers", async function (assert) {
let site = Site.current();
site.set("user_color_schemes", [
{ id: 2, name: "Cool Breeze" },
@@ -88,7 +88,7 @@ acceptance(
});
});
- test("show option to disable dark mode", async (assert) => {
+ test("show option to disable dark mode", async function (assert) {
await visit("/u/eviltrout/preferences/interface");
assert.ok(
@@ -97,7 +97,7 @@ acceptance(
);
});
- test("no color scheme picker by default", async (assert) => {
+ test("no color scheme picker by default", async function (assert) {
let site = Site.current();
site.set("user_color_schemes", []);
@@ -105,7 +105,7 @@ acceptance(
assert.equal($(".control-group.color-scheme").length, 0);
});
- test("light color scheme picker", async (assert) => {
+ test("light color scheme picker", async function (assert) {
let site = Site.current();
site.set("user_color_schemes", [{ id: 2, name: "Cool Breeze" }]);
@@ -118,7 +118,7 @@ acceptance(
);
});
- test("light and dark color scheme pickers", async (assert) => {
+ test("light and dark color scheme pickers", async function (assert) {
let site = Site.current();
let session = Session.current();
session.userDarkSchemeId = 1; // same as default set in site settings
diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-test.js
index be6c806ea7f..fec340f5d33 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/user-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/user-test.js
@@ -13,29 +13,29 @@ acceptance("User Routes", function (needs) {
helper.response(400, {})
);
});
- test("Invalid usernames", async (assert) => {
+ test("Invalid usernames", async function (assert) {
await visit("/u/eviltrout%2F..%2F..%2F/summary");
assert.equal(currentPath(), "exception-unknown");
});
- test("Unicode usernames", async (assert) => {
+ test("Unicode usernames", async function (assert) {
await visit("/u/%E3%83%A9%E3%82%A4%E3%82%AA%E3%83%B3/summary");
assert.equal(currentPath(), "user.summary");
});
- test("Invites", async (assert) => {
+ test("Invites", async function (assert) {
await visit("/u/eviltrout/invited/pending");
assert.ok($("body.user-invites-page").length, "has the body class");
});
- test("Messages", async (assert) => {
+ test("Messages", async function (assert) {
await visit("/u/eviltrout/messages");
assert.ok($("body.user-messages-page").length, "has the body class");
});
- test("Notifications", async (assert) => {
+ test("Notifications", async function (assert) {
await visit("/u/eviltrout/notifications");
assert.ok($("body.user-notifications-page").length, "has the body class");
@@ -48,7 +48,7 @@ acceptance("User Routes", function (needs) {
);
});
- test("Root URL - Viewing Self", async (assert) => {
+ test("Root URL - Viewing Self", async function (assert) {
await visit("/u/eviltrout");
assert.ok($("body.user-activity-page").length, "has the body class");
assert.equal(
@@ -59,7 +59,7 @@ acceptance("User Routes", function (needs) {
assert.ok(exists(".container.viewing-self"), "has the viewing-self class");
});
- test("Viewing Summary", async (assert) => {
+ test("Viewing Summary", async function (assert) {
await visit("/u/eviltrout/summary");
assert.ok(exists(".replies-section li a"), "replies");
@@ -75,7 +75,7 @@ acceptance("User Routes", function (needs) {
);
});
- test("Viewing Drafts", async (assert) => {
+ test("Viewing Drafts", async function (assert) {
await visit("/u/eviltrout/activity/drafts");
assert.ok(exists(".user-stream"), "has drafts stream");
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/acceptance/users-test.js b/app/assets/javascripts/discourse/tests/acceptance/users-test.js
index 593100837d3..679410d241b 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/users-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/users-test.js
@@ -4,24 +4,24 @@ import { test } from "qunit";
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
acceptance("User Directory", function () {
- test("Visit Page", async (assert) => {
+ test("Visit Page", async function (assert) {
await visit("/u");
assert.ok($("body.users-page").length, "has the body class");
assert.ok(exists(".directory table tr"), "has a list of users");
});
- test("Visit All Time", async (assert) => {
+ test("Visit All Time", async function (assert) {
await visit("/u?period=all");
assert.ok(exists(".time-read"), "has time read column");
});
- test("Visit Without Usernames", async (assert) => {
+ test("Visit Without Usernames", async function (assert) {
await visit("/u?exclude_usernames=system");
assert.ok($("body.users-page").length, "has the body class");
assert.ok(exists(".directory table tr"), "has a list of users");
});
- test("Visit With Group Filter", async (assert) => {
+ test("Visit With Group Filter", async function (assert) {
await visit("/u?group=trust_level_0");
assert.ok($("body.users-page").length, "has the body class");
assert.ok(exists(".directory table tr"), "has a list of users");
diff --git a/app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js b/app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js
index ea66079fb4a..4ec83d19ca8 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/keyboard-shortcuts-test.js
@@ -117,21 +117,21 @@ Object.keys(functionBindings).forEach((func) => {
});
});
-test("selectDown calls _moveSelection with 1", (assert) => {
+test("selectDown calls _moveSelection with 1", function (assert) {
let stub = sinon.stub(KeyboardShortcuts, "_moveSelection");
KeyboardShortcuts.selectDown();
assert.ok(stub.calledWith(1), "_moveSelection is called with 1");
});
-test("selectUp calls _moveSelection with -1", (assert) => {
+test("selectUp calls _moveSelection with -1", function (assert) {
let stub = sinon.stub(KeyboardShortcuts, "_moveSelection");
KeyboardShortcuts.selectUp();
assert.ok(stub.calledWith(-1), "_moveSelection is called with -1");
});
-test("goBack calls history.back", (assert) => {
+test("goBack calls history.back", function (assert) {
let called = false;
sinon.stub(history, "back").callsFake(function () {
called = true;
@@ -141,14 +141,14 @@ test("goBack calls history.back", (assert) => {
assert.ok(called, "history.back is called");
});
-test("nextSection calls _changeSection with 1", (assert) => {
+test("nextSection calls _changeSection with 1", function (assert) {
let spy = sinon.spy(KeyboardShortcuts, "_changeSection");
KeyboardShortcuts.nextSection();
assert.ok(spy.calledWith(1), "_changeSection is called with 1");
});
-test("prevSection calls _changeSection with -1", (assert) => {
+test("prevSection calls _changeSection with -1", function (assert) {
let spy = sinon.spy(KeyboardShortcuts, "_changeSection");
KeyboardShortcuts.prevSection();
diff --git a/app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js b/app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js
index 771a1594ac7..8af0c8bbf09 100644
--- a/app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/ember/resolver-test.js
@@ -31,7 +31,7 @@ module("lib:resolver", {
},
});
-test("finds templates in top level dir", (assert) => {
+test("finds templates in top level dir", function (assert) {
setTemplates(["foobar", "fooBar", "foo_bar", "foo.bar"]);
lookupTemplate(assert, "template:foobar", "foobar", "by lowcased name");
@@ -40,7 +40,7 @@ test("finds templates in top level dir", (assert) => {
lookupTemplate(assert, "template:foo.bar", "foo.bar", "by dotted name");
});
-test("finds templates in first-level subdir", (assert) => {
+test("finds templates in first-level subdir", function (assert) {
setTemplates(["foo/bar_baz"]);
lookupTemplate(
@@ -69,7 +69,7 @@ test("finds templates in first-level subdir", (assert) => {
);
});
-test("resolves precedence between overlapping top level dir and first level subdir templates", (assert) => {
+test("resolves precedence between overlapping top level dir and first level subdir templates", function (assert) {
setTemplates(["fooBar", "foo_bar", "foo.bar", "foo/bar"]);
lookupTemplate(
@@ -92,7 +92,7 @@ test("resolves precedence between overlapping top level dir and first level subd
);
});
-test("finds templates in subdir deeper than one level", (assert) => {
+test("finds templates in subdir deeper than one level", function (assert) {
setTemplates(["foo/bar/baz/qux"]);
lookupTemplate(
@@ -146,7 +146,7 @@ test("finds templates in subdir deeper than one level", (assert) => {
);
});
-test("resolves mobile templates to 'mobile/' namespace", (assert) => {
+test("resolves mobile templates to 'mobile/' namespace", function (assert) {
setTemplates(["mobile/foo", "bar", "mobile/bar", "baz"]);
setResolverOption("mobileView", true);
@@ -171,7 +171,7 @@ test("resolves mobile templates to 'mobile/' namespace", (assert) => {
);
});
-test("resolves plugin templates to 'javascripts/' namespace", (assert) => {
+test("resolves plugin templates to 'javascripts/' namespace", function (assert) {
setTemplates(["javascripts/foo", "bar", "javascripts/bar", "baz"]);
lookupTemplate(
@@ -194,7 +194,7 @@ test("resolves plugin templates to 'javascripts/' namespace", (assert) => {
);
});
-test("resolves templates with 'admin' prefix to 'admin/templates/' namespace", (assert) => {
+test("resolves templates with 'admin' prefix to 'admin/templates/' namespace", function (assert) {
setTemplates([
"admin/templates/foo",
"adminBar",
@@ -248,7 +248,7 @@ test("resolves templates with 'admin' prefix to 'admin/templates/' namespace", (
);
});
-test("returns 'not_found' template when template name cannot be resolved", (assert) => {
+test("returns 'not_found' template when template name cannot be resolved", function (assert) {
setTemplates(["not_found"]);
lookupTemplate(assert, "template:foo/bar/baz", "not_found", "");
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/allow-lister-test.js b/app/assets/javascripts/discourse/tests/unit/lib/allow-lister-test.js
index c700d220ce0..6cedf111b62 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/allow-lister-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/allow-lister-test.js
@@ -3,7 +3,7 @@ import AllowLister from "pretty-text/allow-lister";
module("lib:allowLister");
-test("allowLister", (assert) => {
+test("allowLister", function (assert) {
const allowLister = new AllowLister();
assert.ok(
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js b/app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js
index 41530ac39cc..36c504c7ac9 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/bbcode-test.js
@@ -3,7 +3,7 @@ import { parseBBCodeTag } from "pretty-text/engines/discourse-markdown/bbcode-bl
module("lib:pretty-text:bbcode");
-test("block with multiple quoted attributes", (assert) => {
+test("block with multiple quoted attributes", function (assert) {
const parsed = parseBBCodeTag('[test one="foo" two="bar bar"]', 0, 30);
assert.equal(parsed.tag, "test");
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js b/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js
index 97ca58a21e7..4994e35ad98 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/bookmark-test.js
@@ -13,7 +13,7 @@ module("lib:bookmark", {
},
});
-test("formattedReminderTime works when the reminder time is tomorrow", (assert) => {
+test("formattedReminderTime works when the reminder time is tomorrow", function (assert) {
let reminderAt = "2020-04-12 09:45:00";
let reminderAtDate = moment
.tz(reminderAt, "Australia/Brisbane")
@@ -24,7 +24,7 @@ test("formattedReminderTime works when the reminder time is tomorrow", (assert)
);
});
-test("formattedReminderTime works when the reminder time is today", (assert) => {
+test("formattedReminderTime works when the reminder time is today", function (assert) {
let reminderAt = "2020-04-11 09:45:00";
let reminderAtDate = moment
.tz(reminderAt, "Australia/Brisbane")
@@ -35,7 +35,7 @@ test("formattedReminderTime works when the reminder time is today", (assert) =>
);
});
-test("formattedReminderTime works when the reminder time is in the future", (assert) => {
+test("formattedReminderTime works when the reminder time is in the future", function (assert) {
let reminderAt = "2020-04-15 09:45:00";
let reminderAtDate = moment
.tz(reminderAt, "Australia/Brisbane")
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js b/app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js
index 1a711d6c7dd..db50237e642 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/break-string-test.js
@@ -3,7 +3,7 @@ import { test, module } from "qunit";
module("lib:breakString", {});
-test("breakString", (assert) => {
+test("breakString", function (assert) {
var b = function (s, hint) {
return new BreakString(s).break(hint);
};
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js b/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js
index 665904c96ee..a4f48f057c4 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/category-badge-test.js
@@ -8,11 +8,11 @@ discourseModule("lib:category-link");
import { categoryBadgeHTML } from "discourse/helpers/category-link";
-test("categoryBadge without a category", (assert) => {
+test("categoryBadge without a category", function (assert) {
assert.blank(categoryBadgeHTML(), "it returns no HTML");
});
-test("Regular categoryBadge", (assert) => {
+test("Regular categoryBadge", function (assert) {
const store = createStore();
const category = store.createRecord("category", {
name: "hello",
@@ -39,7 +39,7 @@ test("Regular categoryBadge", (assert) => {
);
});
-test("undefined color", (assert) => {
+test("undefined color", function (assert) {
const store = createStore();
const noColor = store.createRecord("category", { name: "hello", id: 123 });
const tag = $.parseHTML(categoryBadgeHTML(noColor))[0];
@@ -50,7 +50,7 @@ test("undefined color", (assert) => {
);
});
-test("topic count", (assert) => {
+test("topic count", function (assert) {
const store = createStore();
const category = store.createRecord("category", { name: "hello", id: 123 });
@@ -65,7 +65,7 @@ test("topic count", (assert) => {
);
});
-test("allowUncategorized", (assert) => {
+test("allowUncategorized", function (assert) {
const store = createStore();
const uncategorized = store.createRecord("category", {
name: "uncategorized",
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js
index 326386a2b21..328927c59d3 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-edit-history-test.js
@@ -60,7 +60,7 @@ function generateClickEventOn(selector) {
return $.Event("click", { currentTarget: fixture(selector).first() });
}
-skip("tracks internal URLs", async (assert) => {
+skip("tracks internal URLs", async function (assert) {
assert.expect(2);
sinon.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
@@ -76,7 +76,7 @@ skip("tracks internal URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("#same-site")));
});
-skip("tracks external URLs", async (assert) => {
+skip("tracks external URLs", async function (assert) {
assert.expect(2);
const done = assert.async();
@@ -91,7 +91,7 @@ skip("tracks external URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("a")));
});
-skip("tracks external URLs when opening in another window", async (assert) => {
+skip("tracks external URLs when opening in another window", async function (assert) {
assert.expect(3);
User.currentProp("external_links_in_new_tab", true);
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js
index ccb5b4f5c64..4d0236df397 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-profile-page-test.js
@@ -53,7 +53,7 @@ function generateClickEventOn(selector) {
return $.Event("click", { currentTarget: fixture(selector).first() });
}
-skip("tracks internal URLs", async (assert) => {
+skip("tracks internal URLs", async function (assert) {
assert.expect(2);
sinon.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
@@ -66,7 +66,7 @@ skip("tracks internal URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("#same-site")));
});
-skip("tracks external URLs", async (assert) => {
+skip("tracks external URLs", async function (assert) {
assert.expect(2);
const done = assert.async();
@@ -81,7 +81,7 @@ skip("tracks external URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("a")));
});
-skip("tracks external URLs in other posts", async (assert) => {
+skip("tracks external URLs in other posts", async function (assert) {
assert.expect(2);
const done = assert.async();
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js
index 87fab170c08..db690764754 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/click-track-test.js
@@ -54,7 +54,7 @@ function generateClickEventOn(selector) {
return $.Event("click", { currentTarget: fixture(selector).first() });
}
-skip("tracks internal URLs", async (assert) => {
+skip("tracks internal URLs", async function (assert) {
assert.expect(2);
sinon.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
@@ -70,11 +70,11 @@ skip("tracks internal URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("#same-site")));
});
-test("does not track elements with no href", async (assert) => {
+test("does not track elements with no href", async function (assert) {
assert.ok(track(generateClickEventOn(".a-without-href")));
});
-test("does not track attachments", async (assert) => {
+test("does not track attachments", async function (assert) {
sinon.stub(DiscourseURL, "origin").returns("http://discuss.domain.com");
pretender.post("/clicks/track", () => assert.ok(false));
@@ -87,7 +87,7 @@ test("does not track attachments", async (assert) => {
);
});
-skip("tracks external URLs", async (assert) => {
+skip("tracks external URLs", async function (assert) {
assert.expect(2);
const done = assert.async();
@@ -102,7 +102,7 @@ skip("tracks external URLs", async (assert) => {
assert.notOk(track(generateClickEventOn("a")));
});
-skip("tracks external URLs when opening in another window", async (assert) => {
+skip("tracks external URLs when opening in another window", async function (assert) {
assert.expect(3);
User.currentProp("external_links_in_new_tab", true);
@@ -119,39 +119,39 @@ skip("tracks external URLs when opening in another window", async (assert) => {
assert.ok(window.open.calledWith("http://www.google.com", "_blank"));
});
-test("does not track clicks on lightboxes", async (assert) => {
+test("does not track clicks on lightboxes", async function (assert) {
assert.notOk(track(generateClickEventOn(".lightbox")));
});
-test("does not track clicks when forcibly disabled", async (assert) => {
+test("does not track clicks when forcibly disabled", async function (assert) {
assert.notOk(track(generateClickEventOn(".no-track-link")));
});
-test("does not track clicks on back buttons", async (assert) => {
+test("does not track clicks on back buttons", async function (assert) {
assert.notOk(track(generateClickEventOn(".back")));
});
-test("does not track right clicks inside quotes", async (assert) => {
+test("does not track right clicks inside quotes", async function (assert) {
const event = generateClickEventOn(".quote a:first-child");
event.which = 3;
assert.ok(track(event));
});
-test("does not track clicks links in quotes", async (assert) => {
+test("does not track clicks links in quotes", async function (assert) {
User.currentProp("external_links_in_new_tab", true);
assert.notOk(track(generateClickEventOn(".quote a:last-child")));
assert.ok(window.open.calledWith("https://google.com/", "_blank"));
});
-test("does not track clicks on category badges", async (assert) => {
+test("does not track clicks on category badges", async function (assert) {
assert.notOk(track(generateClickEventOn(".hashtag")));
});
-test("does not track clicks on mailto", async (assert) => {
+test("does not track clicks on mailto", async function (assert) {
assert.ok(track(generateClickEventOn(".mailto")));
});
-test("removes the href and put it as a data attribute", async (assert) => {
+test("removes the href and put it as a data attribute", async function (assert) {
User.currentProp("external_links_in_new_tab", true);
assert.notOk(track(generateClickEventOn("a")));
@@ -164,7 +164,7 @@ test("removes the href and put it as a data attribute", async (assert) => {
assert.ok(window.open.calledWith("http://www.google.com/", "_blank"));
});
-test("restores the href after a while", async (assert) => {
+test("restores the href after a while", async function (assert) {
assert.expect(2);
assert.notOk(track(generateClickEventOn("a")));
@@ -184,24 +184,24 @@ function badgeClickCount(assert, id, expected) {
assert.equal(parseInt($badge.html(), 10), expected);
}
-test("does not update badge clicks on my own link", async (assert) => {
+test("does not update badge clicks on my own link", async function (assert) {
sinon.stub(User, "currentProp").withArgs("id").returns(314);
badgeClickCount(assert, "with-badge", 1);
});
-test("does not update badge clicks in my own post", async (assert) => {
+test("does not update badge clicks in my own post", async function (assert) {
sinon.stub(User, "currentProp").withArgs("id").returns(3141);
badgeClickCount(assert, "with-badge-but-not-mine", 1);
});
-test("updates badge counts correctly", async (assert) => {
+test("updates badge counts correctly", async function (assert) {
badgeClickCount(assert, "inside-onebox", 1);
badgeClickCount(assert, "inside-onebox-forced", 2);
badgeClickCount(assert, "with-badge", 2);
});
function testOpenInANewTab(description, clickEventModifier) {
- test(description, async (assert) => {
+ test(description, async function (assert) {
var clickEvent = generateClickEventOn("a");
clickEventModifier(clickEvent);
assert.ok(track(clickEvent));
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js b/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js
index b8bd0fab82d..349a54b469e 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/computed-test.js
@@ -45,7 +45,7 @@ test("setting", function (assert) {
);
});
-test("propertyEqual", (assert) => {
+test("propertyEqual", function (assert) {
var t = EmberObject.extend({
same: propertyEqual("cookies", "biscuits"),
}).create({
@@ -58,7 +58,7 @@ test("propertyEqual", (assert) => {
assert.ok(!t.get("same"), "it isn't true when one property is different");
});
-test("propertyNotEqual", (assert) => {
+test("propertyNotEqual", function (assert) {
var t = EmberObject.extend({
diff: propertyNotEqual("cookies", "biscuits"),
}).create({
@@ -71,7 +71,7 @@ test("propertyNotEqual", (assert) => {
assert.ok(t.get("diff"), "it is true when one property is different");
});
-test("fmt", (assert) => {
+test("fmt", function (assert) {
var t = EmberObject.extend({
exclaimyUsername: fmt("username", "!!! %@ !!!"),
multiple: fmt("username", "mood", "%@ is %@"),
@@ -105,7 +105,7 @@ test("fmt", (assert) => {
);
});
-test("i18n", (assert) => {
+test("i18n", function (assert) {
var t = EmberObject.extend({
exclaimyUsername: i18n("username", "!!! %@ !!!"),
multiple: i18n("username", "mood", "%@ is %@"),
@@ -139,7 +139,7 @@ test("i18n", (assert) => {
);
});
-test("url", (assert) => {
+test("url", function (assert) {
var t, testClass;
testClass = EmberObject.extend({
@@ -162,7 +162,7 @@ test("url", (assert) => {
);
});
-test("htmlSafe", (assert) => {
+test("htmlSafe", function (assert) {
const cookies = "cookies and biscuits
";
const t = EmberObject.extend({
desc: htmlSafe("cookies"),
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js b/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js
index b8490e22f1c..520b30a5b59 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/emoji-test.js
@@ -131,7 +131,7 @@ test("emojiUnescape", function (assert) {
);
});
-test("Emoji search", (assert) => {
+test("Emoji search", function (assert) {
// able to find an alias
assert.equal(emojiSearch("+1").length, 1);
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js b/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js
index 65506c85df5..ba832543adf 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/get-url-test.js
@@ -12,19 +12,19 @@ import {
module("lib:get-url");
-test("isAbsoluteURL", (assert) => {
+test("isAbsoluteURL", function (assert) {
setupURL(null, "https://example.com", "/forum");
assert.ok(isAbsoluteURL("https://example.com/test/thing"));
assert.ok(!isAbsoluteURL("http://example.com/test/thing"));
assert.ok(!isAbsoluteURL("https://discourse.org/test/thing"));
});
-test("getAbsoluteURL", (assert) => {
+test("getAbsoluteURL", function (assert) {
setupURL(null, "https://example.com", "/forum");
assert.equal(getAbsoluteURL("/cool/path"), "https://example.com/cool/path");
});
-test("withoutPrefix", (assert) => {
+test("withoutPrefix", function (assert) {
setPrefix("/eviltrout");
assert.equal(withoutPrefix("/eviltrout/hello"), "/hello");
assert.equal(withoutPrefix("/eviltrout/"), "/");
@@ -41,7 +41,7 @@ test("withoutPrefix", (assert) => {
assert.equal(withoutPrefix("/"), "/");
});
-test("getURL with empty paths", (assert) => {
+test("getURL with empty paths", function (assert) {
setupURL(null, "https://example.com", "/");
assert.equal(getURL("/"), "/");
assert.equal(getURL(""), "");
@@ -53,7 +53,7 @@ test("getURL with empty paths", (assert) => {
assert.equal(getURL(""), "");
});
-test("getURL on subfolder install", (assert) => {
+test("getURL on subfolder install", function (assert) {
setupURL(null, "", "/forum");
assert.equal(getURL("/"), "/forum/", "root url has subfolder");
assert.equal(
@@ -81,7 +81,7 @@ test("getURL on subfolder install", (assert) => {
);
});
-test("getURLWithCDN on subfolder install with S3", (assert) => {
+test("getURLWithCDN on subfolder install with S3", function (assert) {
setupURL(null, "", "/forum");
setupS3CDN(
"//test.s3-us-west-1.amazonaws.com/site",
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js b/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js
index 34958ade38c..e89b10ffeb4 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/highlight-search-test.js
@@ -4,7 +4,7 @@ import { module, test } from "qunit";
module("lib:highlight-search");
-test("highlighting text", (assert) => {
+test("highlighting text", function (assert) {
fixture().html(
`
This is some text to highlight
@@ -26,7 +26,7 @@ test("highlighting text", (assert) => {
);
});
-test("highlighting unicode text", (assert) => {
+test("highlighting unicode text", function (assert) {
fixture().html(
`
This is some தமிழ் & русский text to highlight
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 7b713bb2e5d..55dd4c5834e 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/i18n-test.js
@@ -99,12 +99,12 @@ module("lib:i18n", {
},
});
-test("defaults", (assert) => {
+test("defaults", function (assert) {
assert.equal(I18n.defaultLocale, "en", "it has English as default locale");
assert.ok(I18n.pluralizationRules["en"], "it has English pluralizer");
});
-test("translations", (assert) => {
+test("translations", function (assert) {
assert.equal(
I18n.t("topic.reply.title"),
"Répondre",
@@ -123,7 +123,7 @@ test("translations", (assert) => {
assert.equal(I18n.t("hello.universe"), "", "allows empty strings");
});
-test("extra translations", (assert) => {
+test("extra translations", function (assert) {
I18n.locale = "pl_PL";
I18n.extras = {
en: {
@@ -195,7 +195,7 @@ test("extra translations", (assert) => {
);
});
-test("pluralizations", (assert) => {
+test("pluralizations", function (assert) {
assert.equal(I18n.t("character_count", { count: 0 }), "0 ZERO");
assert.equal(I18n.t("character_count", { count: 1 }), "1 ONE");
assert.equal(I18n.t("character_count", { count: 2 }), "2 TWO");
@@ -211,7 +211,7 @@ test("pluralizations", (assert) => {
assert.equal(I18n.t("word_count", { count: 100 }), "100 words");
});
-test("fallback", (assert) => {
+test("fallback", function (assert) {
assert.equal(
I18n.t("days", { count: 1 }),
"1 day",
@@ -243,7 +243,7 @@ test("fallback", (assert) => {
);
});
-test("Dollar signs are properly escaped", (assert) => {
+test("Dollar signs are properly escaped", function (assert) {
assert.equal(
I18n.t("dollar_sign", {
description: "$& $&",
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js b/app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js
index 209dfcea2a0..a1859efaa89 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/icon-library-test.js
@@ -7,7 +7,7 @@ import {
module("lib:icon-library");
-test("return icon markup", (assert) => {
+test("return icon markup", function (assert) {
assert.ok(iconHTML("bars").indexOf('use xlink:href="#bars"') > -1);
const nodeIcon = iconNode("bars");
@@ -18,7 +18,7 @@ test("return icon markup", (assert) => {
);
});
-test("convert icon names", (assert) => {
+test("convert icon names", function (assert) {
const fa5Icon = convertIconClass("fab fa-facebook");
assert.ok(iconHTML(fa5Icon).indexOf("fab-facebook") > -1, "FA 5 syntax");
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js b/app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js
index 5af532ef573..8f99a3ba769 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/key-value-store-test.js
@@ -3,13 +3,13 @@ import KeyValueStore from "discourse/lib/key-value-store";
module("lib:key-value-store");
-test("it's able to get the result back from the store", (assert) => {
+test("it's able to get the result back from the store", function (assert) {
const store = new KeyValueStore("_test");
store.set({ key: "bob", value: "uncle" });
assert.equal(store.get("bob"), "uncle");
});
-test("is able to nuke the store", (assert) => {
+test("is able to nuke the store", function (assert) {
const store = new KeyValueStore("_test");
store.set({ key: "bob1", value: "uncle" });
store.abandonLocal();
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js b/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js
index 507714524d1..3f12fc2d904 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/link-mentions-test.js
@@ -8,7 +8,7 @@ import pretender from "discourse/tests/helpers/create-pretender";
module("lib:link-mentions");
-test("linkSeenMentions replaces users and groups", async (assert) => {
+test("linkSeenMentions replaces users and groups", async function (assert) {
pretender.get("/u/is_local_username", () => [
200,
{ "Content-Type": "application/json" },
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js b/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js
index 03a3533f469..cd55ee7cba3 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/load-script-test.js
@@ -5,7 +5,7 @@ import { PUBLIC_JS_VERSIONS as jsVersions } from "discourse/lib/public-js-versio
module("lib:load-script");
-skip("load with a script tag, and callbacks are only executed after script is loaded", async (assert) => {
+skip("load with a script tag, and callbacks are only executed after script is loaded", async function (assert) {
assert.ok(
typeof window.ace === "undefined",
"ensures ace is not previously loaded"
@@ -20,7 +20,7 @@ skip("load with a script tag, and callbacks are only executed after script is lo
);
});
-test("works when a value is not present", (assert) => {
+test("works when a value is not present", function (assert) {
assert.equal(
cacheBuster("/javascripts/my-script.js"),
"/javascripts/my-script.js"
@@ -31,7 +31,7 @@ test("works when a value is not present", (assert) => {
);
});
-test("generates URLs with version number in the query params", (assert) => {
+test("generates URLs with version number in the query params", function (assert) {
assert.equal(
cacheBuster("/javascripts/pikaday.js"),
`/javascripts/${jsVersions["pikaday.js"]}`
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js b/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js
index 06ad0f599a2..57fa4cc023d 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/oneboxer-test.js
@@ -17,7 +17,7 @@ function loadOnebox(element) {
module("lib:oneboxer");
-test("load - failed onebox", async (assert) => {
+test("load - failed onebox", async function (assert) {
let element = document.createElement("A");
element.setAttribute("href", "http://somebadurl.com");
@@ -35,7 +35,7 @@ test("load - failed onebox", async (assert) => {
);
});
-test("load - successful onebox", async (assert) => {
+test("load - successful onebox", async function (assert) {
const html = `
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js b/app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js
index d72839a1700..6d7628caac6 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/preload-store-test.js
@@ -8,7 +8,7 @@ module("preload-store", {
},
});
-test("get", (assert) => {
+test("get", function (assert) {
assert.blank(PreloadStore.get("joker"), "returns blank for a missing key");
assert.equal(
PreloadStore.get("bane"),
@@ -17,30 +17,30 @@ test("get", (assert) => {
);
});
-test("remove", (assert) => {
+test("remove", function (assert) {
PreloadStore.remove("bane");
assert.blank(PreloadStore.get("bane"), "removes the value if the key exists");
});
-test("getAndRemove returns a promise that resolves to null", async (assert) => {
+test("getAndRemove returns a promise that resolves to null", async function (assert) {
assert.blank(await PreloadStore.getAndRemove("joker"));
});
-test("getAndRemove returns a promise that resolves to the result of the finder", async (assert) => {
+test("getAndRemove returns a promise that resolves to the result of the finder", async function (assert) {
const finder = () => "batdance";
const result = await PreloadStore.getAndRemove("joker", finder);
assert.equal(result, "batdance");
});
-test("getAndRemove returns a promise that resolves to the result of the finder's promise", async (assert) => {
+test("getAndRemove returns a promise that resolves to the result of the finder's promise", async function (assert) {
const finder = () => Promise.resolve("hahahah");
const result = await PreloadStore.getAndRemove("joker", finder);
assert.equal(result, "hahahah");
});
-test("returns a promise that rejects with the result of the finder's rejected promise", async (assert) => {
+test("returns a promise that rejects with the result of the finder's rejected promise", async function (assert) {
const finder = () => Promise.reject("error");
await PreloadStore.getAndRemove("joker", finder).catch((result) => {
@@ -48,7 +48,7 @@ test("returns a promise that rejects with the result of the finder's rejected pr
});
});
-test("returns a promise that resolves to 'evil'", async (assert) => {
+test("returns a promise that resolves to 'evil'", async function (assert) {
const result = await PreloadStore.getAndRemove("bane");
assert.equal(result, "evil");
});
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js
index 62636c6565e..90362180f58 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js
@@ -56,7 +56,7 @@ QUnit.assert.cookedPara = function (input, expected, message) {
QUnit.assert.cooked(input, `${expected}
`, message);
};
-skip("Pending Engine fixes and spec fixes", (assert) => {
+skip("Pending Engine fixes and spec fixes", function (assert) {
assert.cooked(
"Derpy: http://derp.com?_test_=1",
'Derpy: http://derp.com?_test_=1
',
@@ -70,7 +70,7 @@ skip("Pending Engine fixes and spec fixes", (assert) => {
);
});
-test("buildOptions", (assert) => {
+test("buildOptions", function (assert) {
assert.ok(
buildOptions({ siteSettings: { enable_emoji: true } }).discourse.features
.emoji,
@@ -83,7 +83,7 @@ test("buildOptions", (assert) => {
);
});
-test("basic cooking", (assert) => {
+test("basic cooking", function (assert) {
assert.cooked("hello", "hello
", "surrounds text with paragraphs");
assert.cooked("**evil**", "evil
", "it bolds text.");
assert.cooked("__bold__", "bold
", "it bolds text.");
@@ -121,7 +121,7 @@ test("basic cooking", (assert) => {
);
});
-test("Nested bold and italics", (assert) => {
+test("Nested bold and italics", function (assert) {
assert.cooked(
"*this is italic **with some bold** inside*",
"this is italic with some bold inside
",
@@ -129,7 +129,7 @@ test("Nested bold and italics", (assert) => {
);
});
-test("Traditional Line Breaks", (assert) => {
+test("Traditional Line Breaks", function (assert) {
const input = "1\n2\n3";
assert.cooked(
input,
@@ -143,14 +143,14 @@ test("Traditional Line Breaks", (assert) => {
);
});
-test("Unbalanced underscores", (assert) => {
+test("Unbalanced underscores", function (assert) {
assert.cooked(
"[evil_trout][1] hello_\n\n[1]: http://eviltrout.com",
'evil_trout hello_
'
);
});
-test("Line Breaks", (assert) => {
+test("Line Breaks", function (assert) {
assert.cooked(
"[] first choice\n[] second choice",
"[] first choice \n[] second choice
",
@@ -174,7 +174,7 @@ test("Line Breaks", (assert) => {
);
});
-test("Paragraphs for HTML", (assert) => {
+test("Paragraphs for HTML", function (assert) {
assert.cooked(
"hello world
",
"hello world
",
@@ -197,7 +197,7 @@ test("Paragraphs for HTML", (assert) => {
);
});
-test("Links", (assert) => {
+test("Links", function (assert) {
assert.cooked(
"EvilTrout: http://eviltrout.com",
'EvilTrout: http://eviltrout.com
',
@@ -346,7 +346,7 @@ test("Links", (assert) => {
);
});
-test("simple quotes", (assert) => {
+test("simple quotes", function (assert) {
assert.cooked(
"> nice!",
"\nnice!
\n ",
@@ -395,7 +395,7 @@ eviltrout
);
});
-test("Quotes", (assert) => {
+test("Quotes", function (assert) {
assert.cookedOptions(
'[quote="eviltrout, post: 1"]\na quote\n\nsecond line\n\nthird line\n[/quote]',
{ topicId: 2 },
@@ -456,7 +456,7 @@ test("Quotes", (assert) => {
);
});
-test("Mentions", (assert) => {
+test("Mentions", function (assert) {
assert.cooked(
"Hello @sam",
'Hello @sam
',
@@ -597,7 +597,7 @@ test("Mentions", (assert) => {
);
});
-test("Mentions - Unicode usernames enabled", (assert) => {
+test("Mentions - Unicode usernames enabled", function (assert) {
assert.cookedOptions(
"Hello @狮子",
{ siteSettings: { unicode_usernames: true } },
@@ -620,7 +620,7 @@ test("Mentions - Unicode usernames enabled", (assert) => {
);
});
-test("Mentions - disabled", (assert) => {
+test("Mentions - disabled", function (assert) {
assert.cookedOptions(
"@eviltrout",
{ siteSettings: { enable_mentions: false } },
@@ -628,7 +628,7 @@ test("Mentions - disabled", (assert) => {
);
});
-test("Category hashtags", (assert) => {
+test("Category hashtags", function (assert) {
const alwaysTrue = {
categoryHashtagLookup: function () {
return ["http://test.discourse.org/category-hashtag", "category-hashtag"];
@@ -692,7 +692,7 @@ test("Category hashtags", (assert) => {
);
});
-test("Heading", (assert) => {
+test("Heading", function (assert) {
assert.cooked(
"**Bold**\n----------",
"Bold ",
@@ -700,7 +700,7 @@ test("Heading", (assert) => {
);
});
-test("bold and italics", (assert) => {
+test("bold and italics", function (assert) {
assert.cooked(
'a "**hello**"',
"a "hello "
",
@@ -738,7 +738,7 @@ test("bold and italics", (assert) => {
);
});
-test("Escaping", (assert) => {
+test("Escaping", function (assert) {
assert.cooked(
"*\\*laughs\\**",
"*laughs*
",
@@ -751,7 +751,7 @@ test("Escaping", (assert) => {
);
});
-test("New Lines", (assert) => {
+test("New Lines", function (assert) {
// historically we would not continue inline em or b across lines,
// however commonmark gives us no switch to do so and we would be very non compliant.
// turning softbreaks into a newline is just a renderer option, not a parser switch.
@@ -767,7 +767,7 @@ test("New Lines", (assert) => {
);
});
-test("Oneboxing", (assert) => {
+test("Oneboxing", function (assert) {
function matches(input, regexp) {
return new PrettyText(defaultOpts).cook(input).match(regexp);
}
@@ -813,7 +813,7 @@ test("Oneboxing", (assert) => {
);
});
-test("links with full urls", (assert) => {
+test("links with full urls", function (assert) {
assert.cooked(
"[http://eviltrout.com][1] is a url\n\n[1]: http://eviltrout.com",
'http://eviltrout.com is a url
',
@@ -821,7 +821,7 @@ test("links with full urls", (assert) => {
);
});
-test("Code Blocks", (assert) => {
+test("Code Blocks", function (assert) {
assert.cooked(
"\nhello\n \n",
"\nhello\n ",
@@ -943,7 +943,7 @@ test("Code Blocks", (assert) => {
);
});
-test("URLs in BBCode tags", (assert) => {
+test("URLs in BBCode tags", function (assert) {
assert.cooked(
"[img]http://eviltrout.com/eviltrout.png[/img][img]http://samsaffron.com/samsaffron.png[/img]",
'
',
@@ -963,7 +963,7 @@ test("URLs in BBCode tags", (assert) => {
);
});
-test("images", (assert) => {
+test("images", function (assert) {
assert.cooked(
"[](http://folksy.com/)",
'
',
@@ -977,7 +977,7 @@ test("images", (assert) => {
);
});
-test("attachment", (assert) => {
+test("attachment", function (assert) {
assert.cooked(
"[test.pdf|attachment](upload://o8iobpLcW3WSFvVH7YQmyGlKmGM.pdf)",
`test.pdf
`,
@@ -985,7 +985,7 @@ test("attachment", (assert) => {
);
});
-test("attachment - mapped url - secure media disabled", (assert) => {
+test("attachment - mapped url - secure media disabled", function (assert) {
function lookupUploadUrls() {
let cache = {};
cache["upload://o8iobpLcW3WSFvVH7YQmyGlKmGM.pdf"] = {
@@ -1007,7 +1007,7 @@ test("attachment - mapped url - secure media disabled", (assert) => {
);
});
-test("attachment - mapped url - secure media enabled", (assert) => {
+test("attachment - mapped url - secure media enabled", function (assert) {
function lookupUploadUrls() {
let cache = {};
cache["upload://o8iobpLcW3WSFvVH7YQmyGlKmGM.pdf"] = {
@@ -1029,7 +1029,7 @@ test("attachment - mapped url - secure media enabled", (assert) => {
);
});
-test("video", (assert) => {
+test("video", function (assert) {
assert.cooked(
"",
`
@@ -1042,7 +1042,7 @@ test("video", (assert) => {
);
});
-test("video - mapped url - secure media enabled", (assert) => {
+test("video - mapped url - secure media enabled", function (assert) {
function lookupUploadUrls() {
let cache = {};
cache["upload://eyPnj7UzkU0AkGkx2dx8G4YM1Jx.mp4"] = {
@@ -1068,7 +1068,7 @@ test("video - mapped url - secure media enabled", (assert) => {
);
});
-test("audio", (assert) => {
+test("audio", function (assert) {
assert.cooked(
"",
`
@@ -1079,7 +1079,7 @@ test("audio", (assert) => {
);
});
-test("audio - mapped url - secure media enabled", (assert) => {
+test("audio - mapped url - secure media enabled", function (assert) {
function lookupUploadUrls() {
let cache = {};
cache["upload://eyPnj7UzkU0AkGkx2dx8G4YM1Jx.mp3"] = {
@@ -1103,7 +1103,7 @@ test("audio - mapped url - secure media enabled", (assert) => {
);
});
-test("censoring", (assert) => {
+test("censoring", function (assert) {
assert.cookedOptions(
"Pleased to meet you, but pleeeease call me later, xyz123",
{
@@ -1115,7 +1115,7 @@ test("censoring", (assert) => {
// More tests in pretty_text_spec.rb
});
-test("code blocks/spans hoisting", (assert) => {
+test("code blocks/spans hoisting", function (assert) {
assert.cooked(
"```\n\n some code\n```",
'\n some code\n
',
@@ -1129,7 +1129,7 @@ test("code blocks/spans hoisting", (assert) => {
);
});
-test("basic bbcode", (assert) => {
+test("basic bbcode", function (assert) {
assert.cookedPara(
"[b]strong[/b]",
'strong ',
@@ -1177,7 +1177,7 @@ test("basic bbcode", (assert) => {
);
});
-test("urls", (assert) => {
+test("urls", function (assert) {
assert.cookedPara(
"[url]not a url[/url]",
"not a url",
@@ -1204,7 +1204,7 @@ test("urls", (assert) => {
"supports [url] with an embedded [img]"
);
});
-test("invalid bbcode", (assert) => {
+test("invalid bbcode", function (assert) {
assert.cooked(
"[code]I am not closed\n\nThis text exists.",
"[code]I am not closed
\nThis text exists.
",
@@ -1212,7 +1212,7 @@ test("invalid bbcode", (assert) => {
);
});
-test("code", (assert) => {
+test("code", function (assert) {
assert.cooked(
"[code]\nx++\n[/code]",
'x++
',
@@ -1235,7 +1235,7 @@ test("code", (assert) => {
);
});
-test("tags with arguments", (assert) => {
+test("tags with arguments", function (assert) {
assert.cookedPara(
"[url=http://bettercallsaul.com]better call![/url]",
'better call! ',
@@ -1258,7 +1258,7 @@ test("tags with arguments", (assert) => {
);
});
-test("quotes", (assert) => {
+test("quotes", function (assert) {
const post = Post.create({
cooked: "lorem ipsum
",
username: "eviltrout",
@@ -1318,7 +1318,7 @@ test("quotes", (assert) => {
);
});
-test("quoting a quote", (assert) => {
+test("quoting a quote", function (assert) {
const post = Post.create({
cooked: new PrettyText(defaultOpts).cook(
'[quote="sam, post:1, topic:1, full:true"]\nhello\n[/quote]\n*Test*'
@@ -1340,7 +1340,7 @@ test("quoting a quote", (assert) => {
);
});
-test("quote formatting", (assert) => {
+test("quote formatting", function (assert) {
assert.cooked(
'[quote="EvilTrout, post:123, topic:456, full:true"]\n[sam]\n[/quote]',
`
@@ -1443,7 +1443,7 @@ var bar = 'bar';
);
});
-test("quotes with trailing formatting", (assert) => {
+test("quotes with trailing formatting", function (assert) {
const result = new PrettyText(defaultOpts).cook(
'[quote="EvilTrout, post:123, topic:456, full:true"]\nhello\n[/quote]\n*Test*'
);
@@ -1462,7 +1462,7 @@ test("quotes with trailing formatting", (assert) => {
);
});
-test("enable/disable features", (assert) => {
+test("enable/disable features", function (assert) {
assert.cookedOptions("|a|\n--\n|a|", { features: { table: false } }, "");
assert.cooked(
"|a|\n--\n|a|",
@@ -1483,7 +1483,7 @@ test("enable/disable features", (assert) => {
);
});
-test("emoji", (assert) => {
+test("emoji", function (assert) {
assert.cooked(
":smile:",
`
`
@@ -1498,7 +1498,7 @@ test("emoji", (assert) => {
);
});
-test("emoji - enable_inline_emoji_translation", (assert) => {
+test("emoji - enable_inline_emoji_translation", function (assert) {
assert.cookedOptions(
"test:smile:test",
{ siteSettings: { enable_inline_emoji_translation: false } },
@@ -1512,7 +1512,7 @@ test("emoji - enable_inline_emoji_translation", (assert) => {
);
});
-test("emoji - emojiSet", (assert) => {
+test("emoji - emojiSet", function (assert) {
assert.cookedOptions(
":smile:",
{ siteSettings: { emoji_set: "twitter" } },
@@ -1520,7 +1520,7 @@ test("emoji - emojiSet", (assert) => {
);
});
-test("emoji - registerEmoji", (assert) => {
+test("emoji - registerEmoji", function (assert) {
registerEmoji("foo", "/images/d-logo-sketch.png");
assert.cookedOptions(
@@ -1538,7 +1538,7 @@ test("emoji - registerEmoji", (assert) => {
);
});
-test("extractDataAttribute", (assert) => {
+test("extractDataAttribute", function (assert) {
assert.deepEqual(extractDataAttribute("foo="), ["data-foo", ""]);
assert.deepEqual(extractDataAttribute("foo=bar"), ["data-foo", "bar"]);
@@ -1546,7 +1546,7 @@ test("extractDataAttribute", (assert) => {
assert.notOk(extractDataAttribute("https://discourse.org/?q=hello"));
});
-test("video - display placeholder when previewing", (assert) => {
+test("video - display placeholder when previewing", function (assert) {
assert.cookedOptions(
``,
{ previewing: true },
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js b/app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js
index 564f7c599f0..266f6827897 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/sanitizer-test.js
@@ -4,7 +4,7 @@ import { hrefAllowed } from "pretty-text/sanitizer";
module("lib:sanitizer");
-test("sanitize", (assert) => {
+test("sanitize", function (assert) {
const pt = new PrettyText(
buildOptions({
siteSettings: {
@@ -131,7 +131,7 @@ test("sanitize", (assert) => {
cooked(`RTL text
`, `RTL text
`);
});
-test("ids on headings", (assert) => {
+test("ids on headings", function (assert) {
const pt = new PrettyText(buildOptions({ siteSettings: {} }));
assert.equal(pt.sanitize("Test Heading "), "Test Heading ");
assert.equal(
@@ -160,7 +160,7 @@ test("ids on headings", (assert) => {
);
});
-test("poorly formed ids on headings", (assert) => {
+test("poorly formed ids on headings", function (assert) {
let pt = new PrettyText(buildOptions({ siteSettings: {} }));
assert.equal(
pt.sanitize(`Test Heading `),
@@ -188,7 +188,7 @@ test("poorly formed ids on headings", (assert) => {
);
});
-test("urlAllowed", (assert) => {
+test("urlAllowed", function (assert) {
const allowed = (url, msg) => assert.equal(hrefAllowed(url), url, msg);
allowed("/foo/bar.html", "allows relative urls");
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/screen-track-test.js b/app/assets/javascripts/discourse/tests/unit/lib/screen-track-test.js
index 178bca44681..e4bcf2e4d51 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/screen-track-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/screen-track-test.js
@@ -3,7 +3,7 @@ import ScreenTrack from "discourse/lib/screen-track";
module("lib:screen-track");
-test("consolidateTimings", (assert) => {
+test("consolidateTimings", function (assert) {
const tracker = new ScreenTrack();
tracker.consolidateTimings({ 1: 10, 2: 5 }, 10, 1);
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/search-test.js b/app/assets/javascripts/discourse/tests/unit/lib/search-test.js
index b0e1e114389..0fbbef112a5 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/search-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/search-test.js
@@ -7,7 +7,7 @@ import {
module("lib:search");
-test("unescapesEmojisInBlurbs", (assert) => {
+test("unescapesEmojisInBlurbs", function (assert) {
const source = {
posts: [
{
@@ -37,7 +37,7 @@ test("unescapesEmojisInBlurbs", (assert) => {
assert.ok(blurb.indexOf(":thinking:") === -1);
});
-test("searchContextDescription", (assert) => {
+test("searchContextDescription", function (assert) {
assert.equal(
searchContextDescription("topic"),
I18n.t("search.context.topic")
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js b/app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js
index a369ae881d8..334bc6bf285 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/sharing-test.js
@@ -10,7 +10,7 @@ module("lib:sharing", {
},
});
-test("addSource", (assert) => {
+test("addSource", function (assert) {
const sharingSettings = "facebook|twitter";
assert.blank(Sharing.activeSources(sharingSettings));
@@ -22,7 +22,7 @@ test("addSource", (assert) => {
assert.equal(Sharing.activeSources(sharingSettings).length, 1);
});
-test("addSharingId", (assert) => {
+test("addSharingId", function (assert) {
const sharingSettings = "";
assert.blank(Sharing.activeSources(sharingSettings));
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js b/app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js
index ae41277ecce..ab1c6a06710 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/text-direction-test.js
@@ -3,7 +3,7 @@ import { isRTL, isLTR } from "discourse/lib/text-direction";
module("lib:text-direction");
-test("isRTL", (assert) => {
+test("isRTL", function (assert) {
// Hebrew
assert.equal(isRTL("זה מבחן"), true);
@@ -17,7 +17,7 @@ test("isRTL", (assert) => {
assert.equal(isRTL(""), false);
});
-test("isLTR", (assert) => {
+test("isLTR", function (assert) {
assert.equal(isLTR("This is a test"), true);
assert.equal(isLTR("זה מבחן"), false);
});
diff --git a/app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js b/app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js
index 73b6e8ca22e..e0e238d3141 100644
--- a/app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js
+++ b/app/assets/javascripts/discourse/tests/unit/lib/to-markdown-test.js
@@ -3,7 +3,7 @@ import toMarkdown from "discourse/lib/to-markdown";
module("lib:to-markdown");
-test("converts styles between normal words", (assert) => {
+test("converts styles between normal words", function (assert) {
const html = `Line with styles between words.`;
const markdown = `Line with ~~styles~~ ***between*** words.`;
assert.equal(toMarkdown(html), markdown);
@@ -12,7 +12,7 @@ test("converts styles between normal words", (assert) => {
assert.equal(toMarkdown("A bold , word"), "A **bold**, word");
});
-test("converts inline nested styles", (assert) => {
+test("converts inline nested styles", function (assert) {
let html = `Italicised line with some random bold words. `;
let markdown = `*Italicised line with **some random** **bold** words.*`;
assert.equal(toMarkdown(html), markdown);
@@ -24,7 +24,7 @@ test("converts inline nested styles", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts a link", (assert) => {
+test("converts a link", function (assert) {
let html = `Discourse `;
let markdown = `[Discourse](https://discourse.org)`;
assert.equal(toMarkdown(html), markdown);
@@ -34,7 +34,7 @@ test("converts a link", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("put raw URL instead of converting the link", (assert) => {
+test("put raw URL instead of converting the link", function (assert) {
let url = "https://discourse.org";
const html = () => `${url} `;
@@ -44,11 +44,11 @@ test("put raw URL instead of converting the link", (assert) => {
assert.equal(toMarkdown(html()), url);
});
-test("skip empty link", (assert) => {
+test("skip empty link", function (assert) {
assert.equal(toMarkdown(` `), "");
});
-test("converts heading tags", (assert) => {
+test("converts heading tags", function (assert) {
const html = `
Heading 1
Heading 2
@@ -71,7 +71,7 @@ test("converts heading tags", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts ul list tag", (assert) => {
+test("converts ul list tag", function (assert) {
let html = `
Item 1
@@ -103,7 +103,7 @@ test("converts ul list tag", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("stripes unwanted inline tags", (assert) => {
+test("stripes unwanted inline tags", function (assert) {
const html = `
Lorem ipsum dolor sit amet, consectetur elit.
Ut minim veniam, quis nostrud laboris ut aliquip ex ea commodo.
@@ -112,7 +112,7 @@ test("stripes unwanted inline tags", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts table tags", (assert) => {
+test("converts table tags", function (assert) {
let html = ` Discourse Avenue laboris
Heading 1 Head 2
@@ -134,7 +134,7 @@ test("converts table tags", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("replace pipes with spaces if table format not supported", (assert) => {
+test("replace pipes with spaces if table format not supported", function (assert) {
let html = `
Headi ng 1 Head 2
@@ -160,7 +160,7 @@ test("replace pipes with spaces if table format not supported", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts img tag", (assert) => {
+test("converts img tag", function (assert) {
const url = "https://example.com/image.png";
const base62SHA1 = "q16M6GR110R47Z9p9Dk3PMXOJoE";
let html = ` `;
@@ -197,7 +197,7 @@ test("converts img tag", (assert) => {
assert.equal(toMarkdown(html), ``);
});
-test("supporting html tags by keeping them", (assert) => {
+test("supporting html tags by keeping them", function (assert) {
let html =
"Lorem ipsum dolor sit amet, consectetur ";
let output = html;
@@ -221,7 +221,7 @@ test("supporting html tags by keeping them", (assert) => {
assert.equal(toMarkdown(html), output);
});
-test("converts code tags", (assert) => {
+test("converts code tags", function (assert) {
let html = `Lorem ipsum dolor sit amet,
var helloWorld = () => {
alert(' hello \t\t world ');
@@ -243,7 +243,7 @@ helloWorld();
consectetur.`;
assert.equal(toMarkdown(html), output);
});
-test("converts blockquote tag", (assert) => {
+test("converts blockquote tag", function (assert) {
let html = "Lorem ipsum ";
let output = "> Lorem ipsum";
assert.equal(toMarkdown(html), output);
@@ -259,7 +259,7 @@ test("converts blockquote tag", (assert) => {
assert.equal(toMarkdown(html), output);
});
-test("converts ol list tag", (assert) => {
+test("converts ol list tag", function (assert) {
const html = `Testing
Item 1
@@ -277,7 +277,7 @@ test("converts ol list tag", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts list tag from word", (assert) => {
+test("converts list tag from word", function (assert) {
const html = `Sample
@@ -324,7 +324,7 @@ test("converts list tag from word", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("keeps mention/hash class", (assert) => {
+test("keeps mention/hash class", function (assert) {
const html = `
User mention: @discourse
Group mention: @discourse-group
@@ -337,7 +337,7 @@ test("keeps mention/hash class", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("keeps emoji and removes click count", (assert) => {
+test("keeps emoji and removes click count", function (assert) {
const html = `
A link 1 with click count
@@ -350,7 +350,7 @@ test("keeps emoji and removes click count", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("keeps emoji syntax for custom emoji", (assert) => {
+test("keeps emoji syntax for custom emoji", function (assert) {
const html = `
@@ -362,7 +362,7 @@ test("keeps emoji syntax for custom emoji", (assert) => {
assert.equal(toMarkdown(html), markdown);
});
-test("converts image lightboxes to markdown", (assert) => {
+test("converts image lightboxes to markdown", function (assert) {
let html = `