DEV: Fix `ember/no-settled-after-test-helper` (#24008)

This commit is contained in:
Jarek Radosz 2023-10-19 13:47:28 +02:00 committed by GitHub
parent b45720b158
commit ac30673b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 16 deletions

View File

@ -1,10 +1,4 @@
import {
click,
fillIn,
settled,
triggerKeyEvent,
visit,
} from "@ember/test-helpers";
import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers";
import { test } from "qunit";
import searchFixtures from "discourse/tests/fixtures/search-fixtures";
import {
@ -497,7 +491,6 @@ acceptance("Search - Authenticated", function (needs) {
"href"
);
await triggerKeyEvent(".search-menu", "keydown", "A");
await settled();
assert.strictEqual(
query("#reply-control textarea").value,

View File

@ -1,4 +1,4 @@
import { click, settled, visit, waitFor } from "@ember/test-helpers";
import { click, visit, waitFor } from "@ember/test-helpers";
import $ from "jquery";
import { test } from "qunit";
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
@ -12,7 +12,6 @@ acceptance("Sidebar - Narrow Desktop", function (needs) {
test("wide sidebar is changed to cloak when resize to narrow screen", async function (assert) {
await visit("/");
await settled();
assert.ok(exists("#d-sidebar"), "wide sidebar is displayed");
await click(".header-sidebar-toggle .btn");
@ -53,7 +52,6 @@ acceptance("Sidebar - Narrow Desktop", function (needs) {
test("transition from narrow screen to wide screen", async function (assert) {
await visit("/");
await settled();
const bodyElement = document.querySelector("body");
bodyElement.style.width = "767px";

View File

@ -609,7 +609,6 @@ export async function emulateAutocomplete(inputSelector, text) {
await triggerKeyEvent(inputSelector, "keydown", "Backspace");
await fillIn(inputSelector, text);
await triggerKeyEvent(inputSelector, "keyup", "Backspace");
await settled();
}
// The order of attributes can vary in different browsers. When comparing

View File

@ -1,4 +1,4 @@
import { click, render, settled } from "@ember/test-helpers";
import { click, render } from "@ember/test-helpers";
import { hbs } from "ember-cli-htmlbars";
import { module, test } from "qunit";
import { setupLightboxes } from "discourse/lib/lightbox";
@ -34,8 +34,6 @@ module("Integration | Component | d-lightbox", function (hooks) {
);
await click(lightboxedElement);
await settled();
assert.dom(SELECTORS.LIGHTBOX_CONTAINER).hasClass("is-visible");
assert
@ -70,7 +68,6 @@ module("Integration | Component | d-lightbox", function (hooks) {
assert.dom(SELECTORS.FOCUS_TRAP).exists();
await click(SELECTORS.CLOSE_BUTTON);
await settled();
assert.dom(SELECTORS.LIGHTBOX_CONTAINER).doesNotHaveClass("is-visible");
assert.dom(SELECTORS.LIGHTBOX_CONTENT).doesNotExist();