fix(core): Fix Filtering of Workflow by Tags (#5570)

This commit is contained in:
Csaba Tuncsik
2023-02-27 12:25:45 +01:00
committed by GitHub
parent 1942fd8232
commit ea2035b510
3 changed files with 12 additions and 1 deletions

View File

@@ -154,6 +154,7 @@ describe('GET /workflows', () => {
test('should return workflows without nodes, sharing and credential usage details', async () => {
const owner = await testDb.createUser({ globalRole: globalOwnerRole });
const member = await testDb.createUser({ globalRole: globalMemberRole });
const tag = await testDb.createTag({ name: 'test' });
const savedCredential = await saveCredential(randomCredentialPayload(), { user: owner });
@@ -175,6 +176,7 @@ describe('GET /workflows', () => {
},
},
],
tags: [tag],
},
owner,
);
@@ -193,6 +195,14 @@ describe('GET /workflows', () => {
expect(fetchedWorkflow.sharedWith).not.toBeDefined()
expect(fetchedWorkflow.usedCredentials).not.toBeDefined()
expect(fetchedWorkflow.nodes).not.toBeDefined()
expect(fetchedWorkflow.tags).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: expect.any(String),
name: expect.any(String)
})
])
)
});
});