mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(API): Add running status query on the executions public api endpoint (#19205)
Co-authored-by: Konstantin Tieber <46342664+konstantintieber@users.noreply.github.com>
This commit is contained in:
@@ -402,12 +402,13 @@ describe('GET /executions', () => {
|
||||
});
|
||||
|
||||
describe('with query status', () => {
|
||||
type AllowedQueryStatus = 'success' | 'error' | 'canceled' | 'waiting';
|
||||
type AllowedQueryStatus = 'canceled' | 'error' | 'running' | 'success' | 'waiting';
|
||||
test.each`
|
||||
queryStatus | entityStatus
|
||||
${'canceled'} | ${'canceled'}
|
||||
${'error'} | ${'error'}
|
||||
${'error'} | ${'crashed'}
|
||||
${'running'} | ${'running'}
|
||||
${'success'} | ${'success'}
|
||||
${'waiting'} | ${'waiting'}
|
||||
`(
|
||||
@@ -419,6 +420,10 @@ describe('GET /executions', () => {
|
||||
const workflow = await createWorkflow({}, owner);
|
||||
|
||||
await createdExecutionWithStatus(workflow, queryStatus === 'success' ? 'error' : 'success');
|
||||
if (queryStatus !== 'running') {
|
||||
// ensure there is a running execution that gets excluded unless filtering by `running`
|
||||
await createdExecutionWithStatus(workflow, 'running');
|
||||
}
|
||||
|
||||
const expectedExecution = await createdExecutionWithStatus(workflow, entityStatus);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user