From ce0db169bce5d44ab36be7015a11c9a0205e05a1 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Fri, 29 Oct 2021 14:24:20 +0100 Subject: Added tests to improve coverage Added new tests and snapshots Altered existing tests to bring up coverage Altered package.json in response to warning messages Removed unused functions from ControlLoopService Added json testFiles Added utils directory for out-of-component functions Issue-ID: POLICY-3643 Change-Id: I3405a4421637e63235ff5176c913a5a5f9a4a44c Signed-off-by: saul.gill --- gui-clamp/ui-react/src/api/ControlLoopService.js | 33 ------------------------ 1 file changed, 33 deletions(-) (limited to 'gui-clamp/ui-react/src/api/ControlLoopService.js') diff --git a/gui-clamp/ui-react/src/api/ControlLoopService.js b/gui-clamp/ui-react/src/api/ControlLoopService.js index b3d987c..011d5ae 100644 --- a/gui-clamp/ui-react/src/api/ControlLoopService.js +++ b/gui-clamp/ui-react/src/api/ControlLoopService.js @@ -132,18 +132,6 @@ export default class ControlLoopService { return data; } - static async getToscaControlLoopDefinitions() { - - const response = await fetch(window.location.pathname + - 'restservices/clds/v2/toscaControlLoop/getElementDefinitions'); - - this.checkResponseForError(response); - - const data = await response; - - return data; - } - static async getCommonOrInstanceProperties(name, version, isCommon) { const params = { name: name, @@ -157,25 +145,4 @@ export default class ControlLoopService { return response; } - static async getToscaServiceTemplateSchema(section) { - - const params = { - section: section - } - - const response = await fetch(window.location.pathname + - 'restservices/clds/v2/toscaControlLoop/getJsonSchema' + '?' + (new URLSearchParams(params))); - - this.checkResponseForError(response); - - return response; - } - - static checkResponseForError(response) { - if (!response.ok) { - const message = `An error has occurred: ${ response.status }`; - throw new Error(message); - } - } - } -- cgit 1.2.3-korg