diff --git a/superset-frontend/src/components/LastUpdated/LastUpdated.test.tsx b/superset-frontend/src/components/LastUpdated/LastUpdated.test.tsx
index 18014d49c..830695918 100644
--- a/superset-frontend/src/components/LastUpdated/LastUpdated.test.tsx
+++ b/superset-frontend/src/components/LastUpdated/LastUpdated.test.tsx
@@ -34,7 +34,7 @@ describe('LastUpdated', () => {
it('renders a refresh action', () => {
const mockAction = jest.fn();
wrapper = mount();
- const props = wrapper.find('[data-test="refresh"]').first().props();
+ const props = wrapper.find('[aria-label="refresh"]').first().props();
if (props.onClick) {
props.onClick({} as React.MouseEvent);
}
diff --git a/superset-frontend/src/components/LastUpdated/index.tsx b/superset-frontend/src/components/LastUpdated/index.tsx
index dc5595730..1b838b503 100644
--- a/superset-frontend/src/components/LastUpdated/index.tsx
+++ b/superset-frontend/src/components/LastUpdated/index.tsx
@@ -19,13 +19,13 @@
import React, { useEffect, useState, FunctionComponent } from 'react';
import moment, { Moment, MomentInput } from 'moment';
import { t, styled } from '@superset-ui/core';
-import Icon from 'src/components/Icon';
+import Icons from 'src/components/Icons';
const REFRESH_INTERVAL = 60000; // every minute
interface LastUpdatedProps {
updatedAt: MomentInput;
- update?: React.MouseEventHandler;
+ update?: React.MouseEventHandler;
}
moment.updateLocale('en', {
calendar: {
@@ -42,7 +42,7 @@ const TextStyles = styled.span`
color: ${({ theme }) => theme.colors.grayscale.base};
`;
-const Refresh = styled(Icon)`
+const Refresh = styled(Icons.Refresh)`
color: ${({ theme }) => theme.colors.primary.base};
width: auto;
height: ${({ theme }) => theme.gridUnit * 5}px;
@@ -72,7 +72,7 @@ export const LastUpdated: FunctionComponent = ({
return (
{t('Last Updated %s', timeSince.isValid() ? timeSince.calendar() : '--')}
- {update && }
+ {update && }
);
};