feat: Return scopes on executions (no-changelog) (#10310)

This commit is contained in:
Val
2024-08-07 10:19:09 +01:00
committed by GitHub
parent 6d8323fade
commit fa17391dbd
10 changed files with 94 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ describe('ExecutionService', () => {
mock(),
mock(),
mock(),
mock(),
);
});

View File

@@ -48,6 +48,16 @@ describe('GET /executions', () => {
const response2 = await testServer.authAgentFor(member).get('/executions').expect(200);
expect(response2.body.data.count).toBe(1);
});
test('should return a scopes array for each execution', async () => {
testServer.license.enable('feat:sharing');
const workflow = await createWorkflow({}, owner);
await shareWorkflowWithUsers(workflow, [member]);
await createSuccessfulExecution(workflow);
const response = await testServer.authAgentFor(member).get('/executions').expect(200);
expect(response.body.data.results[0].scopes).toContain('workflow:execute');
});
});
describe('GET /executions/:id', () => {