mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:39:28 +08:00
DEV: Use selectors instead of query()
where possible (#29677)
This commit is contained in:
@ -4,7 +4,7 @@ import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import pretender from "discourse/tests/helpers/create-pretender";
|
||||
import { query, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "discourse-i18n";
|
||||
import ChatFabricators from "discourse/plugins/chat/discourse/lib/fabricators";
|
||||
|
||||
@ -57,7 +57,7 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
|
||||
"Notice is present"
|
||||
);
|
||||
|
||||
await click(query(".chat-notices__notice__clear"), "Clear the notice");
|
||||
await click(".chat-notices__notice__clear");
|
||||
|
||||
assert.strictEqual(
|
||||
queryAll(".chat-notices .chat-notices__notice").length,
|
||||
@ -96,10 +96,7 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
|
||||
return [200, { "Content-Type": "application/json" }, {}];
|
||||
});
|
||||
|
||||
await click(
|
||||
query(".mention-without-membership-notice__body__link"),
|
||||
"Invites the user"
|
||||
);
|
||||
await click(".mention-without-membership-notice__body__link");
|
||||
|
||||
// I would love to test that the invitation sent text is present here but
|
||||
// dismiss is called right away instead of waiting 3 seconds.. Not much we can
|
||||
|
Reference in New Issue
Block a user