Skip to content

Commit

Permalink
test: Fixes act errors in LastUpdated test
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Sep 9, 2022
1 parent 3197cc6 commit 1333d29
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import React from 'react';
import { ReactWrapper } from 'enzyme';
import { styledMount as mount } from 'spec/helpers/theming';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import LastUpdated from '.';

describe('LastUpdated', () => {
Expand All @@ -31,9 +32,10 @@ describe('LastUpdated', () => {
expect(/^Last Updated .+$/.test(wrapper.text())).toBe(true);
});

it('renders a refresh action', () => {
it('renders a refresh action', async () => {
const mockAction = jest.fn();
wrapper = mount(<LastUpdated updatedAt={updatedAt} update={mockAction} />);
await waitForComponentToPaint(wrapper);
const props = wrapper.find('[aria-label="refresh"]').first().props();
if (props.onClick) {
props.onClick({} as React.MouseEvent);
Expand Down

0 comments on commit 1333d29

Please sign in to comment.