mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-17 11:46:28 +08: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>
24 lines
527 B
Ruby
24 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
|