mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +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,4 +1,4 @@
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
acceptance("Local Dates - composer", function (needs) {
|
||||
needs.user();
|
||||
@ -6,9 +6,9 @@ acceptance("Local Dates - composer", function (needs) {
|
||||
|
||||
test("composer bbcode", async (assert) => {
|
||||
const getAttr = (attr) => {
|
||||
return find(".d-editor-preview .discourse-local-date.cooked-date").attr(
|
||||
`data-${attr}`
|
||||
);
|
||||
return queryAll(
|
||||
".d-editor-preview .discourse-local-date.cooked-date"
|
||||
).attr(`data-${attr}`);
|
||||
};
|
||||
|
||||
await visit("/");
|
||||
|
Reference in New Issue
Block a user