aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js')
-rw-r--r--ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js27
1 files changed, 1 insertions, 26 deletions
diff --git a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js
index 94d4acdc8..e11d86f53 100644
--- a/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js
+++ b/ui-react/src/components/dialogs/Tosca/ViewLoopTemplatesModal.test.js
@@ -28,8 +28,7 @@ import { mount } from 'enzyme';
describe('Verify ViewLoopTemplatesModal', () => {
beforeEach(() => {
fetch.resetMocks();
- }
- );
+ });
it('Test API Successful', () => {
fetch.mockImplementationOnce(() => {
@@ -78,7 +77,6 @@ describe('Verify ViewLoopTemplatesModal', () => {
}),
100
);
- new Promise(resolve => setTimeout(resolve, 200));
const component = shallow(<ViewLoopTemplatesModal/>);
expect(myMockFunc.mock.calls.length).toBe(1);
});
@@ -133,29 +131,6 @@ describe('Verify ViewLoopTemplatesModal', () => {
const component = mount(<ViewLoopTemplatesModal/>);
expect(component.find('[className="MuiSelect-icon MuiTablePagination-selectIcon"]')).toBeTruthy();
});
-
- it('Test handleYamlContent', () => {
- fetch.mockImplementationOnce(() => {
- return Promise.resolve({
- ok: true,
- status: 200,
- json: () => {
- return Promise.resolve({
- "index": "1",
- "name": "MTCA version 1",
- "modelService.serviceDetails.name": "MTCA",
- "allowedLoopType" : "CLOSED",
- "maximumInstancesAllowed":1,
- "updatedDate":"2019-09-06 19:09:42"
- });
- }
- });
- });
- const yamlContent = 'MTCA version 1';
- const component = shallow(<ViewLoopTemplatesModal/>);
- component.find('[value="Please select a loop template to display it"]').prop('onChange')({ target: { value: yamlContent }});
- expect(component.state('content')).toEqual(yamlContent);
- });
it('Test handleClose', () => {
fetch.mockImplementationOnce(() => {