hunk.code_window: };
   const apiNameReducer = createReducer(initialState, {
     [ReduxActionErrorTypes.SAVE_API_NAME_ERROR]: (
       state: ApiNameReduxState,
       action: ReduxAction<{ actionId: string }>,
     ) => {
       return {
         ...state,
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:   [ReduxActionErrorTypes.SAVE_ACTION_NAME_ERROR]: (
  
hunk.file_path: app/client/src/reducers/uiReducers/apiNameReducer.ts
hunk.type: replace
file: const queryLocators = require("../../../../locators/QueryEditor.json");
  const plugins = require("../../../../fixtures/plugins.json");
  const datasource = require("../../../../locators/DatasourcesEditor.json");
  
  let datasourceName;
  
  describe("Create a query with a mongo datasource, run, save and then delete the query", function() {
    it("Create a query with a mongo datasource, run, save and then delete the query", function() {
      cy.NavigateToDatasourceEditor();
      cy.get(datasource.MongoDB).click();
  
      cy.getPluginFormsAndCreateDatasource();
  
      cy.fillMongoDatasourceForm();
  
      cy.testSaveDatasource();
  
      cy.NavigateToQueryEditor();
  
      cy.get("@createDatasource").then((httpResponse) => {
        datasourceName = httpResponse.response.body.data.name;
  
        cy.contains(".t--datasource-name", datasourceName)
          .find(queryLocators.createQuery)
          .click();
      });
  
      cy.get("@getPluginForm").should(
        "have.nested.property",
        "response.body.responseMeta.status",
        200,
      );
  
      cy.get(queryLocators.templateMenu).click();
      cy.get(".CodeMirror textarea")
        .first()
        .focus()
        .type(`{"find": "listingsAndReviews","limit": 10}`, {
          parseSpecialCharSequences: false,
        });
  
      cy.EvaluateCurrentValue(`{"find": "listingsAndReviews","limit": 10}`);
      cy.runAndDeleteQuery();
  
      cy.get("@createDatasource").then((httpResponse) => {
        datasourceName = httpResponse.response.body.data.name;
  
        cy.deleteDatasource(datasourceName);
      });
    });
  });
  