aboutsummaryrefslogtreecommitdiffstats
path: root/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js')
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js b/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js
index 99a56508..d3e9bda2 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogSagas-test.js
@@ -25,6 +25,7 @@ import {
LIMIT,
SEARCH_CHANGED
} from 'features/catalog/catalogConstants';
+import { WORKFLOW_STATUS } from 'features/workflow/workflowConstants';
import catalogApi from '../catalogApi';
import { fetchWorkflow, updateWorkflow } from 'features/catalog/catalogActions';
import catalogSaga, {
@@ -51,6 +52,7 @@ describe('Catalog Sagas', () => {
const sort = {
[NAME]: DESC
};
+ const status = WORKFLOW_STATUS.ACTIVE;
const offset = 0;
const searchNameFilter = undefined;
const data = {
@@ -61,6 +63,7 @@ describe('Catalog Sagas', () => {
hasMore: false,
total: 2
},
+ status: WORKFLOW_STATUS.ACTIVE,
searchNameFilter: 'w',
items: [
{
@@ -88,18 +91,19 @@ describe('Catalog Sagas', () => {
dispatch: action => dispatched.push(action)
},
fetchWorkflowSaga,
- fetchWorkflow(sort, offset)
+ fetchWorkflow({ sort, offset, status })
).done;
expect(dispatched).toEqual(
expect.arrayContaining([updateWorkflow({ sort, ...data })])
);
- expect(catalogApi.getWorkflows).toBeCalledWith(
+ expect(catalogApi.getWorkflows).toBeCalledWith({
sort,
- LIMIT,
- offset + LIMIT,
+ status,
+ limit: LIMIT,
+ offset: offset + LIMIT,
searchNameFilter
- );
+ });
});
});