diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index d49b4db5c71e2..cad9f352bf1b5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -410,10 +410,10 @@ describe('when on the hosts page', () => { it('should include the link to reassignment in Ingest', async () => { coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); const renderResult = render(); - const linkToLogs = await renderResult.findByTestId('hostDetailsLinkToIngest'); - expect(linkToLogs).not.toBeNull(); - expect(linkToLogs.textContent).toEqual('Reassign Policy'); - expect(linkToLogs.getAttribute('href')).toEqual( + const linkToReassign = await renderResult.findByTestId('hostDetailsLinkToIngest'); + expect(linkToReassign).not.toBeNull(); + expect(linkToReassign.textContent).toEqual('Reassign Policy'); + expect(linkToReassign.getAttribute('href')).toEqual( `/app/ingestManager#/fleet/agents/${agentId}/activity?openReassignFlyout=true` ); }); @@ -422,9 +422,9 @@ describe('when on the hosts page', () => { beforeEach(async () => { coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); const renderResult = render(); - const linkToLogs = await renderResult.findByTestId('hostDetailsLinkToIngest'); + const linkToReassign = await renderResult.findByTestId('hostDetailsLinkToIngest'); reactTestingLibrary.act(() => { - reactTestingLibrary.fireEvent.click(linkToLogs); + reactTestingLibrary.fireEvent.click(linkToReassign); }); });