File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,19 @@ async function mockserver() {
111111 requestXml . includes ( '<Surname>' )
112112 ) {
113113 const match = requestXml . match ( '<Surname>(.*?)<' ) ;
114- responsePath = 'src/responses/user/' + method + '/' + match [ 1 ] + '.xml' ;
114+ if ( ( 'carlsson' ) . startsWith ( match [ 1 ] . toLowerCase ( ) ) ) {
115+ responsePath = 'src/responses/user/' + method + '/Carlsson.xml' ;
116+ }
117+ else if ( ( 'beckley' ) . startsWith ( match [ 1 ] . toLowerCase ( ) ) ) {
118+ responsePath = 'src/responses/user/' + method + '/Beckley.xml' ;
119+ }
120+ else if ( ( 'nilsson' ) . startsWith ( match [ 1 ] . toLowerCase ( ) ) ) {
121+ responsePath = 'src/responses/user/' + method + '/Nilsson.xml' ;
122+ }
123+ else {
124+ responsePath = 'src/responses/user/' + method + '.xml' ;
125+ }
126+
115127 }
116128
117129 if ( responsePath === null || responsePath === undefined ) {
You can’t perform that action at this time.
0 commit comments