mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Allow filtering workflows by availableInMCP (#18646)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user