foreman_inventory_upload 1.0.3 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/foreman_inventory_upload/engine.rb +1 -1
  3. data/lib/foreman_inventory_upload/version.rb +1 -1
  4. data/package.json +19 -99
  5. data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js +5 -14
  6. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -1
  7. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +1 -1
  8. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +1 -1
  9. data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +1 -1
  10. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -1
  11. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +1 -1
  12. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
  13. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +1 -1
  14. data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +1 -1
  15. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js +13 -9
  16. data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.stories.js +5 -15
  17. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +1 -2
  18. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +15 -2
  19. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +1 -1
  20. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +1 -1
  21. data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +1 -1
  22. data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +1 -1
  23. data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +1 -1
  24. data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +5 -2
  25. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +1 -2
  26. data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/__snapshots__/NavContainer.test.js.snap +1 -1
  27. data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +1 -1
  28. data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +1 -1
  29. data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +1 -1
  30. data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +1 -1
  31. data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +1 -1
  32. data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +1 -1
  33. data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +1 -1
  34. data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +1 -1
  35. data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +1 -2
  36. data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js +1 -1
  37. metadata +2 -9
  38. data/webpack/stories/ForemanInventoryUploadReducers.js +0 -3
  39. data/webpack/stories/configureStore.js +0 -15
  40. data/webpack/stories/decorators/index.js +0 -1
  41. data/webpack/stories/decorators/withCardsDecorator.js +0 -14
  42. data/webpack/stories/index.js +0 -10
  43. data/webpack/stories/index.scss +0 -7
  44. data/webpack/test_setup.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 031c5daa79d53eed18f2309a4e150bf56924a2505b2cc499cb5414d356259620
4
- data.tar.gz: b556b5dd6096278b968e8d7cb45d0787e8b962929c7bbee132af90a5f55924ab
3
+ metadata.gz: 0ee366e2c29cdcebb956eea276f6fe8e4c3b61d92b28c9bf3fe7b796e8d9a736
4
+ data.tar.gz: 1ce3d7dec276594d6f2051856c9b7fae0bb0fa0b46f21f84b09bf02f2bf59698
5
5
  SHA512:
6
- metadata.gz: f14b68919515e12782749b198150607f3efe5f7ed30e68ccb38e357ad9974e7e871165db1e4596e0105c48866c438c075ee93627934449e1f14a7b0b5b0bbee7
7
- data.tar.gz: 1e50386373ce4c7ae55eea6f4117d193f9b5d3dea17e1a638430ddddeda48cd3961695b76c03c19c6230c574163fd917fd5c72aba378363f72b8b1328760d7a6
6
+ metadata.gz: 74b2c3da2e3e7d75cb62fafdc768b37c3261b3debb06bcba4a70c73bc63e2cf0deb183ea13d4e041b58a77f6a9667f18e998130b70a5552127f9263c981c8af2
7
+ data.tar.gz: 00aceb0db75ca118b656d20add514d7aa522f3e59c7983f740dffea0b134b7d77c2434be124d9d7ad9d5201d58459fc7a8b2b1f23d5c138f030ad4e7e363dc9c
@@ -22,7 +22,7 @@ module ForemanInventoryUpload
22
22
 
23
23
  initializer 'foreman_inventory_upload.register_plugin', :before => :finisher_hook do |_app|
24
24
  Foreman::Plugin.register :foreman_inventory_upload do
25
- requires_foreman '>= 1.20'
25
+ requires_foreman '> 1.24'
26
26
 
27
27
  # Add permissions
28
28
  security_block :foreman_inventory_upload do
@@ -1,3 +1,3 @@
1
1
  module ForemanInventoryUpload
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '2.0.3'.freeze
3
3
  end
