From 46f0873efe38bc0dd28f130b6f3319d0bb62a218 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Tue, 30 Jun 2020 15:19:30 +0530 Subject: [PATCH 1/2] update paths --- app/client/src/pages/Editor/APIEditor/Form.tsx | 6 +++--- app/client/src/pages/Editor/QueryEditor/Form.tsx | 4 ++-- app/client/src/sagas/ApiPaneSagas.ts | 2 +- app/client/src/sagas/QueryPaneSagas.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/client/src/pages/Editor/APIEditor/Form.tsx b/app/client/src/pages/Editor/APIEditor/Form.tsx index 001640c98e..8df2d116d8 100644 --- a/app/client/src/pages/Editor/APIEditor/Form.tsx +++ b/app/client/src/pages/Editor/APIEditor/Form.tsx @@ -246,14 +246,14 @@ const ApiEditorForm: React.FC = (props: Props) => { label="Headers" actionConfig={actionConfigurationHeaders} placeholder="Value" - dataTreePath={`${actionName}.config.actionConfiguration.headers`} + dataTreePath={`${actionName}.config.headers`} pushFields /> {allowPostBody && ( @@ -261,7 +261,7 @@ const ApiEditorForm: React.FC = (props: Props) => { actionConfigurationHeaders={actionConfigurationHeaders} actionConfiguration={actionConfigurationBody} change={props.change} - dataTreePath={`${actionName}.config.actionConfiguration`} + dataTreePath={`${actionName}.config`} /> )} diff --git a/app/client/src/pages/Editor/QueryEditor/Form.tsx b/app/client/src/pages/Editor/QueryEditor/Form.tsx index 15b5066eba..3792154e73 100644 --- a/app/client/src/pages/Editor/QueryEditor/Form.tsx +++ b/app/client/src/pages/Editor/QueryEditor/Form.tsx @@ -426,7 +426,7 @@ const QueryEditorForm: React.FC = (props: Props) => { ) : isSQL ? ( = (props: Props) => { ) : ( , ) { - const field = actionPayload.meta.field; + const field = actionPayload.meta.field.replace("actionConfiguration.", ""); const value = actionPayload.payload; const { values } = yield select(getFormData, API_EDITOR_FORM_NAME); if (!values.id) return; diff --git a/app/client/src/sagas/QueryPaneSagas.ts b/app/client/src/sagas/QueryPaneSagas.ts index 036659a9f5..1019a96f85 100644 --- a/app/client/src/sagas/QueryPaneSagas.ts +++ b/app/client/src/sagas/QueryPaneSagas.ts @@ -150,7 +150,7 @@ function* saveQueryAction() { function* updateDynamicBindingsSaga( actionPayload: ReduxActionWithMeta, ) { - const field = actionPayload.meta.field; + const field = actionPayload.meta.field.replace("actionConfiguration.", ""); if (field === "dynamicBindingPathList") return; const value = actionPayload.payload; const { values } = yield select(getFormData, QUERY_EDITOR_FORM_NAME); From b8e367dacdbc91ef922ea4e82a45e3f6bf2aac11 Mon Sep 17 00:00:00 2001 From: Nandan H A Date: Wed, 1 Jul 2020 03:45:13 +0000 Subject: [PATCH 2/2] Curl test fix --- .../Smoke_TestSuite/ApiPaneTests/API_CurlPOSTImport_spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_CurlPOSTImport_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_CurlPOSTImport_spec.js index 784a655f38..2bb8ef2cb1 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_CurlPOSTImport_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_CurlPOSTImport_spec.js @@ -7,16 +7,15 @@ describe("Test curl import flow", function() { cy.NavigateToApiEditor(); cy.get(ApiEditor.curlImage).click({ force: true }); cy.get("textarea").type( - "curl -d { name : 'morpheus',job : 'leader'} -H Content-Type: application/json https://reqres.in/api/users", + "curl -d {name:'morpheus',job:'leader'} -H Content-Type:application/json https://reqres.in/api/users", { force: true, parseSpecialCharSequences: false, }, ); cy.importCurl(); - cy.xpath(apiwidget.EditApiName).should("be.visible"); cy.RunAPI(); - cy.ResponseStatusCheck("200 OK"); + cy.ResponseStatusCheck("201 CREATED"); cy.get("@curlImport").then(response => { cy.expect(response.response.body.responseMeta.success).to.eq(true); cy.get(apiwidget.ApiName)