@@ -110,14 +110,14 @@ describe('Credentials Prompts', () => {
110110
111111 describe ( 'Password Prompt' , ( ) => {
112112 let passwordPrompt : any ;
113- let mockGetSystemInfo : jest . Mock ;
113+ let mockGetCsrfToken : jest . Mock ;
114114
115115 beforeEach ( ( ) => {
116116 const result = getCredentialsPrompts ( mockAbapTarget , mockLogger ) ;
117117 passwordPrompt = result [ 1 ] ;
118- mockGetSystemInfo = jest . fn ( ) ;
118+ mockGetCsrfToken = jest . fn ( ) ;
119119 mockGetConfiguredProvider . mockResolvedValue ( {
120- getLayeredRepository : ( ) => ( { getSystemInfo : mockGetSystemInfo } )
120+ getLayeredRepository : ( ) => ( { getCsrfToken : mockGetCsrfToken } )
121121 } as unknown as AbapServiceProvider ) ;
122122 } ) ;
123123
@@ -139,7 +139,7 @@ describe('Credentials Prompts', () => {
139139 mockIsAppStudio . mockReturnValue ( false ) ;
140140 mockAbapTarget . url = 'some-system' ;
141141 mockValidateEmptyString . mockReturnValue ( true ) ;
142- mockGetSystemInfo . mockResolvedValue ( { } ) ;
142+ mockGetCsrfToken . mockResolvedValue ( { } ) ;
143143
144144 const prompts = getCredentialsPrompts ( mockAbapTarget , mockLogger ) ;
145145 const passwordPrompt = prompts [ 1 ] ;
@@ -159,15 +159,15 @@ describe('Credentials Prompts', () => {
159159 } ,
160160 mockLogger
161161 ) ;
162- expect ( mockGetSystemInfo ) . toHaveBeenCalled ( ) ;
162+ expect ( mockGetCsrfToken ) . toHaveBeenCalled ( ) ;
163163 expect ( result ) . toBe ( true ) ;
164164 } ) ;
165165
166166 it ( 'should use destination when in AppStudio' , async ( ) => {
167167 mockIsAppStudio . mockReturnValue ( true ) ;
168168 mockAbapTarget . destination = 'SYS_010' ;
169169 mockValidateEmptyString . mockReturnValue ( true ) ;
170- mockGetSystemInfo . mockResolvedValue ( { } ) ;
170+ mockGetCsrfToken . mockResolvedValue ( { } ) ;
171171
172172 const prompts = getCredentialsPrompts ( mockAbapTarget , mockLogger ) ;
173173 const passwordPrompt = prompts [ 1 ] ;
@@ -187,7 +187,7 @@ describe('Credentials Prompts', () => {
187187 } ,
188188 mockLogger
189189 ) ;
190- expect ( mockGetSystemInfo ) . toHaveBeenCalled ( ) ;
190+ expect ( mockGetCsrfToken ) . toHaveBeenCalled ( ) ;
191191 expect ( result ) . toBe ( true ) ;
192192 } ) ;
193193
@@ -230,7 +230,7 @@ describe('Credentials Prompts', () => {
230230 statusText : 'Unauthorized'
231231 }
232232 } ;
233- mockGetSystemInfo . mockRejectedValue ( mockError ) ;
233+ mockGetCsrfToken . mockRejectedValue ( mockError ) ;
234234
235235 const prompts = getCredentialsPrompts ( mockAbapTarget , mockLogger ) ;
236236 const passwordPrompt = prompts [ 1 ] ;
0 commit comments