mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
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:
@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user