Skip to content

Commit e34413b

Browse files
committed
Fix system specs
1 parent 7f7cdc3 commit e34413b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spec/system/summarization/chat_summarization_spec.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
end
2323

2424
it "displays a summary of the messages since the selected timeframe" do
25-
DiscourseAi::Completions::Llm.with_prepared_responses([summarization_result]) do
25+
json_format_response = { summary: summarization_result }.to_json
26+
DiscourseAi::Completions::Llm.with_prepared_responses([json_format_response]) do
2627
chat.visit_channel(channel)
2728

2829
find(".chat-composer-dropdown__trigger-btn").click

spec/system/summarization/topic_summarization_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
)
1414
end
1515

16-
let(:clean_summary) { "This is a summary" }
16+
let(:summarization_result) { "This is a summary" }
1717

1818
let(:topic_page) { PageObjects::Pages::Topic.new }
1919
let(:summary_box) { PageObjects::Components::AiSummaryTrigger.new }
2020

21-
fab!(:ai_summary) { Fabricate(:ai_summary, target: topic, summarized_text: clean_summary) }
21+
fab!(:ai_summary) { Fabricate(:ai_summary, target: topic, summarized_text: "This is a summary") }
2222

2323
before do
2424
group.add(current_user)

0 commit comments

Comments
 (0)