Skip to content

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

DEV: Individual test stability fixes (#38829)

Jarek Radoszfe33ea85d2b7
diff --git a/frontend/discourse/tests/acceptance/admin-penalize-user-test.js b/frontend/discourse/tests/acceptance/admin-penalize-user-test.js
index 6f01cf23e6f..3b4f5c6d3be 100644
--- a/frontend/discourse/tests/acceptance/admin-penalize-user-test.js
+++ b/frontend/discourse/tests/acceptance/admin-penalize-user-test.js
@@ -68,8 +68,6 @@ acceptance("Admin - Suspend User", function (needs) {
test("suspend, then unsuspend a user", async function (assert) {
const suspendUntilCombobox = selectKit(".suspend-until .combobox");
- await visit("/admin/flags/active");
-
await visit("/admin/users/1234/regular");
assert.dom(".suspension-info").doesNotExist();
diff --git a/frontend/discourse/tests/acceptance/composer-actions-test.js b/frontend/discourse/tests/acceptance/composer-actions-test.js
index 9d9e31fcac8..e405b433dab 100644
--- a/frontend/discourse/tests/acceptance/composer-actions-test.js
+++ b/frontend/discourse/tests/acceptance/composer-actions-test.js
@@ -1,4 +1,4 @@
-import { click, fillIn, visit } from "@ember/test-helpers";
+import { click, fillIn, visit, waitFor } from "@ember/test-helpers";
import { test } from "qunit";
import sinon from "sinon";
import { cloneJSON } from "discourse/lib/object";
@@ -396,6 +396,7 @@ acceptance(`Composer Actions With New Topic Draft`, function (needs) {
await visit("/");
await click("button.topic-drafts-menu-trigger");
+ await waitFor(".topic-drafts-menu-content");
await click(
".topic-drafts-menu-content .topic-drafts-item:first-child button"
);
diff --git a/frontend/discourse/tests/unit/utils/optional-service-test.gjs b/frontend/discourse/tests/unit/utils/optional-service-test.gjs
index f9fc869a0bd..6130b76a177 100644
--- a/frontend/discourse/tests/unit/utils/optional-service-test.gjs
+++ b/frontend/discourse/tests/unit/utils/optional-service-test.gjs
@@ -43,21 +43,12 @@ module("Unit | Utils | optional-service", function (hooks) {
});
test("optionalService works in EmberObject classes", async function (assert) {
- this.registry.register(
- "component:ember-object-component",
- EmberObjectComponent
- );
-
await render(<template><EmberObjectComponent /></template>);
-
assert.dom(".ember-object-component").hasText("foo bar");
});
test("optionalService works in native classes", async function (assert) {
- this.registry.register("component:native-component", NativeComponent);
-
await render(<template><NativeComponent /></template>);
-
assert.dom(".native-component").hasText("foo bar");
});
});