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,6 @@
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
acceptance("Poll quote", function (needs) {
needs.user();
@ -678,6 +679,6 @@ acceptance("Poll quote", function (needs) {
test("Quoted polls", async (assert) => {
await visit("/t/-/topic_with_two_quoted_polls");
await click(".quote-controls");
assert.equal(find(".poll").length, 2);
assert.equal(queryAll(".poll").length, 2);
});
});