mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
fix(editor): Fix filter execution by "Queued" (#10987)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
5f89e3a01c
commit
819d20fa2e
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { displayForm, openPopUpWindow } from '../executionUtils';
|
||||
import { displayForm, openPopUpWindow, executionFilterToQueryFilter } from '../executionUtils';
|
||||
import type { INode, IRunData, IPinData } from 'n8n-workflow';
|
||||
|
||||
const FORM_TRIGGER_NODE_TYPE = 'formTrigger';
|
||||
|
@ -125,4 +125,12 @@ describe('displayForm', () => {
|
|||
|
||||
expect(openPopUpWindow).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe('executionFilterToQueryFilter()', () => {
|
||||
it('adds "new" to the filter', () => {
|
||||
expect(executionFilterToQueryFilter({ status: 'new' }).status).toStrictEqual(
|
||||
expect.arrayContaining(['new']),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -64,6 +64,9 @@ export const executionFilterToQueryFilter = (
|
|||
case 'canceled':
|
||||
queryFilter.status = ['canceled'];
|
||||
break;
|
||||
case 'new':
|
||||
queryFilter.status = ['new'];
|
||||
break;
|
||||
}
|
||||
|
||||
return queryFilter;
|
||||
|
|
Loading…
Reference in a new issue