foreman_webhooks 1.0.0 → 1.1.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/webhooks_controller.rb +7 -1
  3. data/app/controllers/concerns/foreman_webhooks/controller/parameters/webhook.rb +1 -0
  4. data/app/controllers/webhooks_controller.rb +1 -24
  5. data/app/services/foreman_webhooks/webhook_service.rb +1 -1
  6. data/app/views/foreman_webhooks/webhook_templates/remote_execution_-_host_job.erb +0 -1
  7. data/config/routes.rb +6 -2
  8. data/lib/foreman_webhooks/engine.rb +2 -2
  9. data/lib/foreman_webhooks/version.rb +1 -1
  10. data/package.json +6 -6
  11. data/webpack/ForemanWebhooks/Routes/ForemanWebhooksRoutes.js +2 -2
  12. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/ForemanFormikField.js +117 -0
  13. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/WebhookFormTabs.css +7 -0
  14. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/WebhookFormTabs.js +163 -0
  15. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js +69 -0
  16. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookFormSelectors.js +58 -0
  17. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js +51 -0
  18. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/__snapshots__/WebhookForm.test.js.snap +510 -0
  19. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/constants.js +9 -0
  20. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/index.js +73 -0
  21. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksIndexPage/index.js +63 -0
  22. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookCreateModal.js +69 -0
  23. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookDeleteModal.js +1 -0
  24. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModal.js +107 -0
  25. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModalSelectors.js +22 -0
  26. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookModal.scss +6 -0
  27. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/index.js +1 -0
  28. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/nameToEditFormatter.js +19 -0
  29. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/NameToEditCell.js +35 -0
  30. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTable.js +31 -14
  31. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTableSchema.js +12 -4
  32. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js +13 -4
  33. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/__snapshots__/WebhooksTable.test.js.snap +62 -19
  34. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/index.js +27 -5
  35. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/WebhooksIndexPage.js +61 -32
  36. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js +36 -0
  37. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js +3 -1
  38. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/WebhooksIndexPage.test.js.snap +18 -60
  39. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/integration.test.js.snap +43 -0
  40. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js +34 -0
  41. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksPageActions.js +3 -0
  42. data/webpack/ForemanWebhooks/Routes/Webhooks/constants.js +11 -1
  43. data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
  44. data/webpack/__mocks__/foremanReact/common/HOC.js +26 -1
  45. data/webpack/__mocks__/foremanReact/common/urlHelpers.js +7 -0
  46. data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +6 -1
  47. data/webpack/__mocks__/foremanReact/components/Loading/Loading.js +2 -0
  48. data/webpack/__mocks__/foremanReact/components/Loading/index.js +3 -0
  49. data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +3 -1
  50. data/webpack/__mocks__/foremanReact/components/common/forms/ForemanForm.js +9 -0
  51. data/webpack/__mocks__/foremanReact/components/common/forms/FormField.js +3 -0
  52. data/webpack/__mocks__/foremanReact/components/common/table.js +21 -0
  53. data/webpack/__mocks__/foremanReact/history.js +3 -0
  54. data/webpack/__mocks__/foremanReact/redux/actions/common/forms.js +1 -0
  55. data/webpack/test_setup.js +15 -0
  56. metadata +30 -7
  57. data/app/views/webhooks/_form.html.erb +0 -38
  58. data/app/views/webhooks/_templates.html.erb +0 -5
  59. data/app/views/webhooks/edit.html.erb +0 -3
  60. data/app/views/webhooks/new.html.erb +0 -3
  61. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js +0 -29
@@ -3,7 +3,9 @@ import WebhooksIndexPage from '../WebhooksIndexPage';
3
3
 
4
4
  const fixtures = {
5
5
  'render with minimal props': {
6
- fetchAndPush: () => {},
6
+ fetchAndPush: jest.fn(),
7
+ reloadWithSearch: jest.fn(),
8
+ handleCreateSubmit: jest.fn(),
7
9
  isLoading: false,
8
10
  hasError: false,
9
11
  hasData: false,
@@ -1,68 +1,26 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`WebhooksIndexPage redering render with minimal props 1`] = `
4
- <PageLayout
5
- header="Webhooks"
4
+ <WebhooksIndexPage
5
+ canCreate={true}
6
+ fetchAndPush={[MockFunction]}
7
+ handleCreateSubmit={[MockFunction]}
8
+ hasData={false}
9
+ hasError={false}
6
10
  isLoading={false}
7
- onBookmarkClick={[Function]}
8
- onSearch={[Function]}
9
- searchProps={
11
+ itemCount={0}
12
+ message={
10
13
  Object {
11
- "autocomplete": Object {
12
- "id": "searchBar",
13
- "searchQuery": "",
14
- "url": "webhooks/auto_complete_search",
15
- "useKeyShortcuts": true,
16
- },
17
- "bookmarks": Object {
18
- "canCreateBookmarks": true,
19
- "documentationUrl": "4.1.5Searching",
20
- "url": "/api/bookmarks",
21
- },
22
- "controller": "webhooks",
14
+ "text": "Try to create a new Webhook",
15
+ "type": "empty",
23
16
  }
24
17
  }
25
- searchQuery=""
26
- searchable={true}
27
- toastNotifications={Array []}
28
- toolbarButtons={
29
- <ForwardRef
30
- to=""
31
- >
32
- <Button
33
- active={false}
34
- block={false}
35
- bsClass="btn"
36
- bsStyle="primary"
37
- disabled={false}
38
- >
39
- Create Webhook
40
- </Button>
41
- </ForwardRef>
42
- }
43
- >
44
- <WrappedWebhooksTable
45
- fetchAndPush={[Function]}
46
- hasData={false}
47
- hasError={false}
48
- isLoading={false}
49
- itemCount={0}
50
- message={
51
- Object {
52
- "text": "Try to create a new Webhook",
53
- "type": "empty",
54
- }
55
- }
56
- pagination={
57
- Object {
58
- "page": null,
59
- "perPage": null,
60
- }
61
- }
62
- results={Array []}
63
- setToDelete={[Function]}
64
- sort={Object {}}
65
- toDelete={Object {}}
66
- />
67
- </PageLayout>
18
+ page={null}
19
+ perPage={null}
20
+ reloadWithSearch={[MockFunction]}
21
+ search=""
22
+ sort={Object {}}
23
+ toasts={Array []}
24
+ webhooks={Array []}
25
+ />
68
26
  `;
@@ -0,0 +1,43 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`WebhooksIndexPage - Integration Test should flow: initial state 1`] = `
4
+ Object {
5
+ "action": Array [
6
+ Array [
7
+ Object {
8
+ "key": "WEBHOOKS",
9
+ "params": Object {
10
+ "order": "",
11
+ "page": 1,
12
+ "per_page": 20,
13
+ "search": "",
14
+ },
15
+ "type": "get-some-type",
16
+ "url": "/api/v2/webhooks?include_permissions=true",
17
+ },
18
+ ],
19
+ ],
20
+ "state": Object {},
21
+ }
22
+ `;
23
+
24
+ exports[`WebhooksIndexPage - Integration Test should flow: rendered 1`] = `
25
+ Object {
26
+ "action": Array [
27
+ Array [
28
+ Object {
29
+ "key": "WEBHOOKS",
30
+ "params": Object {
31
+ "order": "",
32
+ "page": 1,
33
+ "per_page": 20,
34
+ "search": "",
35
+ },
36
+ "type": "get-some-type",
37
+ "url": "/api/v2/webhooks?include_permissions=true",
38
+ },
39
+ ],
40
+ ],
41
+ "state": Object {},
42
+ }
43
+ `;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { IntegrationTestHelper } from '@theforeman/test';
3
+ import { Router } from 'react-router-dom';
4
+ import { createMemoryHistory } from 'history';
5
+
6
+ import ConnectedWebhooksIndexPage from '../index';
7
+
8
+ import * as selectors from '../../WebhooksPageSelectors';
9
+ import * as editSelectors from '../Components/WebhookEditModalSelectors';
10
+ import { spySelector, spyEditSelector } from './WebhooksIndexPage.fixtures';
11
+
12
+ spySelector(selectors);
13
+ spyEditSelector(editSelectors);
14
+
15
+ describe('WebhooksIndexPage - Integration Test', () => {
16
+ it('should flow', () => {
17
+ const history = createMemoryHistory();
18
+ history.push({ pathname: '/webhooks', search: '' });
19
+
20
+ const integrationTestHelper = new IntegrationTestHelper();
21
+
22
+ const component = integrationTestHelper.mount(
23
+ <Router history={history}>
24
+ <ConnectedWebhooksIndexPage history={history} />
25
+ </Router>
26
+ );
27
+ integrationTestHelper.takeStoreAndLastActionSnapshot('rendered');
28
+
29
+ expect(component.exists('WebhooksTable')).toEqual(true);
30
+ expect(component.exists('WebhookCreateModal')).toEqual(true);
31
+
32
+ integrationTestHelper.takeStoreAndLastActionSnapshot('initial state');
33
+ });
34
+ });
@@ -49,3 +49,6 @@ export const fetchAndPush = (params = {}) => (dispatch, getState) => {
49
49
  search: stringifyParams(query),
50
50
  });
51
51
  };
52
+
53
+ export const reloadWithSearch = query =>
54
+ fetchAndPush({ searchQuery: query, page: 1 });
@@ -9,5 +9,15 @@ export const WEBHOOKS_PAGE_CLEAR_ERROR = 'WEBHOOKS_PAGE_CLEAR_ERROR';
9
9
  export const WEBHOOKS_SEARCH_PROPS = getControllerSearchProps('webhooks');
10
10
  export const WEBHOOKS_API_PATH = '/api/v2/webhooks?include_permissions=true';
11
11
  export const WEBHOOKS_PATH = '/webhooks';
12
- export const WEBHOOK_DELETE_MODAL_ID = 'webhookDeleteModal';
13
12
  export const WEBHOOKS_API_REQUEST_KEY = 'WEBHOOKS';
13
+
14
+ export const WEBHOOK_TEMPLATES_API_PATH =
15
+ '/api/v2/webhook_templates?include_permissions=true';
16
+ export const WEBHOOKS_API_PLAIN_PATH = '/api/v2/webhooks';
17
+ export const WEBHOOK_TEMPLATES_API_REQUEST_KEY = 'WEBHOOK_TEMPLATES';
18
+ export const WEBHOOK_API_REQUEST_KEY = 'WEBHOOK';
19
+ export const WEBHOOK_EVENTS_API_REQUEST_KEY = 'WEBHOOK_EVENTS';
20
+
21
+ export const WEBHOOK_CREATE_MODAL_ID = 'webhookCreateModal';
22
+ export const WEBHOOK_EDIT_MODAL_ID = 'webhookEditModal';
23
+ export const WEBHOOK_DELETE_MODAL_ID = 'webhookDeleteModal';
@@ -0,0 +1 @@
1
+ export const useForemanContext = jest.fn(() => {});
@@ -1,5 +1,30 @@
1
- import React from 'react';
1
+ import React, { useEffect, useRef } from 'react';
2
2
 
3
3
  export const withRenderHandler = ({ Component }) => componentProps => (
4
4
  <Component {...componentProps} />
5
5
  );
6
+
7
+ export const callOnMount = callback => WrappedComponent => componentProps => {
8
+ callback(componentProps);
9
+
10
+ return <WrappedComponent {...componentProps} />;
11
+ };
12
+
13
+ export const callOnPopState = callback => WrappedComponent => componentProps => {
14
+ const didMount = useRef(false);
15
+ const {
16
+ history: {
17
+ action,
18
+ location: { search },
19
+ },
20
+ } = componentProps;
21
+ useEffect(() => {
22
+ if (action === 'POP' && didMount.current) {
23
+ callback(componentProps);
24
+ } else {
25
+ didMount.current = true;
26
+ }
27
+ }, [search, action, componentProps]);
28
+
29
+ return <WrappedComponent {...componentProps} />;
30
+ };
@@ -1 +1,8 @@
1
1
  export const getURIsearch = () => 'a=b';
2
+
3
+ export const getParams = () => ({
4
+ page: 1,
5
+ perPage: 20,
6
+ searchQuery: '',
7
+ sort: {},
8
+ });
@@ -10,8 +10,13 @@ ForemanModal.Footer = ({ children }) => (
10
10
  );
11
11
 
12
12
  ForemanModal.propTypes = {
13
- children: PropTypes.node.isRequired,
13
+ children: PropTypes.node,
14
14
  };
15
+
16
+ ForemanModal.defaultProps = {
17
+ children: [],
18
+ };
19
+
15
20
  ForemanModal.Header.propTypes = ForemanModal.propTypes;
16
21
  ForemanModal.Footer.propTypes = ForemanModal.propTypes;
17
22
 
@@ -0,0 +1,2 @@
1
+ const Loading = () => jest.fn();
2
+ export default Loading;
@@ -0,0 +1,3 @@
1
+ import Loading from './Loading';
2
+
3
+ export default Loading;
@@ -1,2 +1,4 @@
1
- const PaginationWrapper = () => jest.fn();
1
+ import React from 'react';
2
+
3
+ const PaginationWrapper = () => <></>;
2
4
  export default PaginationWrapper;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+
3
+ const ForemanForm = () => (
4
+ <React.Fragment>
5
+ <form />
6
+ </React.Fragment>
7
+ );
8
+
9
+ export default ForemanForm;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+
3
+ export const ForemanField = props => <div />;
@@ -3,3 +3,24 @@ import React from 'react';
3
3
  export const Table = () => <div className="table" />;
4
4
  export const createTableReducer = jest.fn(controller => controller);
5
5
  export const cellFormatter = cell => cell;
6
+ export const deleteActionCellFormatter = cell => cell;
7
+ export const sortableColumn = jest.fn();
8
+ export const column = (
9
+ property,
10
+ label,
11
+ headFormat,
12
+ cellFormat,
13
+ headProps = {},
14
+ cellProps = {}
15
+ ) => ({
16
+ property,
17
+ header: {
18
+ label,
19
+ props: headProps,
20
+ formatters: headFormat,
21
+ },
22
+ cell: {
23
+ props: cellProps,
24
+ formatters: cellFormat,
25
+ },
26
+ });
@@ -0,0 +1,3 @@
1
+ import { createMemoryHistory } from 'history';
2
+
3
+ export const history = createMemoryHistory();
@@ -0,0 +1 @@
1
+ export const submitForm = jest.fn(() => '');
@@ -0,0 +1,15 @@
1
+ jest.mock('foremanReact/Root/Context/ForemanContext', () => ({
2
+ useForemanContext: () => ({ toasts: [] }),
3
+ }));
4
+ jest.mock('foremanReact/history', () => ({
5
+ history: {
6
+ action: 'PUSH',
7
+ listen: jest.fn(),
8
+ location: {
9
+ pathname: '/webhooks',
10
+ search: '',
11
+ },
12
+ push: jest.fn(),
13
+ replace: jest.fn(),
14
+ },
15
+ }));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_webhooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Goebel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -87,10 +87,6 @@ files:
87
87
  - app/views/webhook_templates/edit.html.erb
88
88
  - app/views/webhook_templates/index.html.erb
89
89
  - app/views/webhook_templates/new.html.erb
90
- - app/views/webhooks/_form.html.erb
91
- - app/views/webhooks/_templates.html.erb
92
- - app/views/webhooks/edit.html.erb
93
- - app/views/webhooks/new.html.erb
94
90
  - config/routes.rb
95
91
  - db/migrate/20191016100128_create_webhook_targets.rb
96
92
  - db/migrate/20200831194208_rename_webhook_targets_to_webhooks.rb
@@ -117,13 +113,28 @@ files:
117
113
  - test/test_plugin_helper.rb
118
114
  - test/unit/foreman_webhooks/webhook_service_test.rb
119
115
  - webpack/ForemanWebhooks/Routes/ForemanWebhooksRoutes.js
120
- - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js
116
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/ForemanFormikField.js
117
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/WebhookFormTabs.css
118
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/WebhookFormTabs.js
119
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js
120
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookFormSelectors.js
121
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js
122
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/__snapshots__/WebhookForm.test.js.snap
123
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/constants.js
124
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/index.js
125
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksIndexPage/index.js
126
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookCreateModal.js
121
127
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookDeleteModal.js
128
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModal.js
129
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModalSelectors.js
130
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookModal.scss
122
131
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/EnabledCell.js
123
132
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/__snapshots__/enabledCellFormatter.test.js.snap
124
133
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/enabledCellFormatter.test.js
125
134
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/enabledCellFormatter.js
126
135
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/index.js
136
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/nameToEditFormatter.js
137
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/NameToEditCell.js
127
138
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/EnabledCell.test.js
128
139
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/__snapshots__/EnabledCell.test.js.snap
129
140
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTable.js
@@ -135,6 +146,8 @@ files:
135
146
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js
136
147
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js
137
148
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/WebhooksIndexPage.test.js.snap
149
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/integration.test.js.snap
150
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
138
151
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/index.js
139
152
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksPageActions.js
140
153
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksPageHelpers.js
@@ -143,6 +156,7 @@ files:
143
156
  - webpack/ForemanWebhooks/Routes/Webhooks/__tests__/WebhooksPageSelectors.test.js
144
157
  - webpack/ForemanWebhooks/Routes/Webhooks/__tests__/__snapshots__/WebhooksPageSelectors.test.js.snap
145
158
  - webpack/ForemanWebhooks/Routes/Webhooks/constants.js
159
+ - webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
146
160
  - webpack/__mocks__/foremanReact/common/HOC.js
147
161
  - webpack/__mocks__/foremanReact/common/I18n.js
148
162
  - webpack/__mocks__/foremanReact/common/helpers.js
@@ -151,16 +165,23 @@ files:
151
165
  - webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js
152
166
  - webpack/__mocks__/foremanReact/components/ForemanModal/index.js
153
167
  - webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js
168
+ - webpack/__mocks__/foremanReact/components/Loading/Loading.js
169
+ - webpack/__mocks__/foremanReact/components/Loading/index.js
154
170
  - webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js
155
171
  - webpack/__mocks__/foremanReact/components/common/EmptyState.js
172
+ - webpack/__mocks__/foremanReact/components/common/forms/ForemanForm.js
173
+ - webpack/__mocks__/foremanReact/components/common/forms/FormField.js
156
174
  - webpack/__mocks__/foremanReact/components/common/table.js
157
175
  - webpack/__mocks__/foremanReact/constants.js
176
+ - webpack/__mocks__/foremanReact/history.js
158
177
  - webpack/__mocks__/foremanReact/redux/API/APISelectors.js
159
178
  - webpack/__mocks__/foremanReact/redux/API/index.js
179
+ - webpack/__mocks__/foremanReact/redux/actions/common/forms.js
160
180
  - webpack/__mocks__/foremanReact/redux/actions/toasts.js
161
181
  - webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js
162
182
  - webpack/index.js
163
183
  - webpack/routes_index.js
184
+ - webpack/test_setup.js
164
185
  homepage: https://github.com/theforeman/foreman_webhooks
165
186
  licenses:
166
187
  - GPL-3.0
@@ -199,5 +220,7 @@ test_files:
199
220
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js
200
221
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js
201
222
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js
223
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
202
224
  - webpack/ForemanWebhooks/Routes/Webhooks/__tests__/WebhooksPageHelpers.test.js
203
225
  - webpack/ForemanWebhooks/Routes/Webhooks/__tests__/WebhooksPageSelectors.test.js
226
+ - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js