Files
fizzy/test/models/command/ai/translator_test.rb
T
Jorge Manrubia 50d323d402 Rename method
2025-05-16 13:29:18 +02:00

35 lines
1.2 KiB
Ruby

require "test_helper"
class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
test "sandbox list of cards" do
@url = cards_url
test_command "tag cards assigned to jz with design"
# test_command "summarize cards about performance"
# test_command "tag with #performance"
# test_command "cards assigned to jorge"
# test_command "performance cards assigned to jorge"
# test_command "close performance cards assigned to jorge and tag them with #performance"
end
test "sandbox single card" do
@url = card_url(cards(:logo))
test_command "summarize cards about performance"
test_command "tag with performance and close"
test_command "summarize this card"
test_command "tag with #performance"
test_command "cards assigned to jorge"
test_command "performance cards assigned to jorge"
test_command "close performance cards assigned to jorge and tag them with #performance"
end
private
def test_command(query)
user = users(:david)
context = Command::Parser::Context.new(user, url: @url)
translator = Command::Ai::Translator.new(context)
puts translator.translate(query)
end
end