1+ import { mockCompanyResponse } from '@/src/common/api/fixtures/companies' ;
12import { OnboardingFlow } from '@/src/flows/Onboarding/OnboardingFlow' ;
23import {
34 basicInformationSchemaV1Portugal ,
4- benefitOffersResponse ,
5- benefitOffersSchema ,
6- companyResponse ,
75 contractDetailsSchemaV1Portugal ,
86 employmentDefaultResponse ,
97} from '@/src/flows/Onboarding/tests/fixtures' ;
@@ -77,10 +75,6 @@ describe('OnboardingInvite', () => {
7775 queryClient . clear ( ) ;
7876
7977 server . use (
80- http . get ( '*/v1/companies/:companyId' , ( ) => {
81- return HttpResponse . json ( companyResponse ) ;
82- } ) ,
83-
8478 http . get ( '*/v1/countries/*/employment_basic_information*' , ( ) => {
8579 return HttpResponse . json ( basicInformationSchemaV1Portugal ) ;
8680 } ) ,
@@ -93,13 +87,6 @@ describe('OnboardingInvite', () => {
9387 return HttpResponse . json ( employmentDefaultResponse ) ;
9488 } ) ,
9589
96- http . get ( '*/v1/employments/*/benefit-offers/schema' , ( ) => {
97- return HttpResponse . json ( benefitOffersSchema ) ;
98- } ) ,
99-
100- http . get ( '*/v1/employments/*/benefit-offers' , ( ) => {
101- return HttpResponse . json ( benefitOffersResponse ) ;
102- } ) ,
10390 http . post ( '*/v1/employments/:employmentId/invite' , ( ) => {
10491 return HttpResponse . json ( {
10592 data : { status : 'ok' } ,
@@ -132,11 +119,11 @@ describe('OnboardingInvite', () => {
132119 server . use (
133120 http . get ( '*/v1/companies/:companyId' , ( ) => {
134121 return HttpResponse . json ( {
135- ...companyResponse ,
122+ ...mockCompanyResponse ,
136123 data : {
137- ...companyResponse . data ,
124+ ...mockCompanyResponse . data ,
138125 company : {
139- ...companyResponse . data . company ,
126+ ...mockCompanyResponse . data . company ,
140127 default_legal_entity_credit_risk_status : 'deposit_required' ,
141128 } ,
142129 } ,
@@ -228,11 +215,11 @@ describe('OnboardingInvite', () => {
228215 server . use (
229216 http . get ( '*/v1/companies/:companyId' , ( ) => {
230217 return HttpResponse . json ( {
231- ...companyResponse ,
218+ ...mockCompanyResponse ,
232219 data : {
233- ...companyResponse . data ,
220+ ...mockCompanyResponse . data ,
234221 company : {
235- ...companyResponse . data . company ,
222+ ...mockCompanyResponse . data . company ,
236223 default_legal_entity_credit_risk_status : 'deposit_required' ,
237224 } ,
238225 } ,
@@ -286,11 +273,11 @@ describe('OnboardingInvite', () => {
286273 server . use (
287274 http . get ( '*/v1/companies/:companyId' , ( ) => {
288275 return HttpResponse . json ( {
289- ...companyResponse ,
276+ ...mockCompanyResponse ,
290277 data : {
291- ...companyResponse . data ,
278+ ...mockCompanyResponse . data ,
292279 company : {
293- ...companyResponse . data . company ,
280+ ...mockCompanyResponse . data . company ,
294281 default_legal_entity_credit_risk_status : 'deposit_required' ,
295282 } ,
296283 } ,
@@ -330,11 +317,11 @@ describe('OnboardingInvite', () => {
330317 server . use (
331318 http . get ( '*/v1/companies/:companyId' , ( ) => {
332319 return HttpResponse . json ( {
333- ...companyResponse ,
320+ ...mockCompanyResponse ,
334321 data : {
335- ...companyResponse . data ,
322+ ...mockCompanyResponse . data ,
336323 company : {
337- ...companyResponse . data . company ,
324+ ...mockCompanyResponse . data . company ,
338325 default_legal_entity_credit_risk_status : 'deposit_not_required' ,
339326 } ,
340327 } ,
@@ -354,11 +341,11 @@ describe('OnboardingInvite', () => {
354341 server . use (
355342 http . get ( '*/v1/companies/:companyId' , ( ) => {
356343 return HttpResponse . json ( {
357- ...companyResponse ,
344+ ...mockCompanyResponse ,
358345 data : {
359- ...companyResponse . data ,
346+ ...mockCompanyResponse . data ,
360347 company : {
361- ...companyResponse . data . company ,
348+ ...mockCompanyResponse . data . company ,
362349 default_legal_entity_credit_risk_status : 'deposit_required' ,
363350 } ,
364351 } ,
@@ -392,11 +379,11 @@ describe('OnboardingInvite', () => {
392379 server . use (
393380 http . get ( '*/v1/companies/:companyId' , ( ) => {
394381 return HttpResponse . json ( {
395- ...companyResponse ,
382+ ...mockCompanyResponse ,
396383 data : {
397- ...companyResponse . data ,
384+ ...mockCompanyResponse . data ,
398385 company : {
399- ...companyResponse . data . company ,
386+ ...mockCompanyResponse . data . company ,
400387 default_legal_entity_credit_risk_status : 'deposit_required' ,
401388 } ,
402389 } ,
@@ -502,11 +489,11 @@ describe('OnboardingInvite', () => {
502489 server . use (
503490 http . get ( '*/v1/companies/:companyId' , ( ) => {
504491 return HttpResponse . json ( {
505- ...companyResponse ,
492+ ...mockCompanyResponse ,
506493 data : {
507- ...companyResponse . data ,
494+ ...mockCompanyResponse . data ,
508495 company : {
509- ...companyResponse . data . company ,
496+ ...mockCompanyResponse . data . company ,
510497 default_legal_entity_credit_risk_status : 'deposit_required' ,
511498 } ,
512499 } ,
@@ -545,11 +532,11 @@ describe('OnboardingInvite', () => {
545532 server . use (
546533 http . get ( '*/v1/companies/:companyId' , ( ) => {
547534 return HttpResponse . json ( {
548- ...companyResponse ,
535+ ...mockCompanyResponse ,
549536 data : {
550- ...companyResponse . data ,
537+ ...mockCompanyResponse . data ,
551538 company : {
552- ...companyResponse . data . company ,
539+ ...mockCompanyResponse . data . company ,
553540 default_legal_entity_credit_risk_status : 'deposit_required' ,
554541 } ,
555542 } ,
@@ -586,11 +573,11 @@ describe('OnboardingInvite', () => {
586573 server . use (
587574 http . get ( '*/v1/companies/:companyId' , ( ) => {
588575 return HttpResponse . json ( {
589- ...companyResponse ,
576+ ...mockCompanyResponse ,
590577 data : {
591- ...companyResponse . data ,
578+ ...mockCompanyResponse . data ,
592579 company : {
593- ...companyResponse . data . company ,
580+ ...mockCompanyResponse . data . company ,
594581 default_legal_entity_credit_risk_status : 'deposit_required' ,
595582 } ,
596583 } ,
@@ -644,11 +631,11 @@ describe('OnboardingInvite', () => {
644631 server . use (
645632 http . get ( '*/v1/companies/:companyId' , ( ) => {
646633 return HttpResponse . json ( {
647- ...companyResponse ,
634+ ...mockCompanyResponse ,
648635 data : {
649- ...companyResponse . data ,
636+ ...mockCompanyResponse . data ,
650637 company : {
651- ...companyResponse . data . company ,
638+ ...mockCompanyResponse . data . company ,
652639 default_legal_entity_credit_risk_status : 'no_deposit_required' ,
653640 } ,
654641 } ,
@@ -712,11 +699,11 @@ describe('OnboardingInvite', () => {
712699 server . use (
713700 http . get ( '*/v1/companies/:companyId' , ( ) => {
714701 return HttpResponse . json ( {
715- ...companyResponse ,
702+ ...mockCompanyResponse ,
716703 data : {
717- ...companyResponse . data ,
704+ ...mockCompanyResponse . data ,
718705 company : {
719- ...companyResponse . data . company ,
706+ ...mockCompanyResponse . data . company ,
720707 default_legal_entity_credit_risk_status : 'deposit_not_required' ,
721708 } ,
722709 } ,
@@ -782,11 +769,11 @@ describe('OnboardingInvite', () => {
782769 server . use (
783770 http . get ( '*/v1/companies/:companyId' , ( ) => {
784771 return HttpResponse . json ( {
785- ...companyResponse ,
772+ ...mockCompanyResponse ,
786773 data : {
787- ...companyResponse . data ,
774+ ...mockCompanyResponse . data ,
788775 company : {
789- ...companyResponse . data . company ,
776+ ...mockCompanyResponse . data . company ,
790777 default_legal_entity_credit_risk_status : 'deposit_not_required' ,
791778 } ,
792779 } ,
@@ -809,11 +796,11 @@ describe('OnboardingInvite', () => {
809796 server . use (
810797 http . get ( '*/v1/companies/:companyId' , ( ) => {
811798 return HttpResponse . json ( {
812- ...companyResponse ,
799+ ...mockCompanyResponse ,
813800 data : {
814- ...companyResponse . data ,
801+ ...mockCompanyResponse . data ,
815802 company : {
816- ...companyResponse . data . company ,
803+ ...mockCompanyResponse . data . company ,
817804 default_legal_entity_credit_risk_status : 'deposit_required' ,
818805 } ,
819806 } ,
@@ -847,11 +834,11 @@ describe('OnboardingInvite', () => {
847834 server . use (
848835 http . get ( '*/v1/companies/:companyId' , ( ) => {
849836 return HttpResponse . json ( {
850- ...companyResponse ,
837+ ...mockCompanyResponse ,
851838 data : {
852- ...companyResponse . data ,
839+ ...mockCompanyResponse . data ,
853840 company : {
854- ...companyResponse . data . company ,
841+ ...mockCompanyResponse . data . company ,
855842 default_legal_entity_credit_risk_status : 'deposit_required' ,
856843 } ,
857844 } ,
@@ -1063,11 +1050,11 @@ describe('OnboardingInvite', () => {
10631050 server . use (
10641051 http . get ( '*/v1/companies/:companyId' , ( ) => {
10651052 return HttpResponse . json ( {
1066- ...companyResponse ,
1053+ ...mockCompanyResponse ,
10671054 data : {
1068- ...companyResponse . data ,
1055+ ...mockCompanyResponse . data ,
10691056 company : {
1070- ...companyResponse . data . company ,
1057+ ...mockCompanyResponse . data . company ,
10711058 default_legal_entity_credit_risk_status : 'deposit_required' ,
10721059 } ,
10731060 } ,
0 commit comments