mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-09-08 20:50:38 +00:00
* FEATURE: Topic summarization Summarize topics using the TopicView's "summary" filter. The UI is similar to what we do for chat, but we don't allow the user to select a timeframe. Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com>
25 lines
527 B
Ruby
25 lines
527 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Modals
|
|
class Summarization < PageObjects::Modals::Base
|
|
def visible?
|
|
page.has_css?(".ai-summary-modal", wait: 5)
|
|
end
|
|
|
|
def select_timeframe(option)
|
|
find(".summarization-since").click
|
|
find(".select-kit-row[data-value=\"#{option}\"]").click
|
|
end
|
|
|
|
def summary_value
|
|
find(".summary-area").value
|
|
end
|
|
|
|
def generate_summary
|
|
find(".ai-summary-modal .create").click
|
|
end
|
|
end
|
|
end
|
|
end
|