FIX: Flaky Spec (#207)

This commit is contained in:
Keegan George 2023-09-06 09:46:03 -07:00 committed by GitHub
parent 5c50d2aa09
commit aa08f2d2a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -342,8 +342,6 @@ RSpec.describe "AI Composer helper", type: :system, js: true do
before { SiteSetting.ai_embeddings_enabled = true }
it "updates the category with the suggested category" do
skip("broken on CI") if ENV["CI"]
response =
Category
.take(3)
@ -357,11 +355,11 @@ RSpec.describe "AI Composer helper", type: :system, js: true do
ai_suggestion_dropdown.click_suggest_category_button
wait_for { ai_suggestion_dropdown.has_dropdown? }
suggestion = "amazing-category-1"
ai_suggestion_dropdown.select_suggestion_by_name("amazing-category-1")
suggestion = category_2.name
ai_suggestion_dropdown.select_suggestion_by_name(category_2.slug)
category_selector = page.find(".category-chooser summary")
expect(category_selector["data-name"].downcase.gsub(" ", "-")).to eq(suggestion)
expect(category_selector["data-name"]).to eq(suggestion)
end
end