diff options
Diffstat (limited to 'ui-react/src/components')
-rw-r--r-- | ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/DeployLoopModal.js (renamed from ui-react/src/components/dialogs/DeployLoop.js) | 6 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js (renamed from ui-react/src/components/dialogs/DeployLoop.test.js) | 22 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js (renamed from ui-react/src/components/dialogs/LoopProperties.js) | 4 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js (renamed from ui-react/src/components/dialogs/LoopProperties.test.js) | 20 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/OpenLoopModal.js (renamed from ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js (renamed from ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap (renamed from ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap) | 0 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/UserInfoModal.js (renamed from ui-react/src/components/dialogs/UserInfo.js) | 2 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/UserInfoModal.test.js (renamed from ui-react/src/components/dialogs/UserInfo.test.js) | 10 | ||||
-rw-r--r-- | ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap) | 2 |
13 files changed, 36 insertions, 36 deletions
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js index e0aa8c6b0..4fa08e680 100644 --- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js +++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js @@ -26,7 +26,7 @@ import ConfigurationPolicyModal from './ConfigurationPolicyModal'; import LoopCache from '../../../api/LoopCache'; -describe('Verify DeployLoop', () => { +describe('Verify ConfigurationPolicyModal', () => { beforeEach(() => { fetch.resetMocks(); fetch.mockImplementation(() => { diff --git a/ui-react/src/components/dialogs/DeployLoop.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js index d71af9240..34304d611 100644 --- a/ui-react/src/components/dialogs/DeployLoop.js +++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.js @@ -21,8 +21,8 @@ * */ import React from 'react'; -import LoopActionService from '../../api/LoopActionService'; -import LoopService from '../../api/LoopService'; +import LoopActionService from '../../../api/LoopActionService'; +import LoopService from '../../../api/LoopService'; import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; import Form from 'react-bootstrap/Form'; @@ -34,7 +34,7 @@ const ModalStyled = styled(Modal)` const FormStyled = styled(Form.Group)` padding: .25rem 1.5rem; ` -export default class DeployLoop extends React.Component { +export default class DeployLoopModal extends React.Component { state = { loopCache: this.props.loopCache, temporaryPropertiesJson: JSON.parse(JSON.stringify(this.props.loopCache.getGlobalProperties())), diff --git a/ui-react/src/components/dialogs/DeployLoop.test.js b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js index 44bc78379..2ebb8c067 100644 --- a/ui-react/src/components/dialogs/DeployLoop.test.js +++ b/ui-react/src/components/dialogs/Loop/DeployLoopModal.test.js @@ -22,12 +22,12 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import DeployLoop from './DeployLoop'; -import LoopCache from '../../api/LoopCache'; -import LoopActionService from '../../api/LoopActionService'; -import LoopService from '../../api/LoopService'; +import DeployLoopModal from './DeployLoopModal'; +import LoopCache from '../../../api/LoopCache'; +import LoopActionService from '../../../api/LoopActionService'; +import LoopService from '../../../api/LoopService'; -describe('Verify DeployLoop', () => { +describe('Verify DeployLoopModal', () => { const loopCache = new LoopCache({ "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", "globalPropertiesJson": { @@ -40,7 +40,7 @@ describe('Verify DeployLoop', () => { it('Test the render method', () => { const component = shallow( - <DeployLoop loopCache={loopCache}/> + <DeployLoopModal loopCache={loopCache}/> ) expect(component).toMatchSnapshot(); @@ -48,8 +48,8 @@ describe('Verify DeployLoop', () => { it('Test handleClose', () => { const historyMock = { push: jest.fn() }; - const handleClose = jest.spyOn(DeployLoop.prototype,'handleClose'); - const component = shallow(<DeployLoop history={historyMock} loopCache={loopCache}/>) + const handleClose = jest.spyOn(DeployLoopModal.prototype,'handleClose'); + const component = shallow(<DeployLoopModal history={historyMock} loopCache={loopCache}/>) component.find('[variant="secondary"]').prop('onClick')(); @@ -62,7 +62,7 @@ describe('Verify DeployLoop', () => { const historyMock = { push: jest.fn() }; const updateLoopFunction = jest.fn(); const showAlert = jest.fn(); - const handleSave = jest.spyOn(DeployLoop.prototype,'handleSave'); + const handleSave = jest.spyOn(DeployLoopModal.prototype,'handleSave'); LoopService.updateGlobalProperties = jest.fn().mockImplementation(() => { return Promise.resolve({ ok: true, @@ -85,7 +85,7 @@ describe('Verify DeployLoop', () => { }); }); - const component = shallow(<DeployLoop history={historyMock} + const component = shallow(<DeployLoopModal history={historyMock} loopCache={loopCache} updateLoopFunction={updateLoopFunction} showAlert={showAlert} />) component.find('[variant="primary"]').prop('onClick')(); @@ -100,7 +100,7 @@ describe('Verify DeployLoop', () => { it('Onchange event', () => { const event = { target: { name: "location_id", value: "testLocation"} }; - const component = shallow(<DeployLoop loopCache={loopCache}/>); + const component = shallow(<DeployLoopModal loopCache={loopCache}/>); const forms = component.find('StateManager'); component.find('[name="location_id"]').simulate('change', event); diff --git a/ui-react/src/components/dialogs/LoopProperties.js b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js index 990fe7754..73946f45d 100644 --- a/ui-react/src/components/dialogs/LoopProperties.js +++ b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.js @@ -25,12 +25,12 @@ import Button from 'react-bootstrap/Button'; import Modal from 'react-bootstrap/Modal'; import Form from 'react-bootstrap/Form'; import styled from 'styled-components'; -import LoopService from '../../api/LoopService'; +import LoopService from '../../../api/LoopService'; const ModalStyled = styled(Modal)` background-color: transparent; ` -export default class LoopProperties extends React.Component { +export default class LoopPropertiesModal extends React.Component { state = { show: true, diff --git a/ui-react/src/components/dialogs/LoopProperties.test.js b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js index 9b74fe76a..5bbefe228 100644 --- a/ui-react/src/components/dialogs/LoopProperties.test.js +++ b/ui-react/src/components/dialogs/Loop/LoopPropertiesModal.test.js @@ -22,11 +22,11 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import LoopProperties from './LoopProperties'; -import LoopCache from '../../api/LoopCache'; -import LoopService from '../../api/LoopService'; +import LoopPropertiesModal from './LoopPropertiesModal'; +import LoopCache from '../../../api/LoopCache'; +import LoopService from '../../../api/LoopService'; -describe('Verify LoopProperties', () => { +describe('Verify LoopPropertiesModal', () => { const loopCache = new LoopCache({ "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", "globalPropertiesJson": { @@ -39,7 +39,7 @@ describe('Verify LoopProperties', () => { it('Test the render method', () => { const component = shallow( - <LoopProperties loopCache={loopCache}/> + <LoopPropertiesModal loopCache={loopCache}/> ) component.setState({ show: true, temporaryPropertiesJson: { @@ -62,8 +62,8 @@ describe('Verify LoopProperties', () => { it('Test handleClose', () => { const historyMock = { push: jest.fn() }; - const handleClose = jest.spyOn(LoopProperties.prototype,'handleClose'); - const component = shallow(<LoopProperties history={historyMock} loopCache={loopCache}/>) + const handleClose = jest.spyOn(LoopPropertiesModal.prototype,'handleClose'); + const component = shallow(<LoopPropertiesModal history={historyMock} loopCache={loopCache}/>) component.find('[variant="secondary"]').prop('onClick')(); @@ -75,7 +75,7 @@ describe('Verify LoopProperties', () => { const flushPromises = () => new Promise(setImmediate); const historyMock = { push: jest.fn() }; const loadLoopFunction = jest.fn(); - const handleSave = jest.spyOn(LoopProperties.prototype,'handleSave'); + const handleSave = jest.spyOn(LoopPropertiesModal.prototype,'handleSave'); LoopService.updateGlobalProperties = jest.fn().mockImplementation(() => { return Promise.resolve({ ok: true, @@ -84,7 +84,7 @@ describe('Verify LoopProperties', () => { }); }); - const component = shallow(<LoopProperties history={historyMock} + const component = shallow(<LoopPropertiesModal history={historyMock} loopCache={loopCache} loadLoopFunction={loadLoopFunction} />) component.find('[variant="primary"]').prop('onClick')(); @@ -98,7 +98,7 @@ describe('Verify LoopProperties', () => { it('Onchange event', () => { const event = {target:{name:"dcaeDeployParameters", value:"{\"location_id\": \"testLocation\",\"policy_id\": \"TCA_h2NMX_v1_0_ResourceInstanceName1_tca\"}"}}; - const component = shallow(<LoopProperties loopCache={loopCache}/>); + const component = shallow(<LoopPropertiesModal loopCache={loopCache}/>); component.find('FormControl').simulate('change', event); component.update(); diff --git a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js index fbfc727eb..fbfc727eb 100644 --- a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.js +++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.js diff --git a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js index 208c947c3..208c947c3 100644 --- a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js +++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js diff --git a/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap index 1fd4b1047..bf06965be 100644 --- a/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/DeployLoopModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify DeployLoop Test the render method 1`] = ` +exports[`Verify DeployLoopModal Test the render method 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} diff --git a/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap index c7e81c392..fe9aee2ab 100644 --- a/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/LoopPropertiesModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify LoopProperties Test the render method 1`] = ` +exports[`Verify LoopPropertiesModal Test the render method 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} diff --git a/ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap index 9e7222415..9e7222415 100644 --- a/ui-react/src/components/dialogs/OpenLoop/__snapshots__/OpenLoopModal.test.js.snap +++ b/ui-react/src/components/dialogs/Loop/__snapshots__/OpenLoopModal.test.js.snap diff --git a/ui-react/src/components/dialogs/UserInfo.js b/ui-react/src/components/dialogs/UserInfoModal.js index 7d81b38b3..1273d87c0 100644 --- a/ui-react/src/components/dialogs/UserInfo.js +++ b/ui-react/src/components/dialogs/UserInfoModal.js @@ -33,7 +33,7 @@ const ModalStyled = styled(Modal)` background-color: transparent; ` -export default class UserInfo extends React.Component { +export default class UserInfoModal extends React.Component { constructor(props, context) { super(props, context); diff --git a/ui-react/src/components/dialogs/UserInfo.test.js b/ui-react/src/components/dialogs/UserInfoModal.test.js index beddde148..b5a2b272e 100644 --- a/ui-react/src/components/dialogs/UserInfo.test.js +++ b/ui-react/src/components/dialogs/UserInfoModal.test.js @@ -22,9 +22,9 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import UserInfo from './UserInfo'; +import UserInfoModal from './UserInfoModal'; -describe('Verify UserInfo', () => { +describe('Verify UserInfoModal', () => { beforeEach(() => { fetch.resetMocks(); @@ -42,7 +42,7 @@ describe('Verify UserInfo', () => { }) it('Test the render method full permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", @@ -57,7 +57,7 @@ describe('Verify UserInfo', () => { }); it('Test the render method no permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: {} }); @@ -65,7 +65,7 @@ describe('Verify UserInfo', () => { }); it('Test the render method read permission', () => { - const component = shallow(<UserInfo />) + const component = shallow(<UserInfoModal />) component.setState({ userInfo: { "userName": "test", "cldsVersion": "1.0.0", diff --git a/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap b/ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap index 1ae567a2d..fdb24a430 100644 --- a/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap +++ b/ui-react/src/components/dialogs/__snapshots__/UserInfoModal.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Verify UserInfo Test the render method full permission 1`] = ` +exports[`Verify UserInfoModal Test the render method full permission 1`] = ` <Styled(Bootstrap(Modal)) onHide={[Function]} show={true} |