aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-11-09 15:22:22 +0000
committerliamfallon <liam.fallon@est.tech>2021-11-10 08:57:23 +0000
commit2022e5ce5a03788a6edc5761c495cfadc5ded485 (patch)
tree2df93f088fb323440945ce93ce67be1f2208c9bf /runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
parent579085240812aa593ebafe787d97868e16fc3318 (diff)
Align ui-react file in policy-clamp and policy-gui
When the ui-react code was transferred to policy-gui, the white space was cleaned up and reformatted. This makes it difficult to track the real functional changes if any between ui-react in policy-clamp and policy-gui. This review brings the white space changes into ui-react in policy-clamp to make file comparisons easier. Issue-ID: POLICY-3358 Change-Id: Ic303e71b341e5c0f7ca0de0ed4c4962ebf2f988a Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js')
-rw-r--r--runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js b/runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
index cc8c59a03..5b5976046 100644
--- a/runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
+++ b/runtime/ui-react/src/components/dialogs/Policy/ToscaViewer.test.js
@@ -26,29 +26,29 @@ import { shallow, mount } from 'enzyme';
import PolicyToscaService from '../../../api/PolicyToscaService';
describe('Verify ToscaViewer', () => {
- const fs = require('fs');
+ const fs = require('fs');
- let toscaYaml = fs.readFileSync('src/components/dialogs/Policy/toscaData.test.yaml', {encoding:'utf8', flag:'r'})
+ let toscaYaml = fs.readFileSync('src/components/dialogs/Policy/toscaData.test.yaml', { encoding: 'utf8', flag: 'r' })
- const toscaData = {
- "policyModelType": "onap.policies.controlloop.Guard",
- "version": "1.0.0",
- "policyAcronym": "Guard",
- "createdDate": "2021-04-09T02:29:31.407356Z",
- "updatedDate": "2021-04-09T02:29:31.407356Z",
- "updatedBy": "Not found",
- "createdBy": "Not found",
- "tableData": {
- "id": 0
- }
- };
+ const toscaData = {
+ "policyModelType": "onap.policies.controlloop.Guard",
+ "version": "1.0.0",
+ "policyAcronym": "Guard",
+ "createdDate": "2021-04-09T02:29:31.407356Z",
+ "updatedDate": "2021-04-09T02:29:31.407356Z",
+ "updatedBy": "Not found",
+ "createdBy": "Not found",
+ "tableData": {
+ "id": 0
+ }
+ };
- it('Test the render method',async () => {
- PolicyToscaService.getToscaPolicyModelYaml = jest.fn().mockImplementation(() => {
- return Promise.resolve(toscaYaml);
- });
- const component = shallow(<ToscaViewer toscaData={toscaData}/>);
- await PolicyToscaService.getToscaPolicyModelYaml();
- expect(component).toMatchSnapshot();
- });
+ it('Test the render method', async () => {
+ PolicyToscaService.getToscaPolicyModelYaml = jest.fn().mockImplementation(() => {
+ return Promise.resolve(toscaYaml);
+ });
+ const component = shallow(<ToscaViewer toscaData={ toscaData }/>);
+ await PolicyToscaService.getToscaPolicyModelYaml();
+ expect(component).toMatchSnapshot();
+ });
});