foreman_rh_cloud 1.0.6 → 2.0.5
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.
- checksums.yaml +4 -4
- data/lib/foreman_inventory_upload/async/shell_process.rb +1 -3
- data/lib/foreman_inventory_upload/async/upload_report_job.rb +1 -5
- data/lib/foreman_inventory_upload/generators/fact_helpers.rb +0 -13
- data/lib/foreman_inventory_upload/generators/queries.rb +0 -1
- data/lib/foreman_inventory_upload/generators/slice.rb +8 -12
- data/lib/foreman_rh_cloud/engine.rb +1 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +20 -100
- data/test/factories/inventory_upload_factories.rb +13 -13
- data/test/unit/archived_report_generator_test.rb +0 -1
- data/test/unit/slice_generator_test.rb +20 -74
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js +5 -14
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/AutoUploadSwitcher.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AutoUploadSwitcher/__tests__/AutoUploadSwitcherActions.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js +13 -9
- data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.stories.js +5 -15
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +15 -2
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +5 -2
- data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/__snapshots__/NavContainer.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Terminal/Terminal.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +1 -2
- data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js +1 -1
- metadata +2 -14
- data/lib/foreman_inventory_upload/async/async_helpers.rb +0 -13
- data/test/unit/fact_helpers_test.rb +0 -29
- data/test/unit/slice_generator_test.rb.orig +0 -280
- data/webpack/stories/ForemanInventoryUploadReducers.js +0 -3
- data/webpack/stories/configureStore.js +0 -15
- data/webpack/stories/decorators/index.js +0 -1
- data/webpack/stories/decorators/withCardsDecorator.js +0 -14
- data/webpack/stories/index.js +0 -10
- data/webpack/stories/index.scss +0 -7
- data/webpack/test_setup.js +0 -6
@@ -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
|
-
|
4
|
+
export default {
|
5
|
+
title: 'AccountList',
|
6
|
+
component: AccountList,
|
7
|
+
};
|
9
8
|
|
10
|
-
|
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 { testActionSnapshotWithFixtures } from '
|
1
|
+
import { testActionSnapshotWithFixtures } from '@theforeman/test';
|
2
2
|
import API from 'foremanReact/API';
|
3
3
|
import { handleToggle } from '../AutoUploadSwitcherActions';
|
4
4
|
import { handleToggleResponse } from '../AutoUploadSwitcher.fixtures';
|
@@ -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
|
-
|
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
|
-
|
4
|
+
export default {
|
5
|
+
title: 'Dashboard',
|
6
|
+
component: Dashboard,
|
7
|
+
};
|
10
8
|
|
11
|
-
|
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 '
|
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 '
|
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', () =>
|
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,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:
|
7
|
-
onClick:
|
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 '
|
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
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { Grid, Spinner } from 'patternfly-react';
|
4
|
-
import isEqual from 'lodash
|
4
|
+
import { isEqual } from 'lodash';
|
5
5
|
import './terminal.scss';
|
6
6
|
import { isTerminalScrolledDown } from './TerminalHelper';
|
7
7
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { testComponentSnapshotsWithFixtures } from '
|
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
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -113,7 +113,6 @@ files:
|
|
113
113
|
- app/views/foreman_inventory_upload/layouts/react.html.erb
|
114
114
|
- config/routes.rb
|
115
115
|
- lib/foreman_inventory_upload.rb
|
116
|
-
- lib/foreman_inventory_upload/async/async_helpers.rb
|
117
116
|
- lib/foreman_inventory_upload/async/generate_all_reports_job.rb
|
118
117
|
- lib/foreman_inventory_upload/async/generate_report_job.rb
|
119
118
|
- lib/foreman_inventory_upload/async/progress_output.rb
|
@@ -143,11 +142,9 @@ files:
|
|
143
142
|
- test/factories/inventory_upload_factories.rb
|
144
143
|
- test/test_plugin_helper.rb
|
145
144
|
- test/unit/archived_report_generator_test.rb
|
146
|
-
- test/unit/fact_helpers_test.rb
|
147
145
|
- test/unit/metadata_generator_test.rb
|
148
146
|
- test/unit/shell_process_job_test.rb
|
149
147
|
- test/unit/slice_generator_test.rb
|
150
|
-
- test/unit/slice_generator_test.rb.orig
|
151
148
|
- webpack/ForemanInventoryUpload/Components/AccountList/AccountList.fixtures.js
|
152
149
|
- webpack/ForemanInventoryUpload/Components/AccountList/AccountList.js
|
153
150
|
- webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js
|
@@ -322,13 +319,6 @@ files:
|
|
322
319
|
- webpack/__mocks__/foremanReact/common/I18n.js
|
323
320
|
- webpack/__mocks__/foremanReact/common/helpers.js
|
324
321
|
- webpack/index.js
|
325
|
-
- webpack/stories/ForemanInventoryUploadReducers.js
|
326
|
-
- webpack/stories/configureStore.js
|
327
|
-
- webpack/stories/decorators/index.js
|
328
|
-
- webpack/stories/decorators/withCardsDecorator.js
|
329
|
-
- webpack/stories/index.js
|
330
|
-
- webpack/stories/index.scss
|
331
|
-
- webpack/test_setup.js
|
332
322
|
homepage: https://github.com/theforeman/foreman_rh_cloud
|
333
323
|
licenses:
|
334
324
|
- GPL-3.0
|
@@ -360,7 +350,5 @@ test_files:
|
|
360
350
|
- test/factories/inventory_upload_factories.rb
|
361
351
|
- test/unit/shell_process_job_test.rb
|
362
352
|
- test/unit/metadata_generator_test.rb
|
363
|
-
- test/unit/slice_generator_test.rb.orig
|
364
|
-
- test/unit/fact_helpers_test.rb
|
365
353
|
- test/unit/archived_report_generator_test.rb
|
366
354
|
- test/unit/slice_generator_test.rb
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'test_plugin_helper'
|
2
|
-
|
3
|
-
class FactHelpersTest < ActiveSupport::TestCase
|
4
|
-
class FactsHelpersTestStub
|
5
|
-
include ForemanInventoryUpload::Generators::FactHelpers
|
6
|
-
end
|
7
|
-
|
8
|
-
setup do
|
9
|
-
@instance = FactsHelpersTestStub.new
|
10
|
-
|
11
|
-
@org = FactoryBot.create(:organization)
|
12
|
-
end
|
13
|
-
|
14
|
-
test 'golden_ticket uses golden_ticket method when defined' do
|
15
|
-
@org.expects(:golden_ticket?).returns(true)
|
16
|
-
|
17
|
-
actual = @instance.golden_ticket?(@org)
|
18
|
-
|
19
|
-
assert actual
|
20
|
-
end
|
21
|
-
|
22
|
-
test 'golden_ticket uses content_access_mode method when golden_ticket not defined' do
|
23
|
-
@org.expects(:content_access_mode).returns('org_environment')
|
24
|
-
|
25
|
-
actual = @instance.golden_ticket?(@org)
|
26
|
-
|
27
|
-
assert actual
|
28
|
-
end
|
29
|
-
end
|