Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 93b21cb

Browse files
committed
DEV: Update specs
1 parent 344ed3b commit 93b21cb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ import DButton from "discourse/components/d-button";
44
import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manager";
55

66
export default class AiBotSidebarNewConversation extends Component {
7+
@service router;
78
@service sidebarState;
89

910
get shouldRender() {
10-
return this.sidebarState.isCurrentPanel(AI_CONVERSATIONS_PANEL);
11+
return (
12+
this.router.currentRouteName !== "discourse-ai-bot-conversations" &&
13+
this.sidebarState.isCurrentPanel(AI_CONVERSATIONS_PANEL)
14+
);
1115
}
1216

1317
<template>

config/locales/client.en.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ en:
768768

769769
user_preferences:
770770
empty: "There are no relevant settings available at this time"
771-
experimental_homepage:
772771
review:
773772
types:
774773
reviewable_ai_post:

spec/system/ai_bot/personal_message_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
find(".ai-bot-button").click
144144

145145
expect(ai_pm_homepage).to have_homepage
146-
expect(sidebar).to have_section("custom-messages")
146+
expect(sidebar).to have_section("ai-conversations-history")
147147
expect(sidebar).to have_section_link(pm.title)
148148
expect(sidebar).to have_no_css("button.ai-new-question-button")
149149
end
@@ -154,7 +154,7 @@
154154

155155
expect(ai_pm_homepage).to have_homepage
156156
sidebar.find(
157-
".sidebar-section[data-section-name='custom-messages'] a.sidebar-section-link",
157+
".sidebar-section[data-section-name='ai-conversations-history'] a.sidebar-section-link",
158158
).click
159159
expect(topic_page).to have_topic_title(pm.title)
160160
end

0 commit comments

Comments
 (0)