Support viewing user profiles and activity
This commit is contained in:
@@ -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:)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user