@@ -517,6 +517,7 @@ describe('MultiPageMenu', () => {
517517 } ,
518518 asrEit : { asrEligibility : true } ,
519519 salaryRequestEligible : true ,
520+ designationSupportCalculatorEligible : true ,
520521 } ,
521522 ] ,
522523 } ,
@@ -540,22 +541,23 @@ describe('MultiPageMenu', () => {
540541 expect ( getByText ( 'MPD Goal Calculator' ) ) . toBeInTheDocument ( ) ;
541542 expect ( getByText ( 'MHA Calculation Tool' ) ) . toBeInTheDocument ( ) ;
542543 expect ( getByText ( 'Additional Salary Request' ) ) . toBeInTheDocument ( ) ;
544+ expect (
545+ getByText ( 'Paid with Designation Support Goal Calculator' ) ,
546+ ) . toBeInTheDocument ( ) ;
543547 expect ( getByText ( 'Ministry Partner Reminders' ) ) . toBeInTheDocument ( ) ;
544548 } ) ;
545549
546- it ( 'hides the PDS Goal Calculator nav item for SupportedRmo (senior) staff ' , async ( ) => {
547- const { findByText, getByText , queryByText } = render (
550+ it ( 'hides MPD Goal Calculator when salaryRequestEligible is false ' , async ( ) => {
551+ const { findByText, queryByText } = render (
548552 < ThemeProvider theme = { theme } >
549553 < TestRouter router = { router } >
550554 < GqlMockedProvider < { Hcm : HcmQuery } >
551555 mocks = { {
552556 Hcm : {
553557 hcm : [
554558 {
555- staffInfo : {
556- peopleGroupSupportType :
557- PeopleGroupSupportTypeEnum . SupportedRmo ,
558- } ,
559+ salaryRequestEligible : false ,
560+ designationSupportCalculatorEligible : true ,
559561 } ,
560562 ] ,
561563 } ,
@@ -574,27 +576,23 @@ describe('MultiPageMenu', () => {
574576 </ ThemeProvider > ,
575577 ) ;
576578
577- expect ( await findByText ( 'MPD Goal Calculator' ) ) . toBeInTheDocument ( ) ;
578579 expect (
579- queryByText ( 'Paid with Designation Support Goal Calculator' ) ,
580- ) . not . toBeInTheDocument ( ) ;
581- expect ( getByText ( 'Savings Fund Transfer' ) ) . toBeInTheDocument ( ) ;
582- expect ( getByText ( 'Ministry Partner Reminders' ) ) . toBeInTheDocument ( ) ;
580+ await findByText ( 'Paid with Designation Support Goal Calculator' ) ,
581+ ) . toBeInTheDocument ( ) ;
582+ expect ( queryByText ( 'MPD Goal Calculator' ) ) . not . toBeInTheDocument ( ) ;
583583 } ) ;
584584
585- it ( 'hides the MPD Goal Calculator nav item for Designation (PDS) staff ' , async ( ) => {
586- const { findByText, getByText , queryByText } = render (
585+ it ( 'hides PDS Goal Calculator when designationSupportCalculatorEligible is false ' , async ( ) => {
586+ const { findByText, queryByText } = render (
587587 < ThemeProvider theme = { theme } >
588588 < TestRouter router = { router } >
589589 < GqlMockedProvider < { Hcm : HcmQuery } >
590590 mocks = { {
591591 Hcm : {
592592 hcm : [
593593 {
594- staffInfo : {
595- peopleGroupSupportType :
596- PeopleGroupSupportTypeEnum . Designation ,
597- } ,
594+ salaryRequestEligible : true ,
595+ designationSupportCalculatorEligible : false ,
598596 } ,
599597 ] ,
600598 } ,
@@ -613,11 +611,9 @@ describe('MultiPageMenu', () => {
613611 </ ThemeProvider > ,
614612 ) ;
615613
614+ expect ( await findByText ( 'MPD Goal Calculator' ) ) . toBeInTheDocument ( ) ;
616615 expect (
617- await findByText ( 'Paid with Designation Support Goal Calculator' ) ,
618- ) . toBeInTheDocument ( ) ;
619- expect ( queryByText ( 'MPD Goal Calculator' ) ) . not . toBeInTheDocument ( ) ;
620- expect ( getByText ( 'Savings Fund Transfer' ) ) . toBeInTheDocument ( ) ;
621- expect ( getByText ( 'Ministry Partner Reminders' ) ) . toBeInTheDocument ( ) ;
616+ queryByText ( 'Paid with Designation Support Goal Calculator' ) ,
617+ ) . not . toBeInTheDocument ( ) ;
622618 } ) ;
623619} ) ;
0 commit comments