From 7b9e6bb3038b4b0b13865be708cf891fd16fc9a6 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 4 Jul 2022 02:25:35 +0200 Subject: [PATCH] DEV: Fix a flaky submodule/auth test (#17313) --- .../discourse/tests/unit/controllers/create-account-test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js index 7d49a9c7f9d..83a1ccd86e0 100644 --- a/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/create-account-test.js @@ -1,6 +1,7 @@ import I18n from "I18n"; import { discourseModule } from "discourse/tests/helpers/qunit-helpers"; import { test } from "qunit"; +import { settled } from "@ember/test-helpers"; discourseModule("Unit | Controller | create-account", function () { test("basicUsernameValidation", function (assert) { @@ -38,7 +39,7 @@ discourseModule("Unit | Controller | create-account", function () { ); }); - test("passwordValidation", function (assert) { + test("passwordValidation", async function (assert) { const controller = this.getController("create-account"); controller.set("authProvider", ""); @@ -80,6 +81,9 @@ discourseModule("Unit | Controller | create-account", function () { "pork@chops.com", I18n.t("user.password.same_as_email") ); + + // Wait for username check request to finish + await settled(); }); test("authProviderDisplayName", function (assert) {