mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 11:01:11 +08:00
DEV: Reduce jQuery usage in acceptance tests (#17406)
This commit is contained in:
@ -2,7 +2,7 @@ import {
|
||||
acceptance,
|
||||
count,
|
||||
exists,
|
||||
queryAll,
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
@ -116,8 +116,8 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
await click(".topic-post:nth-of-type(1) button.edit");
|
||||
|
||||
assert.strictEqual(
|
||||
queryAll(".d-editor-input").val(),
|
||||
queryAll(".topic-post:nth-of-type(1) .cooked > p").text(),
|
||||
query(".d-editor-input").value,
|
||||
query(".topic-post:nth-of-type(1) .cooked > p").innerText,
|
||||
"composer has contents of post to be edited"
|
||||
);
|
||||
|
||||
@ -162,7 +162,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
await joinChannel("/discourse-presence/reply/280", {
|
||||
id: 123,
|
||||
avatar_template: "/a/b/c.jpg",
|
||||
username: "myusername",
|
||||
username: "my-username",
|
||||
});
|
||||
|
||||
assert.strictEqual(count(avatarSelector), 1, "avatar displayed");
|
||||
@ -170,7 +170,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
await joinChannel("/discourse-presence/whisper/280", {
|
||||
id: 124,
|
||||
avatar_template: "/a/b/c.jpg",
|
||||
username: "myusername2",
|
||||
username: "my-username2",
|
||||
});
|
||||
|
||||
assert.strictEqual(count(avatarSelector), 2, "whisper avatar displayed");
|
||||
@ -199,7 +199,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
await joinChannel("/discourse-presence/reply/280", {
|
||||
id: 123,
|
||||
avatar_template: "/a/b/c.jpg",
|
||||
username: "myusername",
|
||||
username: "my-username",
|
||||
});
|
||||
|
||||
assert.strictEqual(count(avatarSelector), 1, "avatar displayed");
|
||||
@ -207,7 +207,7 @@ acceptance("Discourse Presence Plugin", function (needs) {
|
||||
await joinChannel("/discourse-presence/whisper/280", {
|
||||
id: 124,
|
||||
avatar_template: "/a/b/c.jpg",
|
||||
username: "myusername2",
|
||||
username: "my-username2",
|
||||
});
|
||||
|
||||
assert.strictEqual(count(avatarSelector), 2, "whisper avatar displayed");
|
||||
|
Reference in New Issue
Block a user