@@ -645,49 +645,29 @@ describe('when on the list page', () => {
645645
646646 it ( 'should display Success overall policy status' , async ( ) => {
647647 const renderResult = await renderAndWaitForData ( ) ;
648- const policyStatusLink = await renderResult . findByTestId ( 'policyStatusValue' ) ;
649- expect ( policyStatusLink . textContent ) . toEqual ( 'Success' ) ;
650-
651- const policyStatusHealth = await renderResult . findByTestId ( 'policyStatusHealth' ) ;
652- expect (
653- policyStatusHealth . querySelector ( '[data-euiicon-type][color="success"]' )
654- ) . not . toBeNull ( ) ;
648+ const policyStatusBadge = await renderResult . findByTestId ( 'policyStatusValue' ) ;
649+ expect ( policyStatusBadge . textContent ) . toEqual ( 'Success' ) ;
655650 } ) ;
656651
657652 it ( 'should display Warning overall policy status' , async ( ) => {
658653 mockEndpointListApi ( createPolicyResponse ( HostPolicyResponseActionStatus . warning ) ) ;
659654 const renderResult = await renderAndWaitForData ( ) ;
660- const policyStatusLink = await renderResult . findByTestId ( 'policyStatusValue' ) ;
661- expect ( policyStatusLink . textContent ) . toEqual ( 'Warning' ) ;
662-
663- const policyStatusHealth = await renderResult . findByTestId ( 'policyStatusHealth' ) ;
664- expect (
665- policyStatusHealth . querySelector ( '[data-euiicon-type][color="warning"]' )
666- ) . not . toBeNull ( ) ;
655+ const policyStatusBadge = await renderResult . findByTestId ( 'policyStatusValue' ) ;
656+ expect ( policyStatusBadge . textContent ) . toEqual ( 'Warning' ) ;
667657 } ) ;
668658
669659 it ( 'should display Failed overall policy status' , async ( ) => {
670660 mockEndpointListApi ( createPolicyResponse ( HostPolicyResponseActionStatus . failure ) ) ;
671661 const renderResult = await renderAndWaitForData ( ) ;
672- const policyStatusLink = await renderResult . findByTestId ( 'policyStatusValue' ) ;
673- expect ( policyStatusLink . textContent ) . toEqual ( 'Failed' ) ;
674-
675- const policyStatusHealth = await renderResult . findByTestId ( 'policyStatusHealth' ) ;
676- expect (
677- policyStatusHealth . querySelector ( '[data-euiicon-type][color="danger"]' )
678- ) . not . toBeNull ( ) ;
662+ const policyStatusBadge = await renderResult . findByTestId ( 'policyStatusValue' ) ;
663+ expect ( policyStatusBadge . textContent ) . toEqual ( 'Failed' ) ;
679664 } ) ;
680665
681666 it ( 'should display Unknown overall policy status' , async ( ) => {
682667 mockEndpointListApi ( createPolicyResponse ( '' as HostPolicyResponseActionStatus ) ) ;
683668 const renderResult = await renderAndWaitForData ( ) ;
684- const policyStatusLink = await renderResult . findByTestId ( 'policyStatusValue' ) ;
685- expect ( policyStatusLink . textContent ) . toEqual ( 'Unknown' ) ;
686-
687- const policyStatusHealth = await renderResult . findByTestId ( 'policyStatusHealth' ) ;
688- expect (
689- policyStatusHealth . querySelector ( '[data-euiicon-type][color="subdued"]' )
690- ) . not . toBeNull ( ) ;
669+ const policyStatusBadge = await renderResult . findByTestId ( 'policyStatusValue' ) ;
670+ expect ( policyStatusBadge . textContent ) . toEqual ( 'Unknown' ) ;
691671 } ) ;
692672
693673 it ( 'should include the link to reassignment in Ingest' , async ( ) => {
0 commit comments