diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts index 40625032dbe..deea1534195 100644 --- a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts +++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts @@ -1207,6 +1207,17 @@ describe('DataTable', () => { expect(rows[1].getValue('is_available')).toBe('true'); expect(rows[2].getValue('is_available')).toBe('true'); }); + + it('should be able to display column of type icon', () => { + dataTable.data = new ObjectDataTableAdapter(mockCarsData, mockCarsSchemaDefinition); + + fixture.detectChanges(); + const rows = dataTable.data.getRows(); + + expect(rows[0].getValue('icon')).toBe('airport_shuttle'); + expect(rows[1].getValue('icon')).toBe('directions_car'); + expect(rows[2].getValue('icon')).toBe('local_shipping'); + }); }); describe('Accesibility', () => { diff --git a/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.spec.ts b/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.spec.ts index f9da80763da..37a656da175 100644 --- a/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.spec.ts +++ b/lib/core/src/lib/datatable/components/icon-cell/icon-cell.component.spec.ts @@ -81,7 +81,7 @@ describe('IconCellComponent', () => { }); describe('UI', () => { - it('should render icon element in case of non-empty string', () => { + it('should render icon element in case of non-empty string (icon name validation NOT included)', () => { renderAndCheckResult('group', true, 'group'); renderAndCheckResult('groupe', true, 'groupe'); renderAndCheckResult('0', true, '0');