Skip to content

Commit

Permalink
fix(editor): Fix filter execution by "Queued" (#10987)
Browse files Browse the repository at this point in the history
  • Loading branch information
r00gm authored Sep 27, 2024
1 parent 5f89e3a commit 819d20f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/editor-ui/src/utils/__tests__/executionUtils.spec.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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']),
);
});
});
});
3 changes: 3 additions & 0 deletions packages/editor-ui/src/utils/executionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export const executionFilterToQueryFilter = (
case 'canceled':
queryFilter.status = ['canceled'];
break;
case 'new':
queryFilter.status = ['new'];
break;
}

return queryFilter;
Expand Down

0 comments on commit 819d20f

Please sign in to comment.