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) 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);