From 9031629887fa278ae06dcdbc346d364b2fc262ca Mon Sep 17 00:00:00 2001 From: wiktord2000 Date: Fri, 20 Oct 2023 16:29:40 +0200 Subject: [PATCH] [AAE-17103] Update tests --- .../components/datatable/datatable.component.spec.ts | 11 +++++++++++ .../components/icon-cell/icon-cell.component.spec.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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');