ag-grid unit testing using jasmine karma in angular9

I have defined my ag-grid as follows:
.HTML page:

<button (click)="getSelectedRows()">Get Selected Rows</button>

    style="width: 500px; height: 500px;"
    [rowData]="rowData | async"

the TS page:

import { HttpClient } from '@angular/common/http';
import { Component, OnInit, ViewChild } from '@angular/core';
import { GridOptions } from 'ag-grid-community';
import { AgGridAngular } from 'ag-grid-angular';

  selector: 'app-samplegrid',
  templateUrl: './samplegrid.component.html',
  styleUrls: ['./samplegrid.component.scss']
export class SamplegridComponent implements OnInit {
  @ViewChild('agGrid') agGrid: AgGridAngular;

 columnDefs = [
  {headerName: 'Make', field: 'make', sortable: true, filter: true,
  checkboxSelection: true},
  {headerName: 'Model', field: 'model', sortable: true, filter: true},
  {headerName: 'Price', field: 'price', sortable: true, filter: true}
rowData: any;

  constructor(private http:HttpClient) { }

    this.rowData = this.http.get('');
    const selectedNodes = this.agGrid.api.getSelectedNodes();
        const selectedData = node => );
        const selectedDataStringPresentation = node => node.make + ' ' + node.model).join(', ');
        alert(`Selected nodes: ${selectedDataStringPresentation}`);
        return selectedDataStringPresentation;

My requirement is to perform unit testing for this component to check cell content and also when the particular row is selected.

I have written my test scripts as follows:

it('the grid cells should be as expected', () => {
  const appElement = fixture.nativeElement;
  const cellElements = appElement.querySelectorAll('.ag-cell-value');

this is failing with error :TypeError: Cannot read property ‘textContent’ of undefined

Also i am trying to imitate a select event and in order to get the selectd row i have written a test script as :

 it('getting the selected row data from the grid.', () => {
    let user_Data=component.agGrid.api.getSelectedRows();
    console.log(user_Data,"@ user_Data")

this is not failing but throwing user_data as blank.I wanted to know if there is any particular way of mocking data for ag-grid or mock ag-grid as a whole for unit testing purpose.
ANy help is welcomed.TIA.

Source: New feed
Source Url ag-grid unit testing using jasmine karma in angular9