Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix a flaky AI bot upload test (#33994)

Gary Pendergast55bf697976db
diff --git a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb
index 8d2b06dc50d..d284c57e394 100644
--- a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb
+++ b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb
@@ -153,6 +153,8 @@ RSpec.describe "AI Bot - Homepage", type: :system do
ai_pm_homepage.input.fill_in(with: "Here are two image attachments")
+ expect(page).to have_no_css(".ai-bot-upload--in-progress")
+
responses = ["hello user", "topic title"]
DiscourseAi::Completions::Llm.with_prepared_responses(responses) do
ai_pm_homepage.submit