foreman-tasks 12.2.3 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/foreman_tasks/tasks_controller.rb +0 -5
  3. data/config/routes.rb +3 -2
  4. data/lib/foreman_tasks/engine.rb +2 -2
  5. data/lib/foreman_tasks/version.rb +1 -1
  6. data/test/controllers/tasks_controller_test.rb +0 -9
  7. data/test/foreman_tasks_test_helper.rb +2 -2
  8. data/test/integration/tasks_test.rb +17 -0
  9. data/test/test_plugin_helper.rb +8 -0
  10. data/webpack/ForemanTasks/Components/TaskActions/TaskAction.test.js +212 -42
  11. data/webpack/ForemanTasks/Components/TaskDetails/Components/Errors.js +224 -55
  12. data/webpack/ForemanTasks/Components/TaskDetails/Components/Errors.scss +41 -0
  13. data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskInfo.js +6 -51
  14. data/webpack/ForemanTasks/Components/TaskDetails/Components/TaskSkeleton.js +1 -6
  15. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Errors.test.js +159 -11
  16. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Task.test.js +0 -2
  17. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskButtons.test.js +0 -2
  18. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.js +29 -15
  19. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetails.scss +1 -5
  20. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsConstants.js +2 -1
  21. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +20 -5
  22. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.fixtures.js +1 -1
  23. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js +97 -10
  24. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsSelectors.test.js +81 -0
  25. data/webpack/ForemanTasks/Components/TaskDetails/index.js +6 -4
  26. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboard.test.js +94 -7
  27. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardActions.test.js +97 -16
  28. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js +112 -46
  29. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardSelectors.test.js +103 -15
  30. data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +1 -1
  31. data/webpack/ForemanTasks/Components/common/taskResultIcon.js +53 -0
  32. data/webpack/ForemanTasks/Routes/ShowTaskDetails/TaskDetailsPage.js +74 -0
  33. data/webpack/ForemanTasks/Routes/ShowTaskDetails/__tests__/TaskDetailsPage.test.js +265 -0
  34. data/webpack/Routes/routes.js +6 -0
  35. data/webpack/Routes/routes.test.js +16 -5
  36. metadata +10 -7
  37. data/app/views/foreman_tasks/tasks/show.html.erb +0 -18
  38. data/webpack/ForemanTasks/Components/TaskActions/__snapshots__/TaskAction.test.js.snap +0 -233
  39. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboard.test.js.snap +0 -51
  40. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardActions.test.js.snap +0 -151
  41. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardReducer.test.js.snap +0 -275
  42. data/webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardSelectors.test.js.snap +0 -119
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import TasksTableIndexPage from '../ForemanTasks/Components/TasksTable/TasksIndexPage';
3
+ import TaskDetailsPage from '../ForemanTasks/Routes/ShowTaskDetails/TaskDetailsPage';
3
4
 
4
5
  const ForemanTasksRoutes = [
5
6
  {
@@ -7,6 +8,11 @@ const ForemanTasksRoutes = [
7
8
  exact: true,
8
9
  render: props => <TasksTableIndexPage {...props} />,
9
10
  },
11
+ {
12
+ path: '/foreman_tasks/tasks/:id',
13
+ exact: true,
14
+ render: props => <TaskDetailsPage {...props} />,
15
+ },
10
16
  {
11
17
  path: '/foreman_tasks/tasks/:id/sub_tasks',
12
18
  exact: true,
@@ -12,6 +12,14 @@ jest.mock(
12
12
  }
13
13
  );
14
14
 
15
+ jest.mock(
16
+ '../ForemanTasks/Routes/ShowTaskDetails/TaskDetailsPage',
17
+ () =>
18
+ function TaskDetailsPageStub() {
19
+ return <div data-testid="task-details-page-stub" />;
20
+ }
21
+ );
22
+
15
23
  const routerProps = {
16
24
  history: { push: jest.fn(), replace: jest.fn(), go: jest.fn() },
17
25
  location: {
@@ -34,6 +42,7 @@ describe('ForemanTasks routes', () => {
34
42
  ForemanTasksRoutes.map(({ path, exact }) => ({ path, exact }))
35
43
  ).toEqual([
36
44
  { path: '/foreman_tasks/tasks', exact: true },
45
+ { path: '/foreman_tasks/tasks/:id', exact: true },
37
46
  { path: '/foreman_tasks/tasks/:id/sub_tasks', exact: true },
38
47
  ]);
39
48
  });
@@ -53,9 +62,9 @@ describe('ForemanTasks routes', () => {
53
62
  ...routerProps,
54
63
  match: {
55
64
  ...routerProps.match,
56
- params: { id: '7' },
57
- path: '/foreman_tasks/tasks/:id/sub_tasks',
58
- url: '/foreman_tasks/tasks/7/sub_tasks',
65
+ params: { id: '99' },
66
+ path: '/foreman_tasks/tasks/:id',
67
+ url: '/foreman_tasks/tasks/99',
59
68
  },
60
69
  },
61
70
  ];
@@ -63,8 +72,10 @@ describe('ForemanTasks routes', () => {
63
72
  ForemanTasksRoutes.forEach((route, index) => {
64
73
  const { unmount } = render(route.render(propsByIndex[index]));
65
74
 
66
- if (index === 2) {
67
- expect(screen.getByTestId('show-task-stub')).toBeInTheDocument();
75
+ if (index === 1) {
76
+ expect(
77
+ screen.getByTestId('task-details-page-stub')
78
+ ).toBeInTheDocument();
68
79
  } else {
69
80
  expect(
70
81
  screen.getByTestId('tasks-table-index-stub')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.3
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
@@ -219,7 +219,6 @@ files:
219
219
  - app/views/foreman_tasks/tasks/_lock_card.html.erb
220
220
  - app/views/foreman_tasks/tasks/dashboard/_latest_tasks_in_error_warning.html.erb
221
221
  - app/views/foreman_tasks/tasks/dashboard/_tasks_status.html.erb
222
- - app/views/foreman_tasks/tasks/show.html.erb
223
222
  - app/views/tasks_mailer/long_tasks.html.erb
224
223
  - app/views/tasks_mailer/long_tasks.text.erb
225
224
  - babel.config.js
@@ -331,6 +330,7 @@ files:
331
330
  - test/graphql/queries/tasks_query_test.rb
332
331
  - test/helpers/foreman_tasks/foreman_tasks_helper_test.rb
333
332
  - test/helpers/foreman_tasks/tasks_helper_test.rb
333
+ - test/integration/tasks_test.rb
334
334
  - test/lib/actions/middleware/keep_current_request_id_test.rb
335
335
  - test/lib/actions/middleware/keep_current_taxonomies_test.rb
336
336
  - test/lib/actions/middleware/keep_current_timezone_test.rb
@@ -343,6 +343,7 @@ files:
343
343
  - test/support/dummy_task_group.rb
344
344
  - test/support/history_tasks_builder.rb
345
345
  - test/tasks/generate_task_actions_test.rb
346
+ - test/test_plugin_helper.rb
346
347
  - test/unit/actions/action_with_sub_plans_test.rb
347
348
  - test/unit/actions/bulk_action_test.rb
348
349
  - test/unit/actions/proxy_action_test.rb
@@ -368,10 +369,10 @@ files:
368
369
  - webpack/ForemanTasks/Components/TaskActions/TaskActionHelpers.js
369
370
  - webpack/ForemanTasks/Components/TaskActions/TaskActionHelpers.test.js
370
371
  - webpack/ForemanTasks/Components/TaskActions/TaskActionsConstants.js
371
- - webpack/ForemanTasks/Components/TaskActions/__snapshots__/TaskAction.test.js.snap
372
372
  - webpack/ForemanTasks/Components/TaskActions/index.js
373
373
  - webpack/ForemanTasks/Components/TaskDetails/Components/Dependencies.js
374
374
  - webpack/ForemanTasks/Components/TaskDetails/Components/Errors.js
375
+ - webpack/ForemanTasks/Components/TaskDetails/Components/Errors.scss
375
376
  - webpack/ForemanTasks/Components/TaskDetails/Components/Locks.js
376
377
  - webpack/ForemanTasks/Components/TaskDetails/Components/Raw.js
377
378
  - webpack/ForemanTasks/Components/TaskDetails/Components/RunningSteps.js
@@ -398,6 +399,7 @@ files:
398
399
  - webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.fixtures.js
399
400
  - webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js
400
401
  - webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsActions.test.js
402
+ - webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetailsSelectors.test.js
401
403
  - webpack/ForemanTasks/Components/TaskDetails/index.js
402
404
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/PausedTasksCard/PausedTasksCard.js
403
405
  - webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/Components/PausedTasksCard/PausedTasksCard.test.js
@@ -447,10 +449,6 @@ files:
447
449
  - webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardHelper.test.js
448
450
  - webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardReducer.test.js
449
451
  - webpack/ForemanTasks/Components/TasksDashboard/__tests__/TasksDashboardSelectors.test.js
450
- - webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboard.test.js.snap
451
- - webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardActions.test.js.snap
452
- - webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardReducer.test.js.snap
453
- - webpack/ForemanTasks/Components/TasksDashboard/__tests__/__snapshots__/TasksDashboardSelectors.test.js.snap
454
452
  - webpack/ForemanTasks/Components/TasksDashboard/index.js
455
453
  - webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js
456
454
  - webpack/ForemanTasks/Components/TasksTable/Components/CellActionButton.js
@@ -475,9 +473,12 @@ files:
475
473
  - webpack/ForemanTasks/Components/common/ClickConfirmation/index.js
476
474
  - webpack/ForemanTasks/Components/common/ToastsHelpers/ToastTypesConstants.js
477
475
  - webpack/ForemanTasks/Components/common/ToastsHelpers/index.js
476
+ - webpack/ForemanTasks/Components/common/taskResultIcon.js
478
477
  - webpack/ForemanTasks/Components/common/urlHelpers.js
479
478
  - webpack/ForemanTasks/ForemanTasksReducers.js
480
479
  - webpack/ForemanTasks/ForemanTasksSelectors.js
480
+ - webpack/ForemanTasks/Routes/ShowTaskDetails/TaskDetailsPage.js
481
+ - webpack/ForemanTasks/Routes/ShowTaskDetails/__tests__/TaskDetailsPage.test.js
481
482
  - webpack/Routes/routes.js
482
483
  - webpack/Routes/routes.test.js
483
484
  - webpack/global_index.js
@@ -523,6 +524,7 @@ test_files:
523
524
  - test/graphql/queries/tasks_query_test.rb
524
525
  - test/helpers/foreman_tasks/foreman_tasks_helper_test.rb
525
526
  - test/helpers/foreman_tasks/tasks_helper_test.rb
527
+ - test/integration/tasks_test.rb
526
528
  - test/lib/actions/middleware/keep_current_request_id_test.rb
527
529
  - test/lib/actions/middleware/keep_current_taxonomies_test.rb
528
530
  - test/lib/actions/middleware/keep_current_timezone_test.rb
@@ -535,6 +537,7 @@ test_files:
535
537
  - test/support/dummy_task_group.rb
536
538
  - test/support/history_tasks_builder.rb
537
539
  - test/tasks/generate_task_actions_test.rb
540
+ - test/test_plugin_helper.rb
538
541
  - test/unit/actions/action_with_sub_plans_test.rb
539
542
  - test/unit/actions/bulk_action_test.rb
540
543
  - test/unit/actions/proxy_action_test.rb
@@ -1,18 +0,0 @@
1
- <% stylesheet 'foreman_tasks/foreman_tasks' %>
2
- <% content_for(:javascripts) do %>
3
- <%= webpacked_plugins_js_for :'foreman-tasks' %>
4
- <% end %>
5
- <% content_for(:stylesheets) do %>
6
- <%= webpacked_plugins_css_for :'foreman-tasks' %>
7
- <% end %>
8
-
9
- <% title _("Details of %s task") % @task.to_s %>
10
-
11
- <%= breadcrumbs(
12
- items: breadcrumb_items,
13
- name_field: 'action',
14
- resource_url: foreman_tasks_api_tasks_path,
15
- switcher_item_url: foreman_tasks_task_path(:id => ':id')
16
- ) %>
17
-
18
- <%= react_component('TaskDetails') %>
@@ -1,233 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Tasks actions should cancelTaskRequest and fail 1`] = `
4
- Array [
5
- Array [
6
- Object {
7
- "payload": Object {
8
- "message": Object {
9
- "message": "Trying to cancel some-name task",
10
- "type": "info",
11
- },
12
- },
13
- "type": "TOASTS_ADD",
14
- },
15
- ],
16
- Array [
17
- Object {
18
- "type": "TASKS_CANCEL_REQUEST",
19
- },
20
- ],
21
- Array [
22
- Object {
23
- "payload": [Error: Network Error],
24
- "type": "TASKS_CANCEL_FAILURE",
25
- },
26
- ],
27
- Array [
28
- Object {
29
- "payload": Object {
30
- "message": Object {
31
- "message": "some-name Task execution task has to be cancellable",
32
- "type": "warning",
33
- },
34
- },
35
- "type": "TOASTS_ADD",
36
- },
37
- ],
38
- ]
39
- `;
40
-
41
- exports[`Tasks actions should cancelTaskRequest and succeed 1`] = `
42
- Array [
43
- Array [
44
- Object {
45
- "payload": Object {
46
- "message": Object {
47
- "message": "Trying to cancel some-name task",
48
- "type": "info",
49
- },
50
- },
51
- "type": "TOASTS_ADD",
52
- },
53
- ],
54
- Array [
55
- Object {
56
- "type": "TASKS_CANCEL_REQUEST",
57
- },
58
- ],
59
- Array [
60
- Object {
61
- "type": "TASKS_CANCEL_SUCCESS",
62
- },
63
- ],
64
- Array [
65
- Object {
66
- "payload": Object {
67
- "message": Object {
68
- "message": "some-name Task execution was cancelled",
69
- "type": "success",
70
- },
71
- },
72
- "type": "TOASTS_ADD",
73
- },
74
- ],
75
- ]
76
- `;
77
-
78
- exports[`Tasks actions should forceCancelTaskRequest and fail 1`] = `
79
- Array [
80
- Array [
81
- Object {
82
- "type": "TASKS_FORCE_CANCEL_REQUEST",
83
- },
84
- ],
85
- Array [
86
- Object {
87
- "type": "TASKS_FORCE_CANCEL_FAILURE",
88
- },
89
- ],
90
- Array [
91
- Object {
92
- "payload": Object {
93
- "message": Object {
94
- "message": "some-name Task execution cannot be cancelled with force at the moment.",
95
- "type": "warning",
96
- },
97
- },
98
- "type": "TOASTS_ADD",
99
- },
100
- ],
101
- ]
102
- `;
103
-
104
- exports[`Tasks actions should forceCancelTaskRequest and succeed 1`] = `
105
- Array [
106
- Array [
107
- Object {
108
- "type": "TASKS_FORCE_CANCEL_REQUEST",
109
- },
110
- ],
111
- Array [
112
- Object {
113
- "type": "TASKS_FORCE_CANCEL_SUCCESS",
114
- },
115
- ],
116
- Array [
117
- Object {
118
- "payload": Object {
119
- "message": Object {
120
- "message": "some-name Task execution resources were unlocked with force.",
121
- "type": "success",
122
- },
123
- },
124
- "type": "TOASTS_ADD",
125
- },
126
- ],
127
- ]
128
- `;
129
-
130
- exports[`Tasks actions should resumeTaskRequest and fail 1`] = `
131
- Array [
132
- Array [
133
- Object {
134
- "type": "TASKS_RESUME_REQUEST",
135
- },
136
- ],
137
- Array [
138
- Object {
139
- "payload": [Error: Network Error],
140
- "type": "TASKS_RESUME_FAILURE",
141
- },
142
- ],
143
- Array [
144
- Object {
145
- "payload": Object {
146
- "message": Object {
147
- "message": "some-name Task execution could not be resumed",
148
- "type": "error",
149
- },
150
- },
151
- "type": "TOASTS_ADD",
152
- },
153
- ],
154
- ]
155
- `;
156
-
157
- exports[`Tasks actions should resumeTaskRequest and succeed 1`] = `
158
- Array [
159
- Array [
160
- Object {
161
- "type": "TASKS_RESUME_REQUEST",
162
- },
163
- ],
164
- Array [
165
- Object {
166
- "type": "TASKS_RESUME_SUCCESS",
167
- },
168
- ],
169
- Array [
170
- Object {
171
- "payload": Object {
172
- "message": Object {
173
- "message": "some-name Task execution was resumed",
174
- "type": "success",
175
- },
176
- },
177
- "type": "TOASTS_ADD",
178
- },
179
- ],
180
- ]
181
- `;
182
-
183
- exports[`Tasks actions should unlockTaskRequest and fail 1`] = `
184
- Array [
185
- Array [
186
- Object {
187
- "type": "TASKS_FORCE_CANCEL_REQUEST",
188
- },
189
- ],
190
- Array [
191
- Object {
192
- "type": "TASKS_FORCE_CANCEL_FAILURE",
193
- },
194
- ],
195
- Array [
196
- Object {
197
- "payload": Object {
198
- "message": Object {
199
- "message": "some-name Task execution cannot be cancelled with force at the moment.",
200
- "type": "warning",
201
- },
202
- },
203
- "type": "TOASTS_ADD",
204
- },
205
- ],
206
- ]
207
- `;
208
-
209
- exports[`Tasks actions should unlockTaskRequest and succeed 1`] = `
210
- Array [
211
- Array [
212
- Object {
213
- "type": "TASKS_UNLOCK_REQUEST",
214
- },
215
- ],
216
- Array [
217
- Object {
218
- "type": "TASKS_UNLOCK_SUCCESS",
219
- },
220
- ],
221
- Array [
222
- Object {
223
- "payload": Object {
224
- "message": Object {
225
- "message": "some-name Task execution resources were unlocked ",
226
- "type": "success",
227
- },
228
- },
229
- "type": "TOASTS_ADD",
230
- },
231
- ],
232
- ]
233
- `;
@@ -1,51 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TasksDashboard rendering render without Props 1`] = `
4
- <div
5
- className="tasks-dashboard-grid"
6
- >
7
- <TasksTimeRow
8
- time="H24"
9
- updateTime={[Function]}
10
- />
11
- <TasksCardsGrid
12
- data={
13
- Object {
14
- "paused": Object {
15
- "last": 0,
16
- "older": 0,
17
- },
18
- "running": Object {
19
- "last": 0,
20
- "older": 0,
21
- },
22
- "scheduled": 0,
23
- "stopped": Object {
24
- "other": 0,
25
- "results": Object {
26
- "error": Object {
27
- "last": 0,
28
- "total": 0,
29
- },
30
- "success": Object {
31
- "last": 0,
32
- "total": 0,
33
- },
34
- "warning": Object {
35
- "last": 0,
36
- "total": 0,
37
- },
38
- },
39
- },
40
- }
41
- }
42
- query={Object {}}
43
- time="H24"
44
- updateQuery={[Function]}
45
- />
46
- <TasksLabelsRow
47
- query={Object {}}
48
- updateQuery={[Function]}
49
- />
50
- </div>
51
- `;
@@ -1,151 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TasksDashboard - Actions should fetch-tasks-summary and fail 1`] = `
4
- Array [
5
- Array [
6
- Object {
7
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST",
8
- },
9
- ],
10
- Array [
11
- Object {
12
- "payload": [Error: wrong time],
13
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_FAILURE",
14
- },
15
- ],
16
- ]
17
- `;
18
-
19
- exports[`TasksDashboard - Actions should fetch-tasks-summary and success 1`] = `
20
- Array [
21
- Array [
22
- Object {
23
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST",
24
- },
25
- ],
26
- Array [
27
- Object {
28
- "payload": Object {
29
- "tasksSummary": Object {
30
- "paused": Object {
31
- "recent": 0,
32
- "total": 54,
33
- },
34
- "running": Object {
35
- "recent": 0,
36
- "total": 3,
37
- },
38
- "scheduled": Object {
39
- "recent": 0,
40
- "total": 7,
41
- },
42
- "stopped": Object {
43
- "by_result": Object {
44
- "cancelled": Object {
45
- "recent": 0,
46
- "total": 105,
47
- },
48
- "error": Object {
49
- "recent": 0,
50
- "total": 121,
51
- },
52
- "success": Object {
53
- "recent": 0,
54
- "total": 532,
55
- },
56
- "warning": Object {
57
- "recent": 0,
58
- "total": 10,
59
- },
60
- },
61
- "recent": 0,
62
- "total": 768,
63
- },
64
- },
65
- },
66
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_SUCCESS",
67
- },
68
- ],
69
- ]
70
- `;
71
-
72
- exports[`TasksDashboard - Actions should fetch-tasks-summary for subtasks and success 1`] = `
73
- Array [
74
- Array [
75
- Object {
76
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_REQUEST",
77
- },
78
- ],
79
- Array [
80
- Object {
81
- "payload": Object {
82
- "tasksSummary": Object {
83
- "paused": Object {
84
- "recent": 0,
85
- "total": 7,
86
- },
87
- "running": Object {
88
- "recent": 0,
89
- "total": 3,
90
- },
91
- "scheduled": Object {
92
- "recent": 0,
93
- "total": 7,
94
- },
95
- "stopped": Object {
96
- "by_result": Object {
97
- "cancelled": Object {
98
- "recent": 0,
99
- "total": 0,
100
- },
101
- "error": Object {
102
- "recent": 0,
103
- "total": 0,
104
- },
105
- "success": Object {
106
- "recent": 0,
107
- "total": 0,
108
- },
109
- "warning": Object {
110
- "recent": 0,
111
- "total": 0,
112
- },
113
- },
114
- "recent": 0,
115
- "total": 0,
116
- },
117
- },
118
- },
119
- "type": "FOREMAN_TASKS_DASHBOARD_FETCH_TASKS_SUMMARY_SUCCESS",
120
- },
121
- ],
122
- ]
123
- `;
124
-
125
- exports[`TasksDashboard - Actions should initialize-dashboard 1`] = `
126
- Object {
127
- "payload": Object {
128
- "query": "some-query",
129
- "time": "some-time",
130
- },
131
- "type": "FOREMAN_TASKS_DASHBOARD_INIT",
132
- }
133
- `;
134
-
135
- exports[`TasksDashboard - Actions should update-query 1`] = `
136
- Array [
137
- Array [
138
- Object {
139
- "payload": "some-query",
140
- "type": "FOREMAN_TASKS_DASHBOARD_UPDATE_QUERY",
141
- },
142
- ],
143
- ]
144
- `;
145
-
146
- exports[`TasksDashboard - Actions should update-time 1`] = `
147
- Object {
148
- "payload": "some-time",
149
- "type": "FOREMAN_TASKS_DASHBOARD_UPDATE_TIME",
150
- }
151
- `;