DEV: Consistently use kebab-case in service lookups (#24552)

This commit is contained in:
Jarek Radosz 2023-11-25 18:10:10 +01:00 committed by GitHub
parent 3912a2dc24
commit 68960b26be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -150,7 +150,7 @@ export function buildAdminSidebar(navConfig) {
export default {
initialize(owner) {
this.currentUser = owner.lookup("service:currentUser");
this.currentUser = owner.lookup("service:current-user");
this.siteSettings = owner.lookup("service:site-settings");
if (!this.currentUser?.staff) {

View File

@ -57,7 +57,7 @@ module(
currentUserMembership: { following: true },
meta: { can_join_chat_channel: false },
});
this.appEvents = this.container.lookup("service:appEvents");
this.appEvents = this.container.lookup("service:app-events");
});
test("it shows status on mentions", async function (assert) {

View File

@ -12,7 +12,9 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
test("displays all notices for a channel", async function (assert) {
this.channel = fabricators.channel();
this.manager = this.container.lookup("service:chatChannelNoticesManager");
this.manager = this.container.lookup(
"service:chat-channel-notices-manager"
);
this.manager.handleNotice({
channel_id: this.channel.id,
text_content: "hello",
@ -38,7 +40,9 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
test("Notices can be cleared", async function (assert) {
this.channel = fabricators.channel();
this.manager = this.container.lookup("service:chatChannelNoticesManager");
this.manager = this.container.lookup(
"service:chat-channel-notices-manager"
);
this.manager.handleNotice({
channel_id: this.channel.id,
text_content: "hello",
@ -62,7 +66,9 @@ module("Discourse Chat | Component | chat-notice", function (hooks) {
});
test("MentionWithoutMembership notice renders", async function (assert) {
this.channel = fabricators.channel();
this.manager = this.container.lookup("service:chatChannelNoticesManager");
this.manager = this.container.lookup(
"service:chat-channel-notices-manager"
);
const text = "Joffrey can't chat, hermano";
this.manager.handleNotice({
channel_id: this.channel.id,