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

Commit 017c385

Browse files
committed
simpler spec
1 parent 6b847c1 commit 017c385

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spec/system/ai_helper/ai_post_helper_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ def select_post_text(selected_post)
123123

124124
DiscourseAi::Completions::Llm.with_prepared_responses([explain_response]) do
125125
post_ai_helper.select_helper_model(mode)
126+
126127
expect(post_ai_helper).to have_suggestion_value(explain_response)
128+
127129
post_ai_helper.click_add_footnote
128-
wait_for { post_ai_helper.has_no_post_ai_helper? }
129-
post.reload
130-
expect(post.raw).to include(
130+
131+
expect(post_ai_helper).to have_no_post_ai_helper
132+
133+
expect(post.reload.raw).to include(
131134
"^[#{explain_response} (#{I18n.t("js.discourse_ai.ai_helper.post_options_menu.footnote_credits")})]",
132135
)
133136
end

0 commit comments

Comments
 (0)