@@ -44,6 +44,7 @@ import {
4444 mockContractorSubscriptionWithBlockedEligibilityResponse ,
4545 mockContractorSubscriptionWithEligibilityResponse ,
4646 mockCOROnlyResponse ,
47+ mockCMOnlyResponse ,
4748} from '@/src/common/api/fixtures/contractors-subscriptions' ;
4849import { mockBlockedEligibilityQuestionnaireResponse } from '@/src/common/api/fixtures/eligibility-questionnaire' ;
4950
@@ -2327,6 +2328,45 @@ describe('ContractorOnboardingFlow', () => {
23272328 } ) ;
23282329 } ) ;
23292330
2331+ it ( 'should show Employer of Record option when only CM subscription is available' , async ( ) => {
2332+ server . use (
2333+ http . get (
2334+ '*/v1/contractors/employments/*/contractor-subscriptions' ,
2335+ ( ) => {
2336+ return HttpResponse . json ( mockCMOnlyResponse ) ;
2337+ } ,
2338+ ) ,
2339+ ) ;
2340+
2341+ mockRender . mockImplementation (
2342+ createMockRenderImplementation ( MultiStepFormWithoutCountry ) ,
2343+ ) ;
2344+
2345+ render (
2346+ < ContractorOnboardingFlow
2347+ { ...defaultProps }
2348+ countryCode = 'PRT'
2349+ skipSteps = { [ 'select_country' ] }
2350+ /> ,
2351+ { wrapper : TestProviders } ,
2352+ ) ;
2353+
2354+ await screen . findByText ( / S t e p : B a s i c I n f o r m a t i o n / i) ;
2355+ await fillBasicInformation ( ) ;
2356+
2357+ const nextButton = screen . getByText ( / N e x t S t e p / i) ;
2358+ nextButton . click ( ) ;
2359+
2360+ await screen . findByText ( / S t e p : P r i c i n g P l a n / i) ;
2361+
2362+ await waitFor ( ( ) => {
2363+ const eorOption = screen . getByRole ( 'radio' , {
2364+ name : / E m p l o y e r o f R e c o r d / i,
2365+ } ) ;
2366+ expect ( eorOption ) . toBeInTheDocument ( ) ;
2367+ } ) ;
2368+ } ) ;
2369+
23302370 it ( 'should NOT show Employer of Record option when eor_onboarding is false' , async ( ) => {
23312371 server . use (
23322372 http . get ( '*/v1/countries' , ( ) => {
0 commit comments