title: Not able to get the values of a sorted ag-grid column in an array using Protractor and Typescript
body: <p>I have to verify the sorting function in an ag-grid.
  When the UI is opened, the column data will be in some order.
  <br>I am sorting it in ascending order and then storing the values in a array.</p>
  
  <pre><code>ag_grid_utils.clickOnHeader("Name");
  var testArr=[];
  element.all(by.css('div.ag-body-container div[col-id="Name"]'))
      .map(function (Element) {
          element.getText().then(function (result) {
          console.log("result :: "+result);
          testArr.push(result);
      });
  })
  </code></pre>
  
  <p>However when I print the array, the values are not sorted. They are in the same order like when I open the UI first time.</p>
  
  <p>I have also added sleep statement after clicking on the header to verify the sorting in the UI. <br>Is there anything I am missing?
  Thanks in advance.</p>