@langadventurellc/task-trellis-mcp 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -323
- package/dist/__tests__/e2e/autoPrune.e2e.test.d.ts +2 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.js +533 -0
- package/dist/__tests__/e2e/autoPrune.e2e.test.js.map +1 -0
- package/dist/__tests__/e2e/configuration/activation.e2e.test.js +6 -6
- package/dist/__tests__/e2e/configuration/activation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/commandLineArgs.e2e.test.js +55 -6
- package/dist/__tests__/e2e/configuration/commandLineArgs.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/directorySetup.e2e.test.js +19 -19
- package/dist/__tests__/e2e/configuration/directorySetup.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/invalidConfig.e2e.test.js +9 -9
- package/dist/__tests__/e2e/configuration/invalidConfig.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/configuration/preActivation.e2e.test.js +15 -15
- package/dist/__tests__/e2e/configuration/preActivation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/createObject.e2e.test.js +34 -34
- package/dist/__tests__/e2e/crud/createObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/deleteObject.e2e.test.js +19 -19
- package/dist/__tests__/e2e/crud/deleteObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js +32 -32
- package/dist/__tests__/e2e/crud/fileValidation.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/getObject.e2e.test.js +143 -22
- package/dist/__tests__/e2e/crud/getObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/listObjects.e2e.test.js +561 -42
- package/dist/__tests__/e2e/crud/listObjects.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/crud/updateObject.e2e.test.js +497 -25
- package/dist/__tests__/e2e/crud/updateObject.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.d.ts +2 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.d.ts.map +1 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.js +319 -0
- package/dist/__tests__/e2e/hierarchicalPrerequisites.e2e.test.js.map +1 -0
- package/dist/__tests__/e2e/infrastructure/client.e2e.test.js +4 -4
- package/dist/__tests__/e2e/infrastructure/client.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/infrastructure/server.e2e.test.js +6 -6
- package/dist/__tests__/e2e/infrastructure/server.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/utils/extractObjectIds.d.ts +1 -1
- package/dist/__tests__/e2e/utils/extractObjectIds.js +1 -1
- package/dist/__tests__/e2e/utils/mcpTestClient.d.ts.map +1 -1
- package/dist/__tests__/e2e/utils/mcpTestClient.js +3 -2
- package/dist/__tests__/e2e/utils/mcpTestClient.js.map +1 -1
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.d.ts +1 -1
- package/dist/__tests__/e2e/utils/parseListObjectsResponse.js +1 -1
- package/dist/__tests__/e2e/utils/parseUpdateObjectResponse.d.ts +1 -1
- package/dist/__tests__/e2e/utils/parseUpdateObjectResponse.js +1 -1
- package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js +4 -4
- package/dist/__tests__/e2e/workflow/appendLog.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js +15 -15
- package/dist/__tests__/e2e/workflow/appendModifiedFiles.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/claimTask.e2e.test.js +44 -0
- package/dist/__tests__/e2e/workflow/claimTask.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/completeTask.e2e.test.js +4 -4
- package/dist/__tests__/e2e/workflow/completeTask.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/prerequisites.e2e.test.js +43 -43
- package/dist/__tests__/e2e/workflow/prerequisites.e2e.test.js.map +1 -1
- package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js +19 -19
- package/dist/__tests__/e2e/workflow/taskLifecycle.e2e.test.js.map +1 -1
- package/dist/__tests__/serverStartup.test.d.ts +2 -0
- package/dist/__tests__/serverStartup.test.d.ts.map +1 -0
- package/dist/__tests__/serverStartup.test.js +171 -0
- package/dist/__tests__/serverStartup.test.js.map +1 -0
- package/dist/configuration/ServerConfig.d.ts +2 -1
- package/dist/configuration/ServerConfig.d.ts.map +1 -1
- package/dist/repositories/Repository.d.ts +2 -1
- package/dist/repositories/Repository.d.ts.map +1 -1
- package/dist/repositories/local/LocalRepository.d.ts +2 -1
- package/dist/repositories/local/LocalRepository.d.ts.map +1 -1
- package/dist/repositories/local/LocalRepository.js +4 -0
- package/dist/repositories/local/LocalRepository.js.map +1 -1
- package/dist/repositories/local/__tests__/getChildrenOf.test.d.ts +2 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.d.ts.map +1 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.js +306 -0
- package/dist/repositories/local/__tests__/getChildrenOf.test.js.map +1 -0
- package/dist/repositories/local/__tests__/getObjects.test.js +309 -0
- package/dist/repositories/local/__tests__/getObjects.test.js.map +1 -1
- package/dist/repositories/local/deleteObjectById.d.ts.map +1 -1
- package/dist/repositories/local/deleteObjectById.js +2 -0
- package/dist/repositories/local/deleteObjectById.js.map +1 -1
- package/dist/repositories/local/getChildrenOf.d.ts +11 -0
- package/dist/repositories/local/getChildrenOf.d.ts.map +1 -0
- package/dist/repositories/local/getChildrenOf.js +73 -0
- package/dist/repositories/local/getChildrenOf.js.map +1 -0
- package/dist/repositories/local/getObjects.d.ts +1 -1
- package/dist/repositories/local/getObjects.d.ts.map +1 -1
- package/dist/repositories/local/getObjects.js +25 -6
- package/dist/repositories/local/getObjects.js.map +1 -1
- package/dist/server.js +39 -15
- package/dist/server.js.map +1 -1
- package/dist/services/TaskTrellisService.d.ts +4 -13
- package/dist/services/TaskTrellisService.d.ts.map +1 -1
- package/dist/services/local/LocalTaskTrellisService.d.ts +3 -9
- package/dist/services/local/LocalTaskTrellisService.d.ts.map +1 -1
- package/dist/services/local/LocalTaskTrellisService.js +4 -8
- package/dist/services/local/LocalTaskTrellisService.js.map +1 -1
- package/dist/services/local/__tests__/appendModifiedFiles.test.js +1 -0
- package/dist/services/local/__tests__/appendModifiedFiles.test.js.map +1 -1
- package/dist/services/local/__tests__/appendObjectLog.test.js +1 -0
- package/dist/services/local/__tests__/appendObjectLog.test.js.map +1 -1
- package/dist/services/local/__tests__/claimTask.test.js +127 -131
- package/dist/services/local/__tests__/claimTask.test.js.map +1 -1
- package/dist/services/local/__tests__/completeTask.test.js +30 -28
- package/dist/services/local/__tests__/completeTask.test.js.map +1 -1
- package/dist/services/local/__tests__/createObject.test.js +1 -0
- package/dist/services/local/__tests__/createObject.test.js.map +1 -1
- package/dist/services/local/__tests__/listObjects.test.js +135 -10
- package/dist/services/local/__tests__/listObjects.test.js.map +1 -1
- package/dist/services/local/__tests__/pruneClosed.test.js +446 -186
- package/dist/services/local/__tests__/pruneClosed.test.js.map +1 -1
- package/dist/services/local/__tests__/updateObject.test.js +234 -27
- package/dist/services/local/__tests__/updateObject.test.js.map +1 -1
- package/dist/services/local/claimTask.d.ts.map +1 -1
- package/dist/services/local/claimTask.js +25 -34
- package/dist/services/local/claimTask.js.map +1 -1
- package/dist/services/local/completeTask.d.ts +1 -1
- package/dist/services/local/completeTask.d.ts.map +1 -1
- package/dist/services/local/completeTask.js +4 -40
- package/dist/services/local/completeTask.js.map +1 -1
- package/dist/services/local/listObjects.d.ts +1 -1
- package/dist/services/local/listObjects.d.ts.map +1 -1
- package/dist/services/local/listObjects.js +10 -1
- package/dist/services/local/listObjects.js.map +1 -1
- package/dist/services/local/pruneClosed.d.ts.map +1 -1
- package/dist/services/local/pruneClosed.js +63 -6
- package/dist/services/local/pruneClosed.js.map +1 -1
- package/dist/services/local/updateObject.d.ts +2 -1
- package/dist/services/local/updateObject.d.ts.map +1 -1
- package/dist/services/local/updateObject.js +28 -1
- package/dist/services/local/updateObject.js.map +1 -1
- package/dist/tools/__tests__/appendModifiedFilesTool.test.js +1 -0
- package/dist/tools/__tests__/appendModifiedFilesTool.test.js.map +1 -1
- package/dist/tools/__tests__/appendObjectLogTool.test.js +1 -0
- package/dist/tools/__tests__/appendObjectLogTool.test.js.map +1 -1
- package/dist/tools/__tests__/claimTaskTool.test.js +1 -1
- package/dist/tools/__tests__/claimTaskTool.test.js.map +1 -1
- package/dist/tools/__tests__/completeTaskTool.test.js +23 -16
- package/dist/tools/__tests__/completeTaskTool.test.js.map +1 -1
- package/dist/tools/__tests__/createObjectTool.test.js +1 -0
- package/dist/tools/__tests__/createObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/deleteObjectTool.test.js +1 -0
- package/dist/tools/__tests__/deleteObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/getObjectTool.test.js +1 -0
- package/dist/tools/__tests__/getObjectTool.test.js.map +1 -1
- package/dist/tools/__tests__/listObjectsTool.test.js +160 -1
- package/dist/tools/__tests__/listObjectsTool.test.js.map +1 -1
- package/dist/tools/__tests__/updateObjectTool.test.js +39 -10
- package/dist/tools/__tests__/updateObjectTool.test.js.map +1 -1
- package/dist/tools/appendModifiedFilesTool.d.ts +2 -2
- package/dist/tools/appendModifiedFilesTool.js +4 -4
- package/dist/tools/appendModifiedFilesTool.js.map +1 -1
- package/dist/tools/appendObjectLogTool.d.ts +3 -3
- package/dist/tools/appendObjectLogTool.js +4 -4
- package/dist/tools/appendObjectLogTool.js.map +1 -1
- package/dist/tools/completeTaskTool.d.ts +1 -1
- package/dist/tools/completeTaskTool.d.ts.map +1 -1
- package/dist/tools/completeTaskTool.js +1 -1
- package/dist/tools/completeTaskTool.js.map +1 -1
- package/dist/tools/createObjectTool.d.ts +8 -8
- package/dist/tools/createObjectTool.js +13 -13
- package/dist/tools/createObjectTool.js.map +1 -1
- package/dist/tools/deleteObjectTool.d.ts +3 -3
- package/dist/tools/deleteObjectTool.js +12 -12
- package/dist/tools/deleteObjectTool.js.map +1 -1
- package/dist/tools/getObjectTool.d.ts +3 -3
- package/dist/tools/getObjectTool.d.ts.map +1 -1
- package/dist/tools/getObjectTool.js +12 -7
- package/dist/tools/getObjectTool.js.map +1 -1
- package/dist/tools/index.d.ts +7 -9
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +22 -28
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/listObjectsTool.d.ts +20 -11
- package/dist/tools/listObjectsTool.d.ts.map +1 -1
- package/dist/tools/listObjectsTool.js +112 -40
- package/dist/tools/listObjectsTool.js.map +1 -1
- package/dist/tools/updateObjectTool.d.ts +12 -7
- package/dist/tools/updateObjectTool.d.ts.map +1 -1
- package/dist/tools/updateObjectTool.js +20 -14
- package/dist/tools/updateObjectTool.js.map +1 -1
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.d.ts +2 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.d.ts.map +1 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js +206 -0
- package/dist/utils/__tests__/checkHierarchicalPrerequisitesComplete.test.js.map +1 -0
- package/dist/utils/__tests__/checkPrerequisitesComplete.test.js +5 -0
- package/dist/utils/__tests__/checkPrerequisitesComplete.test.js.map +1 -1
- package/dist/utils/__tests__/filterUnavailableObjects.test.js +51 -25
- package/dist/utils/__tests__/filterUnavailableObjects.test.js.map +1 -1
- package/dist/utils/__tests__/isRequiredForOtherObjects.test.js +5 -0
- package/dist/utils/__tests__/isRequiredForOtherObjects.test.js.map +1 -1
- package/dist/utils/__tests__/updateParentHierarchy.test.d.ts +2 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.d.ts.map +1 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.js +137 -0
- package/dist/utils/__tests__/updateParentHierarchy.test.js.map +1 -0
- package/dist/utils/autoCompleteParentHierarchy.d.ts +11 -0
- package/dist/utils/autoCompleteParentHierarchy.d.ts.map +1 -0
- package/dist/utils/autoCompleteParentHierarchy.js +49 -0
- package/dist/utils/autoCompleteParentHierarchy.js.map +1 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.d.ts +14 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.d.ts.map +1 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.js +47 -0
- package/dist/utils/checkHierarchicalPrerequisitesComplete.js.map +1 -0
- package/dist/utils/filterUnavailableObjects.d.ts +6 -4
- package/dist/utils/filterUnavailableObjects.d.ts.map +1 -1
- package/dist/utils/filterUnavailableObjects.js +16 -22
- package/dist/utils/filterUnavailableObjects.js.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/updateParentHierarchy.d.ts +11 -0
- package/dist/utils/updateParentHierarchy.d.ts.map +1 -0
- package/dist/utils/updateParentHierarchy.js +40 -0
- package/dist/utils/updateParentHierarchy.js.map +1 -0
- package/dist/validation/__tests__/validateObjectCreation.test.js +1 -0
- package/dist/validation/__tests__/validateObjectCreation.test.js.map +1 -1
- package/dist/validation/__tests__/validateParentExists.test.js +1 -0
- package/dist/validation/__tests__/validateParentExists.test.js.map +1 -1
- package/dist/validation/__tests__/validateStatusTransition.test.js +1 -0
- package/dist/validation/__tests__/validateStatusTransition.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.d.ts +0 -2
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.d.ts.map +0 -1
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.js +0 -693
- package/dist/__tests__/e2e/crud/replaceObjectBodyRegex.e2e.test.js.map +0 -1
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.d.ts +0 -2
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.d.ts.map +0 -1
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.js +0 -352
- package/dist/__tests__/e2e/workflow/pruneClosed.e2e.test.js.map +0 -1
- package/dist/services/local/__tests__/replaceObjectBodyRegex.test.d.ts +0 -2
- package/dist/services/local/__tests__/replaceObjectBodyRegex.test.d.ts.map +0 -1
- package/dist/services/local/__tests__/replaceObjectBodyRegex.test.js +0 -283
- package/dist/services/local/__tests__/replaceObjectBodyRegex.test.js.map +0 -1
- package/dist/services/local/replaceObjectBodyRegex.d.ts +0 -8
- package/dist/services/local/replaceObjectBodyRegex.d.ts.map +0 -1
- package/dist/services/local/replaceObjectBodyRegex.js +0 -85
- package/dist/services/local/replaceObjectBodyRegex.js.map +0 -1
- package/dist/tools/__tests__/pruneClosedTool.test.d.ts +0 -2
- package/dist/tools/__tests__/pruneClosedTool.test.d.ts.map +0 -1
- package/dist/tools/__tests__/pruneClosedTool.test.js +0 -112
- package/dist/tools/__tests__/pruneClosedTool.test.js.map +0 -1
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.d.ts +0 -2
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.d.ts.map +0 -1
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.js +0 -89
- package/dist/tools/__tests__/replaceObjectBodyRegexTool.test.js.map +0 -1
- package/dist/tools/pruneClosedTool.d.ts +0 -27
- package/dist/tools/pruneClosedTool.d.ts.map +0 -1
- package/dist/tools/pruneClosedTool.js +0 -57
- package/dist/tools/pruneClosedTool.js.map +0 -1
- package/dist/tools/replaceObjectBodyRegexTool.d.ts +0 -36
- package/dist/tools/replaceObjectBodyRegexTool.d.ts.map +0 -1
- package/dist/tools/replaceObjectBodyRegexTool.js +0 -67
- package/dist/tools/replaceObjectBodyRegexTool.js.map +0 -1
- package/dist/utils/ReplaceStringOptions.d.ts +0 -12
- package/dist/utils/ReplaceStringOptions.d.ts.map +0 -1
- package/dist/utils/ReplaceStringOptions.js +0 -3
- package/dist/utils/ReplaceStringOptions.js.map +0 -1
- package/dist/utils/__tests__/replaceStringWithRegex.test.d.ts +0 -2
- package/dist/utils/__tests__/replaceStringWithRegex.test.d.ts.map +0 -1
- package/dist/utils/__tests__/replaceStringWithRegex.test.js +0 -281
- package/dist/utils/__tests__/replaceStringWithRegex.test.js.map +0 -1
- package/dist/utils/replaceStringWithRegex.d.ts +0 -45
- package/dist/utils/replaceStringWithRegex.d.ts.map +0 -1
- package/dist/utils/replaceStringWithRegex.js +0 -91
- package/dist/utils/replaceStringWithRegex.js.map +0 -1
|
@@ -81,7 +81,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
81
81
|
}), { status: "open" });
|
|
82
82
|
});
|
|
83
83
|
it("should list only projects when type=project", async () => {
|
|
84
|
-
const result = await client.callTool("
|
|
84
|
+
const result = await client.callTool("list_issues", {
|
|
85
85
|
type: "project",
|
|
86
86
|
});
|
|
87
87
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -89,7 +89,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
89
89
|
expect(objects[0]).toBe("P-test-project");
|
|
90
90
|
});
|
|
91
91
|
it("should list only tasks when type=task", async () => {
|
|
92
|
-
const result = await client.callTool("
|
|
92
|
+
const result = await client.callTool("list_issues", {
|
|
93
93
|
type: "task",
|
|
94
94
|
});
|
|
95
95
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -97,7 +97,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
97
97
|
expect(objects[0]).toBe("T-test-task");
|
|
98
98
|
});
|
|
99
99
|
it("should list only epics when type=epic", async () => {
|
|
100
|
-
const result = await client.callTool("
|
|
100
|
+
const result = await client.callTool("list_issues", {
|
|
101
101
|
type: "epic",
|
|
102
102
|
});
|
|
103
103
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -105,7 +105,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
105
105
|
expect(objects[0]).toBe("E-test-epic");
|
|
106
106
|
});
|
|
107
107
|
it("should list only features when type=feature", async () => {
|
|
108
|
-
const result = await client.callTool("
|
|
108
|
+
const result = await client.callTool("list_issues", {
|
|
109
109
|
type: "feature",
|
|
110
110
|
});
|
|
111
111
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -114,7 +114,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
114
114
|
});
|
|
115
115
|
it("should return empty array when no objects of specified type exist", async () => {
|
|
116
116
|
// Test with a scope that doesn't exist to get empty results
|
|
117
|
-
const result = await client.callTool("
|
|
117
|
+
const result = await client.callTool("list_issues", {
|
|
118
118
|
type: "task",
|
|
119
119
|
scope: "E-nonexistent-epic",
|
|
120
120
|
});
|
|
@@ -137,7 +137,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
it("should filter objects by status", async () => {
|
|
140
|
-
const result = await client.callTool("
|
|
140
|
+
const result = await client.callTool("list_issues", {
|
|
141
141
|
type: "task",
|
|
142
142
|
status: "in-progress",
|
|
143
143
|
});
|
|
@@ -145,7 +145,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
145
145
|
expect(objects).toHaveLength(1);
|
|
146
146
|
});
|
|
147
147
|
it("should exclude closed tasks by default", async () => {
|
|
148
|
-
const result = await client.callTool("
|
|
148
|
+
const result = await client.callTool("list_issues", {
|
|
149
149
|
type: "task",
|
|
150
150
|
});
|
|
151
151
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -154,7 +154,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
154
154
|
expect(objects).toHaveLength(3);
|
|
155
155
|
});
|
|
156
156
|
it("should include closed tasks when includeClosed=true", async () => {
|
|
157
|
-
const result = await client.callTool("
|
|
157
|
+
const result = await client.callTool("list_issues", {
|
|
158
158
|
type: "task",
|
|
159
159
|
includeClosed: true,
|
|
160
160
|
});
|
|
@@ -163,7 +163,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
163
163
|
// Note: Can't test individual object status since only IDs are returned
|
|
164
164
|
});
|
|
165
165
|
it("should filter open tasks correctly", async () => {
|
|
166
|
-
const result = await client.callTool("
|
|
166
|
+
const result = await client.callTool("list_issues", {
|
|
167
167
|
type: "task",
|
|
168
168
|
status: "open",
|
|
169
169
|
});
|
|
@@ -239,7 +239,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
241
|
it("should exclude closed projects by default", async () => {
|
|
242
|
-
const result = await client.callTool("
|
|
242
|
+
const result = await client.callTool("list_issues", {
|
|
243
243
|
type: "project",
|
|
244
244
|
});
|
|
245
245
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -251,7 +251,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
251
251
|
expect(testObjects).not.toContain("P-wont-do-project");
|
|
252
252
|
});
|
|
253
253
|
it("should include closed projects when includeClosed=true", async () => {
|
|
254
|
-
const result = await client.callTool("
|
|
254
|
+
const result = await client.callTool("list_issues", {
|
|
255
255
|
type: "project",
|
|
256
256
|
includeClosed: true,
|
|
257
257
|
});
|
|
@@ -264,7 +264,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
264
264
|
expect(testObjects).toContain("P-wont-do-project");
|
|
265
265
|
});
|
|
266
266
|
it("should exclude closed epics by default", async () => {
|
|
267
|
-
const result = await client.callTool("
|
|
267
|
+
const result = await client.callTool("list_issues", {
|
|
268
268
|
type: "epic",
|
|
269
269
|
});
|
|
270
270
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -275,7 +275,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
275
275
|
expect(objects).not.toContain("E-wont-do-epic");
|
|
276
276
|
});
|
|
277
277
|
it("should include closed epics when includeClosed=true", async () => {
|
|
278
|
-
const result = await client.callTool("
|
|
278
|
+
const result = await client.callTool("list_issues", {
|
|
279
279
|
type: "epic",
|
|
280
280
|
includeClosed: true,
|
|
281
281
|
});
|
|
@@ -287,7 +287,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
287
287
|
expect(objects).toContain("E-wont-do-epic");
|
|
288
288
|
});
|
|
289
289
|
it("should exclude closed features by default", async () => {
|
|
290
|
-
const result = await client.callTool("
|
|
290
|
+
const result = await client.callTool("list_issues", {
|
|
291
291
|
type: "feature",
|
|
292
292
|
});
|
|
293
293
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -298,7 +298,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
298
298
|
expect(objects).not.toContain("F-wont-do-feature");
|
|
299
299
|
});
|
|
300
300
|
it("should include closed features when includeClosed=true", async () => {
|
|
301
|
-
const result = await client.callTool("
|
|
301
|
+
const result = await client.callTool("list_issues", {
|
|
302
302
|
type: "feature",
|
|
303
303
|
includeClosed: true,
|
|
304
304
|
});
|
|
@@ -310,7 +310,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
310
310
|
expect(objects).toContain("F-wont-do-feature");
|
|
311
311
|
});
|
|
312
312
|
it("should exclude closed tasks by default", async () => {
|
|
313
|
-
const result = await client.callTool("
|
|
313
|
+
const result = await client.callTool("list_issues", {
|
|
314
314
|
type: "task",
|
|
315
315
|
});
|
|
316
316
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -324,7 +324,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
324
324
|
expect(testObjects).not.toContain("T-wont-do-includeclosed");
|
|
325
325
|
});
|
|
326
326
|
it("should include closed tasks when includeClosed=true", async () => {
|
|
327
|
-
const result = await client.callTool("
|
|
327
|
+
const result = await client.callTool("list_issues", {
|
|
328
328
|
type: "task",
|
|
329
329
|
includeClosed: true,
|
|
330
330
|
});
|
|
@@ -339,7 +339,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
339
339
|
expect(testObjects).toContain("T-wont-do-includeclosed");
|
|
340
340
|
});
|
|
341
341
|
it("should work with includeClosed and status filters for projects", async () => {
|
|
342
|
-
const result = await client.callTool("
|
|
342
|
+
const result = await client.callTool("list_issues", {
|
|
343
343
|
type: "project",
|
|
344
344
|
status: "done",
|
|
345
345
|
includeClosed: true,
|
|
@@ -349,7 +349,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
349
349
|
expect(objects).toContain("P-done-project");
|
|
350
350
|
});
|
|
351
351
|
it("should work with includeClosed and status filters for epics", async () => {
|
|
352
|
-
const result = await client.callTool("
|
|
352
|
+
const result = await client.callTool("list_issues", {
|
|
353
353
|
type: "epic",
|
|
354
354
|
status: "wont-do",
|
|
355
355
|
includeClosed: true,
|
|
@@ -359,7 +359,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
359
359
|
expect(objects).toContain("E-wont-do-epic");
|
|
360
360
|
});
|
|
361
361
|
it("should return empty array when status filter requires closed objects but includeClosed=false", async () => {
|
|
362
|
-
const result = await client.callTool("
|
|
362
|
+
const result = await client.callTool("list_issues", {
|
|
363
363
|
type: "feature",
|
|
364
364
|
status: "done",
|
|
365
365
|
includeClosed: false,
|
|
@@ -380,7 +380,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
it("should filter objects by priority", async () => {
|
|
383
|
-
const result = await client.callTool("
|
|
383
|
+
const result = await client.callTool("list_issues", {
|
|
384
384
|
type: "feature",
|
|
385
385
|
priority: "high",
|
|
386
386
|
});
|
|
@@ -389,7 +389,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
389
389
|
expect(objects[0]).toBe("F-high-priority");
|
|
390
390
|
});
|
|
391
391
|
it("should filter objects by medium priority", async () => {
|
|
392
|
-
const result = await client.callTool("
|
|
392
|
+
const result = await client.callTool("list_issues", {
|
|
393
393
|
type: "feature",
|
|
394
394
|
priority: "medium",
|
|
395
395
|
});
|
|
@@ -398,7 +398,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
398
398
|
expect(objects[0]).toBe("F-medium-priority");
|
|
399
399
|
});
|
|
400
400
|
it("should filter objects by low priority", async () => {
|
|
401
|
-
const result = await client.callTool("
|
|
401
|
+
const result = await client.callTool("list_issues", {
|
|
402
402
|
type: "feature",
|
|
403
403
|
priority: "low",
|
|
404
404
|
});
|
|
@@ -407,7 +407,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
407
407
|
expect(objects[0]).toBe("F-low-priority");
|
|
408
408
|
});
|
|
409
409
|
it("should return all priorities when no filter specified", async () => {
|
|
410
|
-
const result = await client.callTool("
|
|
410
|
+
const result = await client.callTool("list_issues", {
|
|
411
411
|
type: "feature",
|
|
412
412
|
});
|
|
413
413
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -450,7 +450,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
450
450
|
}));
|
|
451
451
|
});
|
|
452
452
|
it("should list objects within project scope", async () => {
|
|
453
|
-
const result = await client.callTool("
|
|
453
|
+
const result = await client.callTool("list_issues", {
|
|
454
454
|
type: "epic",
|
|
455
455
|
scope: "P-parent",
|
|
456
456
|
});
|
|
@@ -460,7 +460,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
460
460
|
expect(objects).toContain("E-child-2");
|
|
461
461
|
});
|
|
462
462
|
it("should list objects within epic scope", async () => {
|
|
463
|
-
const result = await client.callTool("
|
|
463
|
+
const result = await client.callTool("list_issues", {
|
|
464
464
|
type: "feature",
|
|
465
465
|
scope: "E-child-1",
|
|
466
466
|
});
|
|
@@ -469,7 +469,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
469
469
|
expect(objects[0]).toBe("F-grandchild-1");
|
|
470
470
|
});
|
|
471
471
|
it("should not include objects outside of scope", async () => {
|
|
472
|
-
const result = await client.callTool("
|
|
472
|
+
const result = await client.callTool("list_issues", {
|
|
473
473
|
type: "feature",
|
|
474
474
|
scope: "P-parent",
|
|
475
475
|
});
|
|
@@ -478,7 +478,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
478
478
|
expect(objects).not.toContain("F-standalone");
|
|
479
479
|
});
|
|
480
480
|
it("should return empty array for non-existent scope", async () => {
|
|
481
|
-
const result = await client.callTool("
|
|
481
|
+
const result = await client.callTool("list_issues", {
|
|
482
482
|
type: "task",
|
|
483
483
|
scope: "P-nonexistent",
|
|
484
484
|
});
|
|
@@ -542,7 +542,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
542
542
|
}
|
|
543
543
|
});
|
|
544
544
|
it("should apply multiple filters simultaneously", async () => {
|
|
545
|
-
const result = await client.callTool("
|
|
545
|
+
const result = await client.callTool("list_issues", {
|
|
546
546
|
type: "task",
|
|
547
547
|
status: "open",
|
|
548
548
|
priority: "high",
|
|
@@ -553,7 +553,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
553
553
|
expect(objects[0]).toBe("T-high-open");
|
|
554
554
|
});
|
|
555
555
|
it("should combine includeClosed with other filters", async () => {
|
|
556
|
-
const result = await client.callTool("
|
|
556
|
+
const result = await client.callTool("list_issues", {
|
|
557
557
|
type: "task",
|
|
558
558
|
priority: "high",
|
|
559
559
|
scope: "P-complex",
|
|
@@ -565,7 +565,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
565
565
|
expect(objects).toContain("T-high-done");
|
|
566
566
|
});
|
|
567
567
|
it("should return empty when combined filters match nothing", async () => {
|
|
568
|
-
const result = await client.callTool("
|
|
568
|
+
const result = await client.callTool("list_issues", {
|
|
569
569
|
type: "task",
|
|
570
570
|
status: "draft",
|
|
571
571
|
priority: "high",
|
|
@@ -575,7 +575,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
575
575
|
expect(objects).toEqual([]);
|
|
576
576
|
});
|
|
577
577
|
it("should combine status and priority filters", async () => {
|
|
578
|
-
const result = await client.callTool("
|
|
578
|
+
const result = await client.callTool("list_issues", {
|
|
579
579
|
type: "task",
|
|
580
580
|
status: "in-progress",
|
|
581
581
|
priority: "medium",
|
|
@@ -606,7 +606,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
606
606
|
title: "Child Epic",
|
|
607
607
|
parent: "P-detailed",
|
|
608
608
|
}), { projectId: "P-detailed" });
|
|
609
|
-
const result = await client.callTool("
|
|
609
|
+
const result = await client.callTool("list_issues", {
|
|
610
610
|
type: "project",
|
|
611
611
|
});
|
|
612
612
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -619,7 +619,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
619
619
|
id: "T-minimal",
|
|
620
620
|
title: "Minimal Task",
|
|
621
621
|
}), { status: "open" });
|
|
622
|
-
const result = await client.callTool("
|
|
622
|
+
const result = await client.callTool("list_issues", {
|
|
623
623
|
type: "task",
|
|
624
624
|
});
|
|
625
625
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -652,7 +652,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
652
652
|
featureId: "F-hierarchy",
|
|
653
653
|
status: "open",
|
|
654
654
|
});
|
|
655
|
-
const result = await client.callTool("
|
|
655
|
+
const result = await client.callTool("list_issues", {
|
|
656
656
|
type: "task",
|
|
657
657
|
scope: "P-hierarchy",
|
|
658
658
|
});
|
|
@@ -677,7 +677,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
677
677
|
}), { status: folder });
|
|
678
678
|
}
|
|
679
679
|
const startTime = Date.now();
|
|
680
|
-
const result = await client.callTool("
|
|
680
|
+
const result = await client.callTool("list_issues", {
|
|
681
681
|
type: "task",
|
|
682
682
|
includeClosed: true,
|
|
683
683
|
});
|
|
@@ -702,7 +702,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
702
702
|
priority: priority,
|
|
703
703
|
}));
|
|
704
704
|
}
|
|
705
|
-
const result = await client.callTool("
|
|
705
|
+
const result = await client.callTool("list_issues", {
|
|
706
706
|
type: "feature",
|
|
707
707
|
priority: "high",
|
|
708
708
|
});
|
|
@@ -713,14 +713,14 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
713
713
|
});
|
|
714
714
|
describe("Error Handling", () => {
|
|
715
715
|
it("should handle invalid type parameter", async () => {
|
|
716
|
-
const result = await client.callTool("
|
|
716
|
+
const result = await client.callTool("list_issues", {
|
|
717
717
|
type: "invalid-type",
|
|
718
718
|
});
|
|
719
719
|
expect(result.content[0].text).toContain("Error listing objects");
|
|
720
720
|
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
721
721
|
});
|
|
722
722
|
it("should handle invalid status parameter", async () => {
|
|
723
|
-
const result = await client.callTool("
|
|
723
|
+
const result = await client.callTool("list_issues", {
|
|
724
724
|
type: "task",
|
|
725
725
|
status: "invalid-status",
|
|
726
726
|
});
|
|
@@ -728,7 +728,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
728
728
|
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
729
729
|
});
|
|
730
730
|
it("should handle invalid priority parameter", async () => {
|
|
731
|
-
const result = await client.callTool("
|
|
731
|
+
const result = await client.callTool("list_issues", {
|
|
732
732
|
type: "task",
|
|
733
733
|
priority: "critical",
|
|
734
734
|
});
|
|
@@ -743,7 +743,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
743
743
|
await fs.mkdir(path.dirname(invalidPath), { recursive: true });
|
|
744
744
|
await fs.writeFile(invalidPath, "Invalid YAML content\n---\nBody", "utf-8");
|
|
745
745
|
// Should skip invalid files and continue
|
|
746
|
-
const result = await client.callTool("
|
|
746
|
+
const result = await client.callTool("list_issues", {
|
|
747
747
|
type: "task",
|
|
748
748
|
});
|
|
749
749
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -751,7 +751,7 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
751
751
|
expect(Array.isArray(objects)).toBe(true);
|
|
752
752
|
});
|
|
753
753
|
it("should handle empty directories gracefully", async () => {
|
|
754
|
-
const result = await client.callTool("
|
|
754
|
+
const result = await client.callTool("list_issues", {
|
|
755
755
|
type: "task",
|
|
756
756
|
});
|
|
757
757
|
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
@@ -759,5 +759,524 @@ describe("E2E CRUD - listObjects", () => {
|
|
|
759
759
|
expect(objects).toEqual([]);
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
|
+
describe("Multiple Value Filtering", () => {
|
|
763
|
+
beforeEach(async () => {
|
|
764
|
+
// Create diverse test objects for comprehensive filtering validation
|
|
765
|
+
// Projects with different priorities
|
|
766
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-high-priority-multi", (0, utils_1.createObjectContent)({
|
|
767
|
+
id: "P-high-priority-multi",
|
|
768
|
+
title: "High Priority Project",
|
|
769
|
+
priority: "high",
|
|
770
|
+
status: "open",
|
|
771
|
+
}));
|
|
772
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-medium-priority-multi", (0, utils_1.createObjectContent)({
|
|
773
|
+
id: "P-medium-priority-multi",
|
|
774
|
+
title: "Medium Priority Project",
|
|
775
|
+
priority: "medium",
|
|
776
|
+
status: "in-progress",
|
|
777
|
+
}));
|
|
778
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-low-priority-multi", (0, utils_1.createObjectContent)({
|
|
779
|
+
id: "P-low-priority-multi",
|
|
780
|
+
title: "Low Priority Project",
|
|
781
|
+
priority: "low",
|
|
782
|
+
status: "done",
|
|
783
|
+
}));
|
|
784
|
+
// Epics with different statuses
|
|
785
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-open-multi", (0, utils_1.createObjectContent)({
|
|
786
|
+
id: "E-open-multi",
|
|
787
|
+
title: "Open Epic",
|
|
788
|
+
status: "open",
|
|
789
|
+
priority: "high",
|
|
790
|
+
parent: "P-high-priority-multi",
|
|
791
|
+
}), { projectId: "P-high-priority-multi" });
|
|
792
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-progress-multi", (0, utils_1.createObjectContent)({
|
|
793
|
+
id: "E-progress-multi",
|
|
794
|
+
title: "In Progress Epic",
|
|
795
|
+
status: "in-progress",
|
|
796
|
+
priority: "medium",
|
|
797
|
+
parent: "P-medium-priority-multi",
|
|
798
|
+
}), { projectId: "P-medium-priority-multi" });
|
|
799
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-done-multi", (0, utils_1.createObjectContent)({
|
|
800
|
+
id: "E-done-multi",
|
|
801
|
+
title: "Done Epic",
|
|
802
|
+
status: "done",
|
|
803
|
+
priority: "low",
|
|
804
|
+
parent: "P-low-priority-multi",
|
|
805
|
+
}), { projectId: "P-low-priority-multi" });
|
|
806
|
+
// Features with various combinations
|
|
807
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-high-open-multi", (0, utils_1.createObjectContent)({
|
|
808
|
+
id: "F-high-open-multi",
|
|
809
|
+
title: "High Priority Open Feature",
|
|
810
|
+
status: "open",
|
|
811
|
+
priority: "high",
|
|
812
|
+
}));
|
|
813
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-medium-progress-multi", (0, utils_1.createObjectContent)({
|
|
814
|
+
id: "F-medium-progress-multi",
|
|
815
|
+
title: "Medium Priority In Progress Feature",
|
|
816
|
+
status: "in-progress",
|
|
817
|
+
priority: "medium",
|
|
818
|
+
}));
|
|
819
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-low-draft-multi", (0, utils_1.createObjectContent)({
|
|
820
|
+
id: "F-low-draft-multi",
|
|
821
|
+
title: "Low Priority Draft Feature",
|
|
822
|
+
status: "draft",
|
|
823
|
+
priority: "low",
|
|
824
|
+
}));
|
|
825
|
+
// Tasks with different combinations
|
|
826
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-open-high-multi", (0, utils_1.createObjectContent)({
|
|
827
|
+
id: "T-open-high-multi",
|
|
828
|
+
title: "Open High Priority Task",
|
|
829
|
+
status: "open",
|
|
830
|
+
priority: "high",
|
|
831
|
+
}), { status: "open" });
|
|
832
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-progress-medium-multi", (0, utils_1.createObjectContent)({
|
|
833
|
+
id: "T-progress-medium-multi",
|
|
834
|
+
title: "In Progress Medium Priority Task",
|
|
835
|
+
status: "in-progress",
|
|
836
|
+
priority: "medium",
|
|
837
|
+
}), { status: "open" });
|
|
838
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-done-low-multi", (0, utils_1.createObjectContent)({
|
|
839
|
+
id: "T-done-low-multi",
|
|
840
|
+
title: "Done Low Priority Task",
|
|
841
|
+
status: "done",
|
|
842
|
+
priority: "low",
|
|
843
|
+
}), { status: "closed" });
|
|
844
|
+
});
|
|
845
|
+
describe("Multiple Type Filtering", () => {
|
|
846
|
+
it("should filter for multiple types using array", async () => {
|
|
847
|
+
const result = await client.callTool("list_issues", {
|
|
848
|
+
type: ["feature", "task"],
|
|
849
|
+
includeClosed: true,
|
|
850
|
+
});
|
|
851
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
852
|
+
// Should include all features and tasks, but no projects or epics
|
|
853
|
+
const features = objects.filter((id) => id.startsWith("F-"));
|
|
854
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
855
|
+
const projects = objects.filter((id) => id.startsWith("P-"));
|
|
856
|
+
const epics = objects.filter((id) => id.startsWith("E-"));
|
|
857
|
+
expect(features.length).toBeGreaterThan(0);
|
|
858
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
859
|
+
expect(projects.length).toBe(0);
|
|
860
|
+
expect(epics.length).toBe(0);
|
|
861
|
+
});
|
|
862
|
+
it("should filter for project and epic types", async () => {
|
|
863
|
+
const result = await client.callTool("list_issues", {
|
|
864
|
+
type: ["project", "epic"],
|
|
865
|
+
includeClosed: true,
|
|
866
|
+
});
|
|
867
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
868
|
+
const projects = objects.filter((id) => id.startsWith("P-"));
|
|
869
|
+
const epics = objects.filter((id) => id.startsWith("E-"));
|
|
870
|
+
const features = objects.filter((id) => id.startsWith("F-"));
|
|
871
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
872
|
+
expect(projects.length).toBeGreaterThan(0);
|
|
873
|
+
expect(epics.length).toBeGreaterThan(0);
|
|
874
|
+
expect(features.length).toBe(0);
|
|
875
|
+
expect(tasks.length).toBe(0);
|
|
876
|
+
});
|
|
877
|
+
it("should handle single type in array format", async () => {
|
|
878
|
+
const result = await client.callTool("list_issues", {
|
|
879
|
+
type: ["task"],
|
|
880
|
+
includeClosed: true,
|
|
881
|
+
});
|
|
882
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
883
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
884
|
+
const nonTasks = objects.filter((id) => !id.startsWith("T-"));
|
|
885
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
886
|
+
expect(nonTasks.length).toBe(0);
|
|
887
|
+
});
|
|
888
|
+
});
|
|
889
|
+
describe("Multiple Status Filtering", () => {
|
|
890
|
+
it("should filter for multiple statuses using array", async () => {
|
|
891
|
+
const result = await client.callTool("list_issues", {
|
|
892
|
+
type: "task",
|
|
893
|
+
status: ["open", "in-progress"],
|
|
894
|
+
});
|
|
895
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
896
|
+
// Should include T-open-high-multi and T-progress-medium-multi
|
|
897
|
+
expect(objects).toContain("T-open-high-multi");
|
|
898
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
899
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
900
|
+
});
|
|
901
|
+
it("should filter for draft and open statuses", async () => {
|
|
902
|
+
const result = await client.callTool("list_issues", {
|
|
903
|
+
type: "feature",
|
|
904
|
+
status: ["draft", "open"],
|
|
905
|
+
});
|
|
906
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
907
|
+
expect(objects).toContain("F-high-open-multi");
|
|
908
|
+
expect(objects).toContain("F-low-draft-multi");
|
|
909
|
+
expect(objects).not.toContain("F-medium-progress-multi");
|
|
910
|
+
});
|
|
911
|
+
it("should handle closed statuses with includeClosed flag", async () => {
|
|
912
|
+
const result = await client.callTool("list_issues", {
|
|
913
|
+
type: "task",
|
|
914
|
+
status: ["done", "wont-do"],
|
|
915
|
+
includeClosed: true,
|
|
916
|
+
});
|
|
917
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
918
|
+
expect(objects).toContain("T-done-low-multi");
|
|
919
|
+
});
|
|
920
|
+
});
|
|
921
|
+
describe("Multiple Priority Filtering", () => {
|
|
922
|
+
it("should filter for multiple priorities using array", async () => {
|
|
923
|
+
const result = await client.callTool("list_issues", {
|
|
924
|
+
type: "feature",
|
|
925
|
+
priority: ["high", "medium"],
|
|
926
|
+
});
|
|
927
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
928
|
+
expect(objects).toContain("F-high-open-multi");
|
|
929
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
930
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
931
|
+
});
|
|
932
|
+
it("should filter for low priority across all types", async () => {
|
|
933
|
+
const result = await client.callTool("list_issues", {
|
|
934
|
+
type: ["project", "epic", "feature", "task"],
|
|
935
|
+
priority: ["low"],
|
|
936
|
+
includeClosed: true,
|
|
937
|
+
});
|
|
938
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
939
|
+
expect(objects).toContain("P-low-priority-multi");
|
|
940
|
+
expect(objects).toContain("E-done-multi");
|
|
941
|
+
expect(objects).toContain("F-low-draft-multi");
|
|
942
|
+
expect(objects).toContain("T-done-low-multi");
|
|
943
|
+
});
|
|
944
|
+
it("should handle high and low priorities", async () => {
|
|
945
|
+
const result = await client.callTool("list_issues", {
|
|
946
|
+
type: "task",
|
|
947
|
+
priority: ["high", "low"],
|
|
948
|
+
includeClosed: true,
|
|
949
|
+
});
|
|
950
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
951
|
+
expect(objects).toContain("T-open-high-multi");
|
|
952
|
+
expect(objects).toContain("T-done-low-multi");
|
|
953
|
+
expect(objects).not.toContain("T-progress-medium-multi");
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
describe("Combined Multiple Filters", () => {
|
|
957
|
+
it("should combine multiple type and status filters", async () => {
|
|
958
|
+
const result = await client.callTool("list_issues", {
|
|
959
|
+
type: ["feature", "task"],
|
|
960
|
+
status: ["open", "in-progress"],
|
|
961
|
+
});
|
|
962
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
963
|
+
expect(objects).toContain("F-high-open-multi");
|
|
964
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
965
|
+
expect(objects).toContain("T-open-high-multi");
|
|
966
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
967
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
968
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
969
|
+
});
|
|
970
|
+
it("should combine multiple filters across all parameters", async () => {
|
|
971
|
+
const result = await client.callTool("list_issues", {
|
|
972
|
+
type: ["feature", "task"],
|
|
973
|
+
status: ["open", "in-progress"],
|
|
974
|
+
priority: ["high", "medium"],
|
|
975
|
+
});
|
|
976
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
977
|
+
expect(objects).toContain("F-high-open-multi");
|
|
978
|
+
expect(objects).toContain("F-medium-progress-multi");
|
|
979
|
+
expect(objects).toContain("T-open-high-multi");
|
|
980
|
+
expect(objects).toContain("T-progress-medium-multi");
|
|
981
|
+
expect(objects).not.toContain("F-low-draft-multi");
|
|
982
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
983
|
+
});
|
|
984
|
+
it("should apply AND logic between different filter types", async () => {
|
|
985
|
+
const result = await client.callTool("list_issues", {
|
|
986
|
+
type: ["task"],
|
|
987
|
+
status: ["open"],
|
|
988
|
+
priority: ["high"],
|
|
989
|
+
});
|
|
990
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
991
|
+
expect(objects).toContain("T-open-high-multi");
|
|
992
|
+
expect(objects).not.toContain("T-progress-medium-multi");
|
|
993
|
+
expect(objects).not.toContain("T-done-low-multi");
|
|
994
|
+
});
|
|
995
|
+
});
|
|
996
|
+
});
|
|
997
|
+
describe("Optional Type Parameter", () => {
|
|
998
|
+
beforeEach(async () => {
|
|
999
|
+
// Create objects of all types with same status/priority for testing
|
|
1000
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "project", "P-optional-type", (0, utils_1.createObjectContent)({
|
|
1001
|
+
id: "P-optional-type",
|
|
1002
|
+
title: "Optional Type Project",
|
|
1003
|
+
status: "open",
|
|
1004
|
+
priority: "high",
|
|
1005
|
+
}));
|
|
1006
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "epic", "E-optional-type", (0, utils_1.createObjectContent)({
|
|
1007
|
+
id: "E-optional-type",
|
|
1008
|
+
title: "Optional Type Epic",
|
|
1009
|
+
status: "open",
|
|
1010
|
+
priority: "high",
|
|
1011
|
+
parent: "P-optional-type",
|
|
1012
|
+
}), { projectId: "P-optional-type" });
|
|
1013
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-optional-type", (0, utils_1.createObjectContent)({
|
|
1014
|
+
id: "F-optional-type",
|
|
1015
|
+
title: "Optional Type Feature",
|
|
1016
|
+
status: "open",
|
|
1017
|
+
priority: "high",
|
|
1018
|
+
}));
|
|
1019
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-optional-type", (0, utils_1.createObjectContent)({
|
|
1020
|
+
id: "T-optional-type",
|
|
1021
|
+
title: "Optional Type Task",
|
|
1022
|
+
status: "open",
|
|
1023
|
+
priority: "high",
|
|
1024
|
+
}), { status: "open" });
|
|
1025
|
+
});
|
|
1026
|
+
it("should return all object types when type parameter is omitted", async () => {
|
|
1027
|
+
const result = await client.callTool("list_issues", {
|
|
1028
|
+
status: "open",
|
|
1029
|
+
priority: "high",
|
|
1030
|
+
});
|
|
1031
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1032
|
+
expect(objects).toContain("P-optional-type");
|
|
1033
|
+
expect(objects).toContain("E-optional-type");
|
|
1034
|
+
expect(objects).toContain("F-optional-type");
|
|
1035
|
+
expect(objects).toContain("T-optional-type");
|
|
1036
|
+
});
|
|
1037
|
+
it("should filter by status across all types when type is omitted", async () => {
|
|
1038
|
+
// Add objects with different statuses
|
|
1039
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-different-status", (0, utils_1.createObjectContent)({
|
|
1040
|
+
id: "T-different-status",
|
|
1041
|
+
title: "Different Status Task",
|
|
1042
|
+
status: "in-progress",
|
|
1043
|
+
priority: "high",
|
|
1044
|
+
}), { status: "open" });
|
|
1045
|
+
const result = await client.callTool("list_issues", {
|
|
1046
|
+
status: "open",
|
|
1047
|
+
priority: "high",
|
|
1048
|
+
});
|
|
1049
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1050
|
+
expect(objects).toContain("P-optional-type");
|
|
1051
|
+
expect(objects).toContain("E-optional-type");
|
|
1052
|
+
expect(objects).toContain("F-optional-type");
|
|
1053
|
+
expect(objects).toContain("T-optional-type");
|
|
1054
|
+
expect(objects).not.toContain("T-different-status");
|
|
1055
|
+
});
|
|
1056
|
+
it("should filter by priority across all types when type is omitted", async () => {
|
|
1057
|
+
// Add objects with different priorities
|
|
1058
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-different-priority", (0, utils_1.createObjectContent)({
|
|
1059
|
+
id: "F-different-priority",
|
|
1060
|
+
title: "Different Priority Feature",
|
|
1061
|
+
status: "open",
|
|
1062
|
+
priority: "low",
|
|
1063
|
+
}));
|
|
1064
|
+
const result = await client.callTool("list_issues", {
|
|
1065
|
+
status: "open",
|
|
1066
|
+
priority: "high",
|
|
1067
|
+
});
|
|
1068
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1069
|
+
expect(objects).toContain("P-optional-type");
|
|
1070
|
+
expect(objects).toContain("E-optional-type");
|
|
1071
|
+
expect(objects).toContain("F-optional-type");
|
|
1072
|
+
expect(objects).toContain("T-optional-type");
|
|
1073
|
+
expect(objects).not.toContain("F-different-priority");
|
|
1074
|
+
});
|
|
1075
|
+
});
|
|
1076
|
+
describe("Mixed Single and Multiple Value Tests", () => {
|
|
1077
|
+
beforeEach(async () => {
|
|
1078
|
+
// Create test objects for mixed filtering scenarios
|
|
1079
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-high-open", (0, utils_1.createObjectContent)({
|
|
1080
|
+
id: "T-mixed-high-open",
|
|
1081
|
+
title: "Mixed High Open Task",
|
|
1082
|
+
status: "open",
|
|
1083
|
+
priority: "high",
|
|
1084
|
+
}), { status: "open" });
|
|
1085
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-high-progress", (0, utils_1.createObjectContent)({
|
|
1086
|
+
id: "T-mixed-high-progress",
|
|
1087
|
+
title: "Mixed High Progress Task",
|
|
1088
|
+
status: "in-progress",
|
|
1089
|
+
priority: "high",
|
|
1090
|
+
}), { status: "open" });
|
|
1091
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-mixed-medium-open", (0, utils_1.createObjectContent)({
|
|
1092
|
+
id: "T-mixed-medium-open",
|
|
1093
|
+
title: "Mixed Medium Open Task",
|
|
1094
|
+
status: "open",
|
|
1095
|
+
priority: "medium",
|
|
1096
|
+
}), { status: "open" });
|
|
1097
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-mixed-high-open", (0, utils_1.createObjectContent)({
|
|
1098
|
+
id: "F-mixed-high-open",
|
|
1099
|
+
title: "Mixed High Open Feature",
|
|
1100
|
+
status: "open",
|
|
1101
|
+
priority: "high",
|
|
1102
|
+
}));
|
|
1103
|
+
});
|
|
1104
|
+
it("should handle single type with multiple statuses", async () => {
|
|
1105
|
+
const result = await client.callTool("list_issues", {
|
|
1106
|
+
type: "task",
|
|
1107
|
+
status: ["open", "in-progress"],
|
|
1108
|
+
priority: "high",
|
|
1109
|
+
});
|
|
1110
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1111
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1112
|
+
expect(objects).toContain("T-mixed-high-progress");
|
|
1113
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1114
|
+
});
|
|
1115
|
+
it("should handle multiple types with single status", async () => {
|
|
1116
|
+
const result = await client.callTool("list_issues", {
|
|
1117
|
+
type: ["task", "feature"],
|
|
1118
|
+
status: "open",
|
|
1119
|
+
priority: "high",
|
|
1120
|
+
});
|
|
1121
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1122
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1123
|
+
expect(objects).toContain("F-mixed-high-open");
|
|
1124
|
+
expect(objects).not.toContain("T-mixed-high-progress");
|
|
1125
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1126
|
+
});
|
|
1127
|
+
it("should handle single type and status with multiple priorities", async () => {
|
|
1128
|
+
const result = await client.callTool("list_issues", {
|
|
1129
|
+
type: "task",
|
|
1130
|
+
status: "open",
|
|
1131
|
+
priority: ["high", "medium"],
|
|
1132
|
+
});
|
|
1133
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1134
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1135
|
+
expect(objects).toContain("T-mixed-medium-open");
|
|
1136
|
+
expect(objects).not.toContain("T-mixed-high-progress");
|
|
1137
|
+
});
|
|
1138
|
+
it("should handle mixed array and single value parameters", async () => {
|
|
1139
|
+
const result = await client.callTool("list_issues", {
|
|
1140
|
+
type: ["task", "feature"],
|
|
1141
|
+
status: ["open", "in-progress"],
|
|
1142
|
+
priority: "high",
|
|
1143
|
+
});
|
|
1144
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1145
|
+
expect(objects).toContain("T-mixed-high-open");
|
|
1146
|
+
expect(objects).toContain("T-mixed-high-progress");
|
|
1147
|
+
expect(objects).toContain("F-mixed-high-open");
|
|
1148
|
+
expect(objects).not.toContain("T-mixed-medium-open");
|
|
1149
|
+
});
|
|
1150
|
+
});
|
|
1151
|
+
describe("Backward Compatibility Validation", () => {
|
|
1152
|
+
beforeEach(async () => {
|
|
1153
|
+
// Create objects to test that existing single-value behavior is preserved
|
|
1154
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "task", "T-compat-single", (0, utils_1.createObjectContent)({
|
|
1155
|
+
id: "T-compat-single",
|
|
1156
|
+
title: "Compatibility Single Task",
|
|
1157
|
+
status: "open",
|
|
1158
|
+
priority: "high",
|
|
1159
|
+
}), { status: "open" });
|
|
1160
|
+
await (0, utils_1.createObjectFile)(testEnv.projectRoot, "feature", "F-compat-single", (0, utils_1.createObjectContent)({
|
|
1161
|
+
id: "F-compat-single",
|
|
1162
|
+
title: "Compatibility Single Feature",
|
|
1163
|
+
status: "in-progress",
|
|
1164
|
+
priority: "medium",
|
|
1165
|
+
}));
|
|
1166
|
+
});
|
|
1167
|
+
it("should preserve existing single value type filtering", async () => {
|
|
1168
|
+
const result = await client.callTool("list_issues", {
|
|
1169
|
+
type: "task",
|
|
1170
|
+
});
|
|
1171
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1172
|
+
const tasks = objects.filter((id) => id.startsWith("T-"));
|
|
1173
|
+
const nonTasks = objects.filter((id) => !id.startsWith("T-"));
|
|
1174
|
+
expect(tasks.length).toBeGreaterThan(0);
|
|
1175
|
+
expect(nonTasks.length).toBe(0);
|
|
1176
|
+
});
|
|
1177
|
+
it("should preserve existing single value status filtering", async () => {
|
|
1178
|
+
const result = await client.callTool("list_issues", {
|
|
1179
|
+
type: "task",
|
|
1180
|
+
status: "open",
|
|
1181
|
+
});
|
|
1182
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1183
|
+
expect(objects).toContain("T-compat-single");
|
|
1184
|
+
});
|
|
1185
|
+
it("should preserve existing single value priority filtering", async () => {
|
|
1186
|
+
const result = await client.callTool("list_issues", {
|
|
1187
|
+
type: "feature",
|
|
1188
|
+
priority: "medium",
|
|
1189
|
+
});
|
|
1190
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1191
|
+
expect(objects).toContain("F-compat-single");
|
|
1192
|
+
});
|
|
1193
|
+
it("should preserve existing combined single value filters", async () => {
|
|
1194
|
+
const result = await client.callTool("list_issues", {
|
|
1195
|
+
type: "task",
|
|
1196
|
+
status: "open",
|
|
1197
|
+
priority: "high",
|
|
1198
|
+
});
|
|
1199
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1200
|
+
expect(objects).toContain("T-compat-single");
|
|
1201
|
+
});
|
|
1202
|
+
it("should maintain existing error behavior for invalid single values", async () => {
|
|
1203
|
+
const result = await client.callTool("list_issues", {
|
|
1204
|
+
type: "invalid-type",
|
|
1205
|
+
});
|
|
1206
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1207
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1208
|
+
});
|
|
1209
|
+
});
|
|
1210
|
+
describe("Error Handling for Array Inputs", () => {
|
|
1211
|
+
it("should handle invalid array values for type parameter", async () => {
|
|
1212
|
+
const result = await client.callTool("list_issues", {
|
|
1213
|
+
type: ["invalid-type"],
|
|
1214
|
+
});
|
|
1215
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1216
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1217
|
+
});
|
|
1218
|
+
it("should handle mixed valid and invalid values in type array", async () => {
|
|
1219
|
+
const result = await client.callTool("list_issues", {
|
|
1220
|
+
type: ["task", "invalid-type"],
|
|
1221
|
+
});
|
|
1222
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1223
|
+
expect(result.content[0].text).toContain("Invalid type value: invalid-type");
|
|
1224
|
+
});
|
|
1225
|
+
it("should handle invalid array values for status parameter", async () => {
|
|
1226
|
+
const result = await client.callTool("list_issues", {
|
|
1227
|
+
type: "task",
|
|
1228
|
+
status: ["invalid-status"],
|
|
1229
|
+
});
|
|
1230
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1231
|
+
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
1232
|
+
});
|
|
1233
|
+
it("should handle mixed valid and invalid values in status array", async () => {
|
|
1234
|
+
const result = await client.callTool("list_issues", {
|
|
1235
|
+
type: "task",
|
|
1236
|
+
status: ["open", "invalid-status"],
|
|
1237
|
+
});
|
|
1238
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1239
|
+
expect(result.content[0].text).toContain("Invalid status value: invalid-status");
|
|
1240
|
+
});
|
|
1241
|
+
it("should handle invalid array values for priority parameter", async () => {
|
|
1242
|
+
const result = await client.callTool("list_issues", {
|
|
1243
|
+
type: "task",
|
|
1244
|
+
priority: ["invalid-priority"],
|
|
1245
|
+
});
|
|
1246
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1247
|
+
expect(result.content[0].text).toContain("Invalid priority value: invalid-priority");
|
|
1248
|
+
});
|
|
1249
|
+
it("should handle multiple invalid values in priority array", async () => {
|
|
1250
|
+
const result = await client.callTool("list_issues", {
|
|
1251
|
+
type: "task",
|
|
1252
|
+
priority: ["invalid1", "invalid2"],
|
|
1253
|
+
});
|
|
1254
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1255
|
+
expect(result.content[0].text).toContain("Invalid priority value");
|
|
1256
|
+
});
|
|
1257
|
+
it("should handle empty arrays as no filter provided", async () => {
|
|
1258
|
+
const result = await client.callTool("list_issues", {
|
|
1259
|
+
type: "task",
|
|
1260
|
+
status: [],
|
|
1261
|
+
});
|
|
1262
|
+
const objects = (0, utils_1.extractObjectIds)(result.content[0].text);
|
|
1263
|
+
// Empty array should be treated as no filter, so all tasks should be returned
|
|
1264
|
+
expect(Array.isArray(objects)).toBe(true);
|
|
1265
|
+
});
|
|
1266
|
+
it("should require at least one filter when type is omitted", async () => {
|
|
1267
|
+
const result = await client.callTool("list_issues", {});
|
|
1268
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1269
|
+
expect(result.content[0].text).toContain("At least one filter parameter (type, status, priority, or scope) must be provided");
|
|
1270
|
+
});
|
|
1271
|
+
it("should handle empty arrays in all parameters", async () => {
|
|
1272
|
+
const result = await client.callTool("list_issues", {
|
|
1273
|
+
type: [],
|
|
1274
|
+
status: [],
|
|
1275
|
+
priority: [],
|
|
1276
|
+
});
|
|
1277
|
+
expect(result.content[0].text).toContain("Error listing objects");
|
|
1278
|
+
expect(result.content[0].text).toContain("At least one filter parameter (type, status, priority, or scope) must be provided");
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
762
1281
|
});
|
|
763
1282
|
//# sourceMappingURL=listObjects.e2e.test.js.map
|