mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
c750a02f05
commit
435a9913a4
135 changed files with 1343 additions and 1025 deletions
|
@ -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("/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue