From f5a55c03237347d00c2920107399f363dcb36baf Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Wed, 19 Oct 2022 14:26:14 +0200 Subject: [PATCH] Fix Configuration test and remove UserData test --- .../SVGLDWebAPI/Controllers/SVGLDController.cs | 2 +- src/Components/API/api.test.tsx | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/csharp/SVGLDLibs/SVGLDWebAPI/Controllers/SVGLDController.cs b/csharp/SVGLDLibs/SVGLDWebAPI/Controllers/SVGLDController.cs index a1c936f..e6031aa 100644 --- a/csharp/SVGLDLibs/SVGLDWebAPI/Controllers/SVGLDController.cs +++ b/csharp/SVGLDLibs/SVGLDWebAPI/Controllers/SVGLDController.cs @@ -45,7 +45,7 @@ public class SVGLDController : ControllerBase } [HttpPost(Name = nameof(SVGLDLibs.Models.Configuration))] - public bool ConfigurationResponseModel(Configuration model) + public bool Configuration(Configuration model) { return true; } diff --git a/src/Components/API/api.test.tsx b/src/Components/API/api.test.tsx index 69116aa..ca8ff72 100644 --- a/src/Components/API/api.test.tsx +++ b/src/Components/API/api.test.tsx @@ -190,8 +190,7 @@ describe.concurrent('Models test suite', () => { } ], CustomSVG: 'string', - Style: {}, - UserData: [] + Style: {} }; it('AvailableContainerModel', async() => { @@ -234,7 +233,7 @@ describe.concurrent('Models test suite', () => { wrapper: 'string' }; - it('ConfigurationResponseModel', async() => { + it('Configuration', async() => { const model: IConfiguration = { AvailableContainers: [ availableContainerModel @@ -246,10 +245,15 @@ describe.concurrent('Models test suite', () => { category ], MainContainer: availableContainerModel, - Patterns: [pattern] + Patterns: [pattern], + APIConfiguration: { + apiFetchUrl: '', + apiGetFeedbackUrl: '', + apiSetContainerListUrl: '' + } }; - const res = await Post2API('ConfigurationResponseModel', JSON.stringify(model)); + const res = await Post2API('Configuration', JSON.stringify(model)); expect(res).toBe(true); });