Support viewing user profiles and activity

This commit is contained in:
Jorge Manrubia
2025-06-27 14:48:53 +02:00
parent a1340c81d7
commit 1f21c12c35
27 changed files with 220617 additions and 53 deletions
+5 -1
View File
@@ -121,7 +121,6 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
assert_command({ commands: [ "/add_card urgent issue" ] }, "create card urgent issue")
end
vcr_record!
test "filter by time ranges" do
assert_command({ context: { closure: "thisweek", indexed_by: "closed" } }, "cards completed this week")
assert_command({ context: { creation: "thisweek", tag_ids: [ "design" ], creator_ids: [ "jz" ] } }, "cards created this week by jz tagged as #design")
@@ -134,6 +133,11 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
assert_command({ context: { assignee_ids: [ "david" ], indexed_by: "closing_soon" } }, "my cards that are going to be auto closed")
end
test "view users profiles" do
assert_command({ commands: [ "/user jz" ] }, "check what jz has been up to")
assert_command({ commands: [ "/user kevin" ] }, "view kevin")
end
private
def assert_command(expected, query, context: :list)
assert_equal expected, translate(query, context:)
+1 -1
View File
@@ -6,7 +6,7 @@ class Command::GoToUserTest < ActionDispatch::IntegrationTest
test "redirect to the user perma" do
result = execute_command "@kevin"
assert_equal users(:kevin), result.url
assert_equal user_path(users(:kevin)), result.url
end
test "result in an invalid command if the user does not exist" do