Skip to content

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

DEV: Restore discourse-ai admin dashboard specs (#39511)

Jarek Radosze2549fb69c85
diff --git a/plugins/discourse-ai/spec/system/admin_dashboard_spec.rb b/plugins/discourse-ai/spec/system/admin_dashboard_spec.rb
index e2e5c1e4320..0c1aca314d2 100644
--- a/plugins/discourse-ai/spec/system/admin_dashboard_spec.rb
+++ b/plugins/discourse-ai/spec/system/admin_dashboard_spec.rb
@@ -5,22 +5,28 @@ RSpec.describe "Admin dashboard" do
before { enable_current_plugin }
- xit "displays the sentiment dashboard" do
+ it "displays the sentiment dashboard" do
SiteSetting.ai_sentiment_enabled = true
sign_in(admin)
- visit "/admin"
- find(".navigation-item.sentiment").click()
+ visit "/admin/dashboard/sentiment"
expect(page).to have_css(".section.sentiment")
end
- xit "displays the emotion table with links" do
+ it "displays the emotion table with links" do
SiteSetting.ai_sentiment_enabled = true
+ Fabricate(
+ :sentiment_classification,
+ target: Fabricate(:post),
+ model_used: "SamLowe/roberta-base-go_emotions",
+ classification: {
+ love: 0.95,
+ },
+ )
sign_in(admin)
- visit "/admin"
- find(".navigation-item.sentiment").click()
+ visit "/admin/dashboard/sentiment"
expect(page).to have_css(".admin-report.emotion-love .cell.value.today-count a")
end