feat(core): Allow filtering workflows by availableInMCP (#18646)

This commit is contained in:
Ricardo Espinoza
2025-09-02 16:21:12 -04:00
committed by GitHub
parent a12e782225
commit 6432555082
5 changed files with 46 additions and 0 deletions

View File

@@ -859,6 +859,21 @@ describe('GET /workflows', () => {
});
});
test('should filter workflows by field: availableInMCP', async () => {
const workflow1 = await createWorkflow({ settings: { availableInMCP: true } }, owner);
await createWorkflow({ settings: {} }, owner);
const response = await authOwnerAgent
.get('/workflows')
.query('filter={ "availableInMCP": true }')
.expect(200);
expect(response.body).toEqual({
count: 1,
data: [objectContaining({ id: workflow1.id })],
});
});
test('should filter workflows by field: tags (AND operator)', async () => {
const workflow1 = await createWorkflow({ name: 'First' }, owner);
const workflow2 = await createWorkflow({ name: 'Second' }, owner);