diff --git a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.test.tsx b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.test.tsx index 20fab4238952b..2a1989cafa434 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.test.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.test.tsx @@ -102,17 +102,17 @@ describe('Ping Timestamp component', () => { data: { src }, refetch: () => null, }); - const { getByAltText, getByText, queryByAltText } = render( + const { getByAltText, getAllByText, queryByAltText } = render( ); - 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()); });