Extracts the text of cells only under a particular column.
(rowsData: MatRowHarnessColumnsText[], column: string)
| 113 | |
| 114 | /** Extracts the text of cells only under a particular column. */ |
| 115 | function getCellTextsByColumn(rowsData: MatRowHarnessColumnsText[], column: string): string[] { |
| 116 | const columnTexts: string[] = []; |
| 117 | |
| 118 | rowsData.forEach(data => { |
| 119 | Object.keys(data).forEach(columnName => { |
| 120 | if (columnName === column) { |
| 121 | columnTexts.push(data[columnName]); |
| 122 | } |
| 123 | }); |
| 124 | }); |
| 125 | |
| 126 | return columnTexts; |
| 127 | } |
no test coverage detected