diff options
Diffstat (limited to 'ui-react/src/components')
-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/__snapshots__/LoopPropertiesModal.test.js.snap (renamed from ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap) | 2 |
3 files changed, 13 insertions, 13 deletions
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/__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} |