Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Feb 15, 2021
1 parent b4396e2 commit 48d219f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ describe('Ping Timestamp component', () => {
data: { src },
refetch: () => null,
});
const { getByAltText, getByText, queryByAltText } = render(
const { getByAltText, getAllByText, queryByAltText } = render(
<PingTimestamp ping={response} timestamp={response.timestamp} />
);
const caption = getByText('Nov 26, 2020 10:28:56 AM');
fireEvent.mouseEnter(caption);
const caption = getAllByText('Nov 26, 2020 10:28:56 AM');
fireEvent.mouseEnter(caption[0]);

const altText = `A larger version of the screenshot for this journey step's thumbnail.`;

await waitFor(() => getByAltText(altText));

fireEvent.mouseLeave(caption);
fireEvent.mouseLeave(caption[0]);

await waitFor(() => expect(queryByAltText(altText)).toBeNull());
});
Expand Down

0 comments on commit 48d219f

Please sign in to comment.