Use a workaround with a special indexed_by filter to "query all"

This commit is contained in:
Jorge Manrubia
2025-07-24 09:57:19 +02:00
parent 83d743fe2a
commit 9d0887f6bd
27 changed files with 36903 additions and 7 deletions
+3 -1
View File
@@ -7,6 +7,8 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
@user = users(:david)
end
vcr_record!
test "filter by assignments" do
# List context
assert_command({ context: { assignee_ids: [ "jz" ] } }, "cards assigned to jz")
@@ -169,7 +171,7 @@ class Command::Ai::TranslatorTest < ActionDispatch::IntegrationTest
assert_command({ context: { assignee_ids: ["jz"] }, commands: [ "/insight cards where mike has commented" ] }, "cards where mike has commented assigned to jz")
assert_command({ commands: [ "/insight summarize this" ] }, "summarize this")
assert_command({ commands: [ "/insight are there blockers here?" ] }, "are there blockers here?")
assert_command({ commands: [ "/insight stuff that jz has done lately" ] }, "stuff that jz has done lately")
assert_command({ context: { indexed_by: "all" }, commands: [ "/insight stuff that jz has done lately" ] }, "stuff that jz has done lately")
end
test "combine commands and filters" do