foreman-tasks 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc +2 -22
- data/app/controllers/foreman_tasks/api/tasks_controller.rb +1 -1
- data/{.babelrc.js → babel.config.js} +0 -0
- data/lib/foreman_tasks/engine.rb +1 -1
- data/lib/foreman_tasks/version.rb +1 -1
- data/package.json +17 -69
- data/test/controllers/api/tasks_controller_test.rb +9 -0
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Errors.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Locks.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Raw.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/RunningSteps.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Task.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskInfo.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.stories.js +6 -2
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsActions.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsReducer.test.js +1 -1
- data/webpack/ForemanTasks/Components/TaskDetails/__tests__/integration.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/PausedTasksCard/PausedTasksCard.stories.js +44 -40
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/PausedTasksCard/PausedTasksCard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/RunningTasksCard/RunningTasksCard.stories.js +45 -40
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/RunningTasksCard/RunningTasksCard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/ScheduledTasksCard/ScheduledTasksCard.stories.js +27 -22
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/ScheduledTasksCard/ScheduledTasksCard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.stories.js +61 -56
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/StoppedTasksCard/StoppedTasksCard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.stories.js +40 -35
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutCard/TasksDonutCard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutChart/TasksDonutChart.stories.js +21 -20
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/TasksDonutChart/TasksDonutChart.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/TasksCardsGrid.stories.js +40 -39
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/TasksCardsGrid.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.stories.js +16 -17
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksLabelsRow/TasksLabelsRow.test.js +1 -2
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/TimeDropDown.stories.mdx +57 -0
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/TimeDropDown.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.stories.js +36 -18
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboard.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardActions.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardSelectors.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/Components/CancelConfirm.js +53 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmationModals.js +56 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/ResumeConfirm.js +52 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ActionSelectButton.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/CancelConfirm.test.js +26 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ConfirmationModals.test.js +24 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ResumeConfirm.test.js +26 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionCell.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/TableSelectionHeaderCell.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/CancelConfirm.test.js.snap +65 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ConfirmationModals.test.js.snap +30 -0
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ResumeConfirm.test.js.snap +63 -0
- data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +22 -12
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +15 -18
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +6 -2
- data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +54 -18
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableReducer.js +5 -7
- data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +18 -16
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/SubTasksPage.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksIndexPage.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +7 -3
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTablePage.test.js +1 -1
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableReducer.test.js +6 -7
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +9 -3
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +9 -3
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +116 -18
- data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableReducer.test.js.snap +9 -16
- data/webpack/ForemanTasks/Components/TasksTable/index.js +3 -2
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js +4 -4
- data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +1 -1
- data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.test.js +1 -2
- data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.test.js +2 -2
- data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +3 -3
- data/webpack/ForemanTasks/ForemanTasks.test.js +1 -1
- data/webpack/ForemanTasks/Routes/ForemanTasksRouter.test.js +1 -1
- data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js +2 -3
- data/webpack/ForemanTasks/Routes/ShowTask/__tests__/ShowTask.test.js +1 -1
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js +10 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +4 -0
- metadata +16 -16
- data/.storybook/addons.js +0 -2
- data/.storybook/config.js +0 -7
- data/.storybook/webpack.config.js +0 -84
- data/webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/Components/TimeDropDown/TimeDropDown.stories.js +0 -23
- data/webpack/ForemanTasks/Components/TasksTable/Components/ActionConfirmation.js +0 -49
- data/webpack/ForemanTasks/Components/TasksTable/Components/CancelResumeConfirm.js +0 -51
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ActionConfirmation.test.js +0 -18
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/CancelResumeConfirm.test.js +0 -28
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ActionConfirmation.test.js.snap +0 -89
- data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/CancelResumeConfirm.test.js.snap +0 -37
- data/webpack/stories/index.js +0 -10
- data/webpack/stories/index.scss +0 -7
- data/webpack/test_setup.js +0 -7
@@ -8,19 +8,17 @@ import {
|
|
8
8
|
SELECT_ROWS,
|
9
9
|
UNSELECT_ROWS,
|
10
10
|
UNSELECT_ALL_ROWS,
|
11
|
-
|
12
|
-
CLOSED,
|
11
|
+
UPDATE_CLICKED,
|
13
12
|
} from './TasksTableConstants';
|
14
13
|
|
15
14
|
const initialState = Immutable({
|
16
15
|
selectedRows: [],
|
17
|
-
modalStatus: CLOSED,
|
18
16
|
});
|
19
17
|
|
20
18
|
export const TasksTableQueryReducer = (state = initialState, action) => {
|
21
|
-
const { type, payload } = action;
|
19
|
+
const { type, payload, response } = action;
|
22
20
|
const { subtotal, page, per_page: perPageString, action_name: actionName } =
|
23
|
-
|
21
|
+
response || {};
|
24
22
|
const ACTION_TYPES = createTableActionTypes(TASKS_TABLE_ID);
|
25
23
|
switch (type) {
|
26
24
|
case ACTION_TYPES.SUCCESS:
|
@@ -42,8 +40,8 @@ export const TasksTableQueryReducer = (state = initialState, action) => {
|
|
42
40
|
);
|
43
41
|
case UNSELECT_ALL_ROWS:
|
44
42
|
return state.set('selectedRows', []);
|
45
|
-
case
|
46
|
-
return state.set('
|
43
|
+
case UPDATE_CLICKED:
|
44
|
+
return state.set('clicked', payload.clicked);
|
47
45
|
default:
|
48
46
|
return state;
|
49
47
|
}
|
@@ -1,7 +1,7 @@
|
|
1
|
+
import { createSelector } from 'reselect';
|
1
2
|
import { translate as __ } from 'foremanReact/common/I18n';
|
2
3
|
import { selectForemanTasks } from '../../ForemanTasksSelectors';
|
3
4
|
import { getDuration } from './TasksTableHelpers';
|
4
|
-
import { CLOSED } from './TasksTableConstants';
|
5
5
|
|
6
6
|
export const selectTasksTable = state =>
|
7
7
|
selectForemanTasks(state).tasksTable || {};
|
@@ -24,21 +24,23 @@ export const selectActionName = state =>
|
|
24
24
|
export const selectSelectedRows = state =>
|
25
25
|
selectTasksTableQuery(state).selectedRows || [];
|
26
26
|
|
27
|
-
export const
|
28
|
-
selectTasksTableQuery(state).
|
29
|
-
|
30
|
-
export const selectResults =
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
27
|
+
export const selectClicked = state =>
|
28
|
+
selectTasksTableQuery(state).clicked || {};
|
29
|
+
|
30
|
+
export const selectResults = createSelector(
|
31
|
+
selectTasksTableContent,
|
32
|
+
({ results }) =>
|
33
|
+
results.map(result => ({
|
34
|
+
...result,
|
35
|
+
action:
|
36
|
+
result.action ||
|
37
|
+
(result.label ? result.label.replace(/::/g, ' ') : result.id),
|
38
|
+
username: result.username || '',
|
39
|
+
state: result.state + (result.frozen ? ` ${__('Disabled')}` : ''),
|
40
|
+
duration: getDuration(result.started_at, result.ended_at),
|
41
|
+
availableActions: result.available_actions,
|
42
|
+
}))
|
43
|
+
);
|
42
44
|
|
43
45
|
export const selectStatus = state => selectTasksTableContent(state).status;
|
44
46
|
|
@@ -23,9 +23,13 @@ export const minProps = {
|
|
23
23
|
by: 'q',
|
24
24
|
order: 'w',
|
25
25
|
},
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
openClickedModal: jest.fn(),
|
27
|
+
modalProps: {
|
28
|
+
cancelSelectedModal: {},
|
29
|
+
resumeSelectedModal: {},
|
30
|
+
cancelModal: {},
|
31
|
+
resumeModal: {},
|
32
|
+
},
|
29
33
|
};
|
30
34
|
|
31
35
|
export default {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testReducerSnapshotWithFixtures } from '
|
1
|
+
import { testReducerSnapshotWithFixtures } from '@theforeman/test';
|
2
2
|
import {
|
3
3
|
TASKS_TABLE_ID,
|
4
4
|
TASKS_TABLE_SET_SORT,
|
@@ -6,8 +6,7 @@ import {
|
|
6
6
|
SELECT_ROWS,
|
7
7
|
UNSELECT_ROWS,
|
8
8
|
UNSELECT_ALL_ROWS,
|
9
|
-
|
10
|
-
RESUME,
|
9
|
+
UPDATE_CLICKED,
|
11
10
|
} from '../TasksTableConstants';
|
12
11
|
import reducer from '../TasksTableReducer';
|
13
12
|
|
@@ -16,7 +15,7 @@ const fixtures = {
|
|
16
15
|
'should handle TASKS_TABLE_SUCCESS': {
|
17
16
|
action: {
|
18
17
|
type: `${TASKS_TABLE_ID}_SUCCESS`,
|
19
|
-
|
18
|
+
response: {
|
20
19
|
subtotal: 120,
|
21
20
|
page: 3,
|
22
21
|
per_page: 12,
|
@@ -53,10 +52,10 @@ const fixtures = {
|
|
53
52
|
type: UNSELECT_ALL_ROWS,
|
54
53
|
},
|
55
54
|
},
|
56
|
-
'should handle
|
55
|
+
'should handle UPDATE_CLICKED': {
|
57
56
|
action: {
|
58
|
-
type:
|
59
|
-
payload:
|
57
|
+
type: UPDATE_CLICKED,
|
58
|
+
payload: { clicked: 'task' },
|
60
59
|
},
|
61
60
|
},
|
62
61
|
};
|
data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap
CHANGED
@@ -6,7 +6,6 @@ exports[`SubTasksPage rendering render with minimal props 1`] = `
|
|
6
6
|
cancelTask={[MockFunction]}
|
7
7
|
getBreadcrumbs={[MockFunction]}
|
8
8
|
getTableItems={[MockFunction]}
|
9
|
-
hideSelcetedModal={[MockFunction]}
|
10
9
|
history={
|
11
10
|
Object {
|
12
11
|
"location": Object {
|
@@ -22,6 +21,15 @@ exports[`SubTasksPage rendering render with minimal props 1`] = `
|
|
22
21
|
},
|
23
22
|
}
|
24
23
|
}
|
24
|
+
modalProps={
|
25
|
+
Object {
|
26
|
+
"cancelModal": Object {},
|
27
|
+
"cancelSelectedModal": Object {},
|
28
|
+
"resumeModal": Object {},
|
29
|
+
"resumeSelectedModal": Object {},
|
30
|
+
}
|
31
|
+
}
|
32
|
+
openClickedModal={[MockFunction]}
|
25
33
|
pagination={
|
26
34
|
Object {
|
27
35
|
"page": 1,
|
@@ -39,8 +47,6 @@ exports[`SubTasksPage rendering render with minimal props 1`] = `
|
|
39
47
|
selectAllRows={[MockFunction]}
|
40
48
|
selectRow={[MockFunction]}
|
41
49
|
selectedRows={Array []}
|
42
|
-
showCancelSelcetedModal={[MockFunction]}
|
43
|
-
showResumeSelcetedModal={[MockFunction]}
|
44
50
|
sort={
|
45
51
|
Object {
|
46
52
|
"by": "q",
|
data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap
CHANGED
@@ -6,7 +6,6 @@ exports[`TasksIndexPage rendering render with minimal props 1`] = `
|
|
6
6
|
cancelTask={[MockFunction]}
|
7
7
|
getBreadcrumbs={[MockFunction]}
|
8
8
|
getTableItems={[MockFunction]}
|
9
|
-
hideSelcetedModal={[MockFunction]}
|
10
9
|
history={
|
11
10
|
Object {
|
12
11
|
"location": Object {
|
@@ -15,6 +14,15 @@ exports[`TasksIndexPage rendering render with minimal props 1`] = `
|
|
15
14
|
}
|
16
15
|
}
|
17
16
|
itemCount={2}
|
17
|
+
modalProps={
|
18
|
+
Object {
|
19
|
+
"cancelModal": Object {},
|
20
|
+
"cancelSelectedModal": Object {},
|
21
|
+
"resumeModal": Object {},
|
22
|
+
"resumeSelectedModal": Object {},
|
23
|
+
}
|
24
|
+
}
|
25
|
+
openClickedModal={[MockFunction]}
|
18
26
|
pagination={
|
19
27
|
Object {
|
20
28
|
"page": 1,
|
@@ -31,8 +39,6 @@ exports[`TasksIndexPage rendering render with minimal props 1`] = `
|
|
31
39
|
selectAllRows={[MockFunction]}
|
32
40
|
selectRow={[MockFunction]}
|
33
41
|
selectedRows={Array []}
|
34
|
-
showCancelSelcetedModal={[MockFunction]}
|
35
|
-
showResumeSelcetedModal={[MockFunction]}
|
36
42
|
sort={
|
37
43
|
Object {
|
38
44
|
"by": "q",
|
data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap
CHANGED
@@ -4,12 +4,40 @@ exports[`TasksTablePage rendering render with Breadcrubs 1`] = `
|
|
4
4
|
<div
|
5
5
|
className="tasks-table-wrapper"
|
6
6
|
>
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
<ConfirmationModals
|
8
|
+
modalProps={
|
9
|
+
Object {
|
10
|
+
"cancelModal": Object {
|
11
|
+
"modalOpen": true,
|
12
|
+
"setModalClosed": [MockFunction],
|
13
|
+
"setModalOpen": [MockFunction],
|
14
|
+
},
|
15
|
+
"cancelSelectedModal": Object {
|
16
|
+
"modalOpen": true,
|
17
|
+
"setModalClosed": [MockFunction],
|
18
|
+
"setModalOpen": [MockFunction],
|
19
|
+
},
|
20
|
+
"resumeModal": Object {
|
21
|
+
"modalOpen": true,
|
22
|
+
"setModalClosed": [MockFunction],
|
23
|
+
"setModalOpen": [MockFunction],
|
24
|
+
},
|
25
|
+
"resumeSelectedModal": Object {
|
26
|
+
"modalOpen": true,
|
27
|
+
"setModalClosed": [MockFunction],
|
28
|
+
"setModalOpen": [MockFunction],
|
29
|
+
},
|
30
|
+
}
|
31
|
+
}
|
12
32
|
selectedRowsLen={0}
|
33
|
+
tasksActions={
|
34
|
+
Object {
|
35
|
+
"cancelSelectedTasks": [Function],
|
36
|
+
"cancelTask": [Function],
|
37
|
+
"resumeSelectedTasks": [Function],
|
38
|
+
"resumeTask": [Function],
|
39
|
+
}
|
40
|
+
}
|
13
41
|
/>
|
14
42
|
<PageLayout
|
15
43
|
beforeToolbarComponent={
|
@@ -81,7 +109,6 @@ exports[`TasksTablePage rendering render with Breadcrubs 1`] = `
|
|
81
109
|
cancelTask={[MockFunction]}
|
82
110
|
error={null}
|
83
111
|
getTableItems={[MockFunction]}
|
84
|
-
hideSelcetedModal={[MockFunction]}
|
85
112
|
history={
|
86
113
|
Object {
|
87
114
|
"location": Object {
|
@@ -90,7 +117,31 @@ exports[`TasksTablePage rendering render with Breadcrubs 1`] = `
|
|
90
117
|
}
|
91
118
|
}
|
92
119
|
itemCount={2}
|
93
|
-
|
120
|
+
modalProps={
|
121
|
+
Object {
|
122
|
+
"cancelModal": Object {
|
123
|
+
"modalOpen": true,
|
124
|
+
"setModalClosed": [MockFunction],
|
125
|
+
"setModalOpen": [MockFunction],
|
126
|
+
},
|
127
|
+
"cancelSelectedModal": Object {
|
128
|
+
"modalOpen": true,
|
129
|
+
"setModalClosed": [MockFunction],
|
130
|
+
"setModalOpen": [MockFunction],
|
131
|
+
},
|
132
|
+
"resumeModal": Object {
|
133
|
+
"modalOpen": true,
|
134
|
+
"setModalClosed": [MockFunction],
|
135
|
+
"setModalOpen": [MockFunction],
|
136
|
+
},
|
137
|
+
"resumeSelectedModal": Object {
|
138
|
+
"modalOpen": true,
|
139
|
+
"setModalClosed": [MockFunction],
|
140
|
+
"setModalOpen": [MockFunction],
|
141
|
+
},
|
142
|
+
}
|
143
|
+
}
|
144
|
+
openClickedModal={[MockFunction]}
|
94
145
|
pagination={
|
95
146
|
Object {
|
96
147
|
"page": 1,
|
@@ -108,8 +159,6 @@ exports[`TasksTablePage rendering render with Breadcrubs 1`] = `
|
|
108
159
|
selectAllRows={[MockFunction]}
|
109
160
|
selectRow={[MockFunction]}
|
110
161
|
selectedRows={Array []}
|
111
|
-
showCancelSelcetedModal={[MockFunction]}
|
112
|
-
showResumeSelcetedModal={[MockFunction]}
|
113
162
|
sort={
|
114
163
|
Object {
|
115
164
|
"by": "q",
|
@@ -128,12 +177,40 @@ exports[`TasksTablePage rendering render with minimal props 1`] = `
|
|
128
177
|
<div
|
129
178
|
className="tasks-table-wrapper"
|
130
179
|
>
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
180
|
+
<ConfirmationModals
|
181
|
+
modalProps={
|
182
|
+
Object {
|
183
|
+
"cancelModal": Object {
|
184
|
+
"modalOpen": true,
|
185
|
+
"setModalClosed": [MockFunction],
|
186
|
+
"setModalOpen": [MockFunction],
|
187
|
+
},
|
188
|
+
"cancelSelectedModal": Object {
|
189
|
+
"modalOpen": true,
|
190
|
+
"setModalClosed": [MockFunction],
|
191
|
+
"setModalOpen": [MockFunction],
|
192
|
+
},
|
193
|
+
"resumeModal": Object {
|
194
|
+
"modalOpen": true,
|
195
|
+
"setModalClosed": [MockFunction],
|
196
|
+
"setModalOpen": [MockFunction],
|
197
|
+
},
|
198
|
+
"resumeSelectedModal": Object {
|
199
|
+
"modalOpen": true,
|
200
|
+
"setModalClosed": [MockFunction],
|
201
|
+
"setModalOpen": [MockFunction],
|
202
|
+
},
|
203
|
+
}
|
204
|
+
}
|
136
205
|
selectedRowsLen={0}
|
206
|
+
tasksActions={
|
207
|
+
Object {
|
208
|
+
"cancelSelectedTasks": [Function],
|
209
|
+
"cancelTask": [Function],
|
210
|
+
"resumeSelectedTasks": [Function],
|
211
|
+
"resumeTask": [Function],
|
212
|
+
}
|
213
|
+
}
|
137
214
|
/>
|
138
215
|
<PageLayout
|
139
216
|
beforeToolbarComponent={
|
@@ -188,7 +265,6 @@ exports[`TasksTablePage rendering render with minimal props 1`] = `
|
|
188
265
|
cancelTask={[MockFunction]}
|
189
266
|
error={null}
|
190
267
|
getTableItems={[MockFunction]}
|
191
|
-
hideSelcetedModal={[MockFunction]}
|
192
268
|
history={
|
193
269
|
Object {
|
194
270
|
"location": Object {
|
@@ -197,7 +273,31 @@ exports[`TasksTablePage rendering render with minimal props 1`] = `
|
|
197
273
|
}
|
198
274
|
}
|
199
275
|
itemCount={2}
|
200
|
-
|
276
|
+
modalProps={
|
277
|
+
Object {
|
278
|
+
"cancelModal": Object {
|
279
|
+
"modalOpen": true,
|
280
|
+
"setModalClosed": [MockFunction],
|
281
|
+
"setModalOpen": [MockFunction],
|
282
|
+
},
|
283
|
+
"cancelSelectedModal": Object {
|
284
|
+
"modalOpen": true,
|
285
|
+
"setModalClosed": [MockFunction],
|
286
|
+
"setModalOpen": [MockFunction],
|
287
|
+
},
|
288
|
+
"resumeModal": Object {
|
289
|
+
"modalOpen": true,
|
290
|
+
"setModalClosed": [MockFunction],
|
291
|
+
"setModalOpen": [MockFunction],
|
292
|
+
},
|
293
|
+
"resumeSelectedModal": Object {
|
294
|
+
"modalOpen": true,
|
295
|
+
"setModalClosed": [MockFunction],
|
296
|
+
"setModalOpen": [MockFunction],
|
297
|
+
},
|
298
|
+
}
|
299
|
+
}
|
300
|
+
openClickedModal={[MockFunction]}
|
201
301
|
pagination={
|
202
302
|
Object {
|
203
303
|
"page": 1,
|
@@ -215,8 +315,6 @@ exports[`TasksTablePage rendering render with minimal props 1`] = `
|
|
215
315
|
selectAllRows={[MockFunction]}
|
216
316
|
selectRow={[MockFunction]}
|
217
317
|
selectedRows={Array []}
|
218
|
-
showCancelSelcetedModal={[MockFunction]}
|
219
|
-
showResumeSelcetedModal={[MockFunction]}
|
220
318
|
sort={
|
221
319
|
Object {
|
222
320
|
"by": "q",
|
@@ -3,7 +3,6 @@
|
|
3
3
|
exports[`TasksTableReducer reducer should handle SELECT_ROWS 1`] = `
|
4
4
|
Object {
|
5
5
|
"tasksTableQuery": Object {
|
6
|
-
"modalStatus": "CLOSED",
|
7
6
|
"selectedRows": Array [
|
8
7
|
1,
|
9
8
|
2,
|
@@ -17,19 +16,9 @@ Object {
|
|
17
16
|
}
|
18
17
|
`;
|
19
18
|
|
20
|
-
exports[`TasksTableReducer reducer should handle TASKS_TABLE_SELECTED_MODAL 1`] = `
|
21
|
-
Object {
|
22
|
-
"tasksTableQuery": Object {
|
23
|
-
"modalStatus": "RESUME",
|
24
|
-
"selectedRows": Array [],
|
25
|
-
},
|
26
|
-
}
|
27
|
-
`;
|
28
|
-
|
29
19
|
exports[`TasksTableReducer reducer should handle TASKS_TABLE_SET_PAGINATION 1`] = `
|
30
20
|
Object {
|
31
21
|
"tasksTableQuery": Object {
|
32
|
-
"modalStatus": "CLOSED",
|
33
22
|
"selectedRows": Array [],
|
34
23
|
},
|
35
24
|
}
|
@@ -38,7 +27,6 @@ Object {
|
|
38
27
|
exports[`TasksTableReducer reducer should handle TASKS_TABLE_SET_SORT 1`] = `
|
39
28
|
Object {
|
40
29
|
"tasksTableQuery": Object {
|
41
|
-
"modalStatus": "CLOSED",
|
42
30
|
"selectedRows": Array [],
|
43
31
|
},
|
44
32
|
}
|
@@ -49,7 +37,6 @@ Object {
|
|
49
37
|
"tasksTableQuery": Object {
|
50
38
|
"actionName": undefined,
|
51
39
|
"itemCount": 120,
|
52
|
-
"modalStatus": "CLOSED",
|
53
40
|
"pagination": Object {
|
54
41
|
"page": 3,
|
55
42
|
"perPage": 12,
|
@@ -62,7 +49,6 @@ Object {
|
|
62
49
|
exports[`TasksTableReducer reducer should handle UNSELECT_ALL_ROWS 1`] = `
|
63
50
|
Object {
|
64
51
|
"tasksTableQuery": Object {
|
65
|
-
"modalStatus": "CLOSED",
|
66
52
|
"selectedRows": Array [],
|
67
53
|
},
|
68
54
|
}
|
@@ -71,7 +57,15 @@ Object {
|
|
71
57
|
exports[`TasksTableReducer reducer should handle UNSELECT_ROWS 1`] = `
|
72
58
|
Object {
|
73
59
|
"tasksTableQuery": Object {
|
74
|
-
"
|
60
|
+
"selectedRows": Array [],
|
61
|
+
},
|
62
|
+
}
|
63
|
+
`;
|
64
|
+
|
65
|
+
exports[`TasksTableReducer reducer should handle UPDATE_CLICKED 1`] = `
|
66
|
+
Object {
|
67
|
+
"tasksTableQuery": Object {
|
68
|
+
"clicked": "task",
|
75
69
|
"selectedRows": Array [],
|
76
70
|
},
|
77
71
|
}
|
@@ -80,7 +74,6 @@ Object {
|
|
80
74
|
exports[`TasksTableReducer reducer should return the initial state 1`] = `
|
81
75
|
Object {
|
82
76
|
"tasksTableQuery": Object {
|
83
|
-
"modalStatus": "CLOSED",
|
84
77
|
"selectedRows": Array [],
|
85
78
|
},
|
86
79
|
}
|