File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,17 @@ export class GatewayTester {
81
81
)
82
82
}
83
83
84
- public async login ( user : AuthenticatedUser | EmployeeUser ) : Promise < void > {
84
+ public async login (
85
+ user : AuthenticatedUser | EmployeeUser ,
86
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
+ postData ?: any
88
+ ) : Promise < void > {
89
+ postData = postData !== undefined ? postData : { preset : 'dummy' }
85
90
if ( this . sessionType === 'employee' ) {
86
91
this . nockScope . post ( '/system/employee-identity' ) . reply ( 200 , user )
87
92
await this . client . post (
88
93
'/api/internal/auth/saml/login/callback' ,
89
- { preset : 'dummy' } ,
94
+ postData ,
90
95
{
91
96
maxRedirects : 0 ,
92
97
validateStatus : ( status ) => status >= 200 && status <= 302
@@ -97,7 +102,7 @@ export class GatewayTester {
97
102
this . nockScope . post ( '/system/person-identity' ) . reply ( 200 , user )
98
103
await this . client . post (
99
104
'/api/application/auth/saml/login/callback' ,
100
- { preset : 'dummy' } ,
105
+ postData ,
101
106
{
102
107
maxRedirects : 0 ,
103
108
validateStatus : ( status ) => status >= 200 && status <= 302
You can’t perform that action at this time.
0 commit comments