summaryrefslogtreecommitdiffstats
path: root/ui-react/src
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-11-15 16:28:55 +0100
committersebdet <sebastien.determe@intl.att.com>2019-11-15 16:28:55 +0100
commit2e9ae128ca601171cb511d410ac9f3996a9b0513 (patch)
tree094d79453d3642334391cb4c50fe939b12b4dd20 /ui-react/src
parentdd1076847892089948fc8ae720da854237d1e857 (diff)
Fix naming convention
Fix naming convention in UI-react so that it's clearer Issue-ID: CLAMP-552 Change-Id: I758e0695f5b299514758c35aa699454b0c010974 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src')
-rw-r--r--ui-react/src/LoopUI.js4
-rw-r--r--ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js2
-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/__snapshots__/DeployLoopModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap)2
5 files changed, 18 insertions, 18 deletions
diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js
index 05f466bc6..bcdc4ffee 100644
--- a/ui-react/src/LoopUI.js
+++ b/ui-react/src/LoopUI.js
@@ -45,7 +45,7 @@ import LoopService from './api/LoopService';
import ViewToscaModal from './components/dialogs/ViewToscaModal/ViewToscaModal';
import PerformAction from './components/dialogs/PerformActions';
import RefreshStatus from './components/dialogs/RefreshStatus';
-import DeployLoop from './components/dialogs/DeployLoop';
+import DeployLoopModal from './components/dialogs/Loop/DeployLoopModal';
import Alert from 'react-bootstrap/Alert';
import { Link } from 'react-router-dom';
@@ -261,7 +261,7 @@ export default class LoopUI extends React.Component {
<Route path="/restart" render={(routeProps) => (<PerformAction {...routeProps} loopAction="restart" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
<Route path="/delete" render={(routeProps) => (<PerformAction {...routeProps} loopAction="delete" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
<Route path="/undeploy" render={(routeProps) => (<PerformAction {...routeProps} loopAction="undeploy" loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
- <Route path="/deploy" render={(routeProps) => (<DeployLoop {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
+ <Route path="/deploy" render={(routeProps) => (<DeployLoopModal {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
<Route path="/refreshStatus" render={(routeProps) => (<RefreshStatus {...routeProps} loopCache={this.getLoopCache()} updateLoopFunction={this.updateLoopCache} showAlert={this.showAlert}/>)} />
<Route path="/logout" render={this.logout} />
<GlobalClampStyle />
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/__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}