From f35ce394bfb78969c8f6396980f241b0dcc22da3 Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Wed, 23 Jun 2021 09:40:06 -0700 Subject: [PATCH] refactor: migrate icon to icons in tablecollection (#15309) * initial commit * fix flaky test * remove line --- .../components/AlteredSliceTag/AlteredSliceTag.test.jsx | 4 ++-- .../src/components/dataViewCommon/TableCollection.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx b/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx index 17941445c9..6f3d5e33ab 100644 --- a/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx +++ b/superset-frontend/src/components/AlteredSliceTag/AlteredSliceTag.test.jsx @@ -128,8 +128,8 @@ describe('AlteredSliceTag', () => { ); const th = getTableWrapperFromModalBody(modalBody).find('th'); expect(th).toHaveLength(3); - ['Control', 'Before', 'After'].forEach((v, i) => { - expect(th.find('span').get(i).props.children[0]).toBe(v); + ['Control', 'Before', 'After'].forEach(async (v, i) => { + await expect(th.find('span').get(i).props.children[0]).toBe(v); }); }); diff --git a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx index e6f46609d9..b200eb158b 100644 --- a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx +++ b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx @@ -20,7 +20,7 @@ import React from 'react'; import cx from 'classnames'; import { TableInstance } from 'react-table'; import { styled } from '@superset-ui/core'; -import Icon from 'src/components/Icon'; +import Icons from 'src/components/Icons'; interface TableCollectionProps { getTableProps: (userProps?: any) => any; @@ -228,11 +228,11 @@ export default React.memo( {headerGroups.map(headerGroup => ( {headerGroup.headers.map(column => { - let sortIcon = ; + let sortIcon = ; if (column.isSorted && column.isSortedDesc) { - sortIcon = ; + sortIcon = ; } else if (column.isSorted && !column.isSortedDesc) { - sortIcon = ; + sortIcon = ; } return column.hidden ? null : (