REFACTOR: Replace global find with queryAll

In newer Embers jQuery is removed. There is a `find` but it only returns
one element and not a jQuery selector. This patch migrates our code to a
new helper `queryAll` which allows us to remove the global.
This commit is contained in:
Robin Ward
2020-10-28 16:36:01 -04:00
parent c750a02f05
commit 435a9913a4
135 changed files with 1343 additions and 1025 deletions

View File

@@ -1,5 +1,7 @@
import EmberObject, { set } from "@ember/object";
import componentTest from "helpers/component-test";
import { moduleForComponent } from "ember-qunit";
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
moduleForComponent("invite-panel", { integration: true });
@@ -17,6 +19,6 @@ componentTest("can_invite_via_email", {
async test(assert) {
await fillIn(".invite-user-input", "eviltrout@example.com");
assert.ok(find(".send-invite:disabled").length === 0);
assert.ok(queryAll(".send-invite:disabled").length === 0);
},
});