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 e2d6b667024..37cb1c8797d 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 @@ -58,9 +58,8 @@ acceptance("Admin - Watched Words", function (needs) { test("add words", async function (assert) { await visit("/admin/customize/watched_words/action/block"); - click(".show-words-checkbox"); - fillIn(".watched-word-form input", "poutine"); - + await click(".show-words-checkbox"); + await fillIn(".watched-word-form input", "poutine"); await click(".watched-word-form button"); let found = []; @@ -74,21 +73,20 @@ acceptance("Admin - Watched Words", function (needs) { assert.strictEqual(count(".watched-words-list .case-sensitive"), 0); }); - test("add case-sensitve words", async function (assert) { + test("add case-sensitive words", async function (assert) { await visit("/admin/customize/watched_words/action/block"); - click(".show-words-checkbox"); - fillIn(".watched-word-form input", "Discourse"); - click(".case-sensitivity-checkbox"); - + await click(".show-words-checkbox"); + await fillIn(".watched-word-form input", "Discourse"); + await click(".case-sensitivity-checkbox"); await click(".watched-word-form button"); assert .dom(".watched-words-list .watched-word") .hasText(`Discourse ${I18n.t("admin.watched_words.case_sensitive")}`); - fillIn(".watched-word-form input", "discourse"); - click(".case-sensitivity-checkbox"); + await fillIn(".watched-word-form input", "discourse"); + await click(".case-sensitivity-checkbox"); await click(".watched-word-form button"); assert