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

This commit is contained in:
Raúl Gómez Morales 2024-09-27 11:00:21 +02:00 committed by GitHub
parent 5f89e3a01c
commit 819d20fa2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -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']),
);
});
});
});

View file

@ -64,6 +64,9 @@ export const executionFilterToQueryFilter = (
case 'canceled':
queryFilter.status = ['canceled'];
break;
case 'new':
queryFilter.status = ['new'];
break;
}
return queryFilter;