@@ -4,14 +4,14 @@
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "lint": "./node_modules/.bin/eslint -c .eslintrc webpack/",
8
- "test": "node node_modules/.bin/jest --no-cache",
9
- "test:watch": "node node_modules/.bin/jest --watchAll",
10
- "test:current": "node node_modules/.bin/jest --watch",
11
- "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
12
- "storybook": "start-storybook -p 6006",
13
- "storybook:build": "node --max_old_space_size=2048 ./node_modules/.bin/build-storybook --config-dir .storybook --output-dir .storybook-dist",
14
- "storybook:deploy": "surge --project .storybook-dist"
7
+ "lint": "tfm-lint --plugin -d /webpack",
8
+ "test": "tfm-test --plugin",
9
+ "test:watch": "tfm-test --plugin --watchAll",
10
+ "test:current": "tfm-test --plugin --watch",
11
+ "publish-coverage": "tfm-publish-coverage",
12
+ "stories": "tfm-stories --plugin",
13
+ "stories:build": "tfm-build-stories --plugin",
14
+ "stories:deploy": "surge --project .storybook-dist"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -20,106 +20,26 @@
20
20
  "bugs": {
21
21
  "url": "http://projects.theforeman.org/projects/foreman_inventory_upload/issues"
22
22
  },
23
- "optionalDependencies": {
24
- "babel-plugin-module-resolver": "^3.2.0"
23
+ "peerDependencies": {
24
+ "@theforeman/vendor": ">= 4.0.2"
25
25
  },
26
26
  "devDependencies": {
27
- "@storybook/addon-actions": "^5.0.1",
28
- "@storybook/addon-knobs": "^5.0.1",
29
- "@storybook/react": "^5.0.1",
30
- "babel-cli": "^6.10.1",
31
- "babel-core": "^6.26.3",
32
- "babel-eslint": "^8.2.3",
33
- "babel-jest": "^23.6.0",
34
- "babel-loader": "^7.1.1",
35
- "babel-plugin-dynamic-import-node": "^2.0.0",
36
- "babel-plugin-lodash": "^3.3.4",
37
- "babel-plugin-syntax-dynamic-import": "^6.18.0",
38
- "babel-plugin-transform-class-properties": "^6.24.1",
39
- "babel-plugin-transform-object-assign": "^6.8.0",
40
- "babel-plugin-transform-object-rest-spread": "^6.8.0",
41
- "babel-preset-env": "^1.7.0",
42
- "babel-preset-react": "^6.5.0",
43
- "coveralls": "^3.0.0",
44
- "enzyme": "^3.4.0",
45
- "enzyme-adapter-react-16": "^1.4.0",
46
- "enzyme-to-json": "^3.2.1",
47
- "eslint": "^4.10.0",
48
- "eslint-import-resolver-babel-module": "^4.0.0",
49
- "eslint-plugin-patternfly-react": "0.2.0",
50
- "identity-obj-proxy": "^3.0.0",
27
+ "@babel/core": "^7.7.0",
28
+ "@theforeman/builder": "^4.0.2",
29
+ "@theforeman/eslint-plugin-foreman": "^4.0.2",
30
+ "@theforeman/stories": "^4.0.2",
31
+ "@theforeman/test": "^4.0.2",
32
+ "@theforeman/vendor-dev": "^4.0.2",
33
+ "babel-eslint": "^10.0.0",
34
+ "eslint": "^6.8.0",
51
35
  "jed": "^1.1.1",
52
- "jest-cli": "^23.6.0",
53
- "jest-prop-type-error": "^1.1.0",
54
- "node-sass": "^4.5.0",
55
- "patternfly": "^3.58.0",
56
36
  "prettier": "^1.13.5",
57
37
  "raf": "^3.4.0",
58
- "react-redux-test-utils": "^0.1.1",
59
- "react-remarkable": "^1.1.3",
60
- "sass-loader": "^6.0.7",
61
38
  "stylelint": "^9.3.0",
62
39
  "stylelint-config-standard": "^18.0.0",
63
40
  "surge": "^0.20.3"
64
41
  },
65
42
  "dependencies": {
66
- "babel-polyfill": "^6.26.0",
67
- "classnames": "^2.2.5",
68
- "lodash": "^4.17.10",
69
- "patternfly-react": "^2.19.1",
70
- "prop-types": "^15.6.0",
71
- "react": "^16.4.0",
72
- "react-dom": "^16.4.0",
73
- "react-intl": "^2.8.0",
74
- "react-redux": "^5.0.6",
75
- "redux": "^3.6.0",
76
- "redux-thunk": "^2.2.0",
77
- "reselect": "^3.0.1",
78
- "seamless-immutable": "^7.1.2",
79
- "urijs": "^1.18.10",
80
- "uuid": "^3.0.1"
81
- },
82
- "jest": {
83
- "automock": true,
84
- "verbose": true,
85
- "testMatch": [
86
- "**/*.test.js"
87
- ],
88
- "testURL": "http://localhost/",
89
- "collectCoverage": true,
90
- "collectCoverageFrom": [
91
- "webpack/**/*.js",
92
- "!webpack/index.js",
93
- "!webpack/test_setup.js",
94
- "!webpack/**/bundle*",
95
- "!webpack/stories/**",
96
- "!webpack/**/*stories.js"
97
- ],
98
- "coverageReporters": [
99
- "lcov"
100
- ],
101
- "unmockedModulePathPatterns": [
102
- "webpack/",
103
- "react",
104
- "node_modules/"
105
- ],
106
- "moduleNameMapper": {
107
- "^.+\\.(png|gif|css|scss)$": "identity-obj-proxy"
108
- },
109
- "globals": {
110
- "__testing__": true
111
- },
112
- "transform": {
113
- "^.+\\.js$": "babel-jest"
114
- },
115
- "moduleDirectories": [
116
- "node_modules",
117
- "webpack"
118
- ],
119
- "setupFiles": [
120
- "raf/polyfill",
121
- "jest-prop-type-error",
122
- "./webpack/test_setup.js"
123
- ]
43
+ "react-intl": "^2.8.0"
124
44
  }
125
45
  }
@@ -1,18 +1,9 @@
1
1
  import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withKnobs } from '@storybook/addon-knobs';
4
- import { Provider } from 'react-redux';
5
- import configureStore from '../../../stories/configureStore';
6
2
  import AccountList from './AccountList';
7
3
 
8
- const store = configureStore();
4
+ export default {
5
+ title: 'AccountList',
6
+ component: AccountList,
7
+ };
9
8
 
10
- storiesOf('Account list', module)
11
- .addDecorator(withKnobs)
12
- .add('Account list', () => (
13
- <div style={{ margin: '20px' }}>
14
- <Provider store={store}>
15
- <AccountList />
16
- </Provider>
17
- </div>
18
- ));
9
+ export const Basic = () => <AccountList />;
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import EmptyState from '../EmptyState';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ErrorState from '../ErrorState';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ListItem from '../ListItem';
4
4
  import { props } from '../ListItem.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ListItemStatus from '../ListItemStatus';
4
4
  import { props } from '../ListItemStatus.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import AccountList from '../AccountList';
4
4
  import { props } from '../AccountList.fixtures';
@@ -1,4 +1,4 @@
1
- import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testActionSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  fetchAccountsStatus,
4
4
  startAccountStatusPolling,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntegrationTestHelper } from 'react-redux-test-utils';
2
+ import { IntegrationTestHelper } from '@theforeman/test';
3
3
 
4
4
  import AccountList from '../index';
5
5
  import reducers from '../../../ForemanInventoryUploadReducers';
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  INVENTORY_ACCOUNT_STATUS_POLLING,
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  selectAccountsList,
4
4
  selectAccounts,
@@ -8,16 +8,20 @@ export const completed = 25;
8
8
 
9
9
  export const error = 'some-error';
10
10
 
11
+ export const generating = {
12
+ logs,
13
+ completed,
14
+ };
15
+
16
+ export const uploading = {
17
+ logs,
18
+ completed,
19
+ files,
20
+ };
21
+
11
22
  export const inventory = {
12
- generating: {
13
- logs,
14
- completed,
15
- },
16
- uploading: {
17
- logs,
18
- completed,
19
- files,
20
- },
23
+ generating,
24
+ uploading,
21
25
  };
22
26
 
23
27
  export const accountID = 'some-account-ID';
@@ -1,19 +1,9 @@
1
1
  import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withKnobs } from '@storybook/addon-knobs';
4
- import { Provider } from 'react-redux';
5
- import configureStore from '../../../stories/configureStore';
6
2
  import Dashboard from './index';
7
- import { generating, uploading } from './Dashboard.fixtures';
8
3
 
9
- const store = configureStore();
4
+ export default {
5
+ title: 'Dashboard',
6
+ component: Dashboard,
7
+ };
10
8
 
11
- storiesOf('Dashboard', module)
12
- .addDecorator(withKnobs)
13
- .add('Dashboard', () => (
14
- <div style={{ margin: '20px' }}>
15
- <Provider store={store}>
16
- <Dashboard generating={generating} uploading={uploading} />
17
- </Provider>
18
- </div>
19
- ));
9
+ export const Basic = () => <Dashboard />;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
2
+ import { shallow, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import Dashboard from '../Dashboard';
5
4
  import { props } from '../Dashboard.fixtures';
6
5
 
@@ -1,4 +1,4 @@
1
- import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testActionSnapshotWithFixtures } from '@theforeman/test';
2
2
  import API from 'foremanReact/API';
3
3
  import {
4
4
  startPolling,
@@ -36,4 +36,17 @@ const fixtures = {
36
36
  runWithGetState({ activeTab: 'reports' }, toggleFullScreen, accountID),
37
37
  };
38
38
 
39
- describe('Dashboard actions', () => testActionSnapshotWithFixtures(fixtures));
39
+ describe('Dashboard actions', () => {
40
+ const { location } = window;
41
+
42
+ beforeAll(() => {
43
+ delete window.location;
44
+ window.location = { href: jest.fn() };
45
+ });
46
+
47
+ afterAll(() => {
48
+ window.location = location;
49
+ });
50
+
51
+ return testActionSnapshotWithFixtures(fixtures);
52
+ });
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IntegrationTestHelper } from 'react-redux-test-utils';
2
+ import { IntegrationTestHelper } from '@theforeman/test';
3
3
 
4
4
  import Dashboard, { reducers } from '../index';
5
5
  import { accountID } from '../Dashboard.fixtures';
@@ -1,4 +1,4 @@
1
- import { testReducerSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testReducerSnapshotWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import {
4
4
  INVENTORY_POLLING_START,
@@ -1,4 +1,4 @@
1
- import { testSelectorsSnapshotWithFixtures } from 'react-redux-test-utils';
1
+ import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
2
2
  import {
3
3
  selectDashboard,
4
4
  selectPollingProcessID,
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import FileDownload from '../FileDownload';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import FullScreenModal from '../FullScreenModal';
4
4
 
@@ -1,10 +1,13 @@
1
+ import React from 'react';
2
+ import { noop } from 'patternfly-react';
3
+
1
4
  export const props = {
2
5
  items: [
3
6
  {
4
7
  icon: 'some-icon',
5
8
  name: 'some-name',
6
- component: jest.fn,
7
- onClick: jest.fn,
9
+ component: () => <p>test</p>,
10
+ onClick: noop,
8
11
  },
9
12
  ],
10
13
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { mount } from 'enzyme';
3
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
2
+ import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import NavContainer from '../NavContainer';
5
4
  import { props } from '../NavContainer.fixtures';
6
5
 
@@ -45,7 +45,7 @@ exports[`NavContainer rendering render with Props 1`] = `
45
45
  eventKey={0}
46
46
  key="0"
47
47
  >
48
- <bound fn />
48
+ <component />
49
49
  </TabPane>
50
50
  </TabContent>
51
51
  <FullScreenModal
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ReportGenerate from '../ReportGenerate';
4
4
  import { props } from '../ReportGenerate.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ReportUpload from '../ReportUpload';
4
4
  import { props } from '../ReportUpload.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ScheduledRun from '../ScheduledRun';
4
4
  import { props } from '../ScheduledRun.fixtures';
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import StatusChart from '../StatusChart';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabBody from '../TabBody';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabContainer from '../TabContainer';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabFooter from '../TabFooter';
4
4
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import TabHeader from '../TabHeader';
4
4
 
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
3
- import { mount } from 'enzyme';
2
+ import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
4
3
  import Terminal from '../Terminal';
5
4
  import { props, logs } from '../Terminal.fixtures';
6
5
 
@@ -1,4 +1,4 @@
1
- import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
1
+ import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
2
2
 
3
3
  import ForemanInventoryUpload from './ForemanInventoryUpload';
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_inventory_upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inventory upload team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -303,13 +303,6 @@ files:
303
303
  - webpack/__mocks__/foremanReact/common/I18n.js
304
304
  - webpack/__mocks__/foremanReact/common/helpers.js
305
305
  - webpack/index.js
306
- - webpack/stories/ForemanInventoryUploadReducers.js
307
- - webpack/stories/configureStore.js
308
- - webpack/stories/decorators/index.js
309
- - webpack/stories/decorators/withCardsDecorator.js
310
- - webpack/stories/index.js
311
- - webpack/stories/index.scss
312
- - webpack/test_setup.js
313
306
  homepage: https://github.com/theforeman/foreman_inventory_upload
314
307
  licenses:
315
308
  - GPL-3.0
@@ -1,3 +0,0 @@
1
- import reducers from '../ForemanInventoryUpload/ForemanInventoryUploadReducers';
2
-
3
- export default reducers.ForemanInventoryUpload;
@@ -1,15 +0,0 @@
1
- import { applyMiddleware, compose, createStore } from 'redux';
2
- import thunkMiddleware from 'redux-thunk';
3
- import rootReducer from './ForemanInventoryUploadReducers';
4
-
5
- export default function configureStore(preloadedState) {
6
- const middlewares = [thunkMiddleware];
7
- const middlewareEnhancer = applyMiddleware(...middlewares);
8
-
9
- const enhancers = [middlewareEnhancer];
10
- const composedEnhancers = compose(...enhancers);
11
-
12
- const store = createStore(rootReducer, preloadedState, composedEnhancers);
13
-
14
- return store;
15
- }
@@ -1 +0,0 @@
1
- export * from './withCardsDecorator';
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
-
3
- export const withCardsDecorator = storyFn => (
4
- <div
5
- style={{
6
- width: '100%',
7
- height: '100vh',
8
- backgroundColor: '#F5F5F5',
9
- padding: '50px',
10
- }}
11
- >
12
- <div style={{ width: '300px', margin: 'auto' }}>{storyFn()}</div>
13
- </div>
14
- );
@@ -1,10 +0,0 @@
1
- import { configure } from '@storybook/react';
2
- import './index.scss';
3
-
4
- const req = require.context('../', true, /.stories.js$/);
5
-
6
- function loadStories() {
7
- req.keys().forEach(filename => req(filename));
8
- }
9
-
10
- configure(loadStories, module);
@@ -1,7 +0,0 @@
1
- $img-path: '~patternfly/dist/img/';
2
- $font-path: '~patternfly/dist/fonts/';
3
- $icon-font-path: '~patternfly/dist/fonts/';
4
-
5
- @import '~patternfly/dist/sass/patternfly';
6
- @import '~patternfly-react/dist/sass/patternfly-react';
7
- @import '~font-awesome-sass/assets/stylesheets/_font-awesome';
@@ -1,6 +0,0 @@
1
- import 'babel-polyfill';
2
-
3
- import { configure } from 'enzyme';
4
- import Adapter from 'enzyme-adapter-react-16';
5
-
6
- configure({ adapter: new Adapter() });