Merge remote-tracking branch 'client2/release' into release

This commit is contained in:
Arpit Mohan 2020-07-01 10:15:48 +05:30
commit 00dfaf6e72
5 changed files with 9 additions and 10 deletions

View File

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

View File

@ -246,14 +246,14 @@ const ApiEditorForm: React.FC<Props> = (props: Props) => {
label="Headers"
actionConfig={actionConfigurationHeaders}
placeholder="Value"
dataTreePath={`${actionName}.config.actionConfiguration.headers`}
dataTreePath={`${actionName}.config.headers`}
pushFields
/>
</HeadersSection>
<KeyValueFieldArray
name="actionConfiguration.queryParameters"
label="Params"
dataTreePath={`${actionName}.config.actionConfiguration.queryParameters`}
dataTreePath={`${actionName}.config.queryParameters`}
pushFields
/>
{allowPostBody && (
@ -261,7 +261,7 @@ const ApiEditorForm: React.FC<Props> = (props: Props) => {
actionConfigurationHeaders={actionConfigurationHeaders}
actionConfiguration={actionConfigurationBody}
change={props.change}
dataTreePath={`${actionName}.config.actionConfiguration`}
dataTreePath={`${actionName}.config`}
/>
)}
</RequestParamsWrapper>

View File

@ -426,7 +426,7 @@ const QueryEditorForm: React.FC<Props> = (props: Props) => {
) : isSQL ? (
<Field
name="actionConfiguration.body"
dataTreePath={`${props.actionName}.config.actionConfiguration.body`}
dataTreePath={`${props.actionName}.config.body`}
component={DynamicAutocompleteInput}
className="textAreaStyles"
mode="sql-js"
@ -435,7 +435,7 @@ const QueryEditorForm: React.FC<Props> = (props: Props) => {
) : (
<Field
name="actionConfiguration.body"
dataTreePath={`${props.actionName}.config.actionConfiguration.body`}
dataTreePath={`${props.actionName}.config.body`}
component={DynamicAutocompleteInput}
className="textAreaStyles"
mode="js-js"

View File

@ -392,7 +392,7 @@ function* updateFormFields(
function* updateDynamicBindingsSaga(
actionPayload: ReduxActionWithMeta<string, { field: string }>,
) {
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;

View File

@ -150,7 +150,7 @@ function* saveQueryAction() {
function* updateDynamicBindingsSaga(
actionPayload: ReduxActionWithMeta<string, { field: string }>,
) {
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);