1
- import { SelectAuthenticatorAuthenticate , SelectAuthenticatorEnroll } from '../../../../lib/idx/remediators' ;
1
+ import {
2
+ SelectAuthenticatorAuthenticate ,
3
+ SelectAuthenticatorEnroll ,
4
+ SelectAuthenticatorUnlockAccount
5
+ } from '../../../../lib/idx/remediators' ;
2
6
import {
3
7
SelectAuthenticatorEnrollRemediationFactory ,
4
8
SelectAuthenticatorAuthenticateRemediationFactory ,
@@ -7,7 +11,10 @@ import {
7
11
EmailAuthenticatorOptionFactory ,
8
12
IdxContextFactory ,
9
13
PhoneAuthenticatorFactory ,
10
- EmailAuthenticatorFactory
14
+ EmailAuthenticatorFactory ,
15
+ SelectAuthenticatorUnlockAccountRemediationFactory ,
16
+ SecurityQuestionAuthenticatorOptionFactory ,
17
+ IdxValueFactory ,
11
18
} from '@okta/test.support/idx' ;
12
19
13
20
describe ( 'remediators/Base/SelectAuthenticator' , ( ) => {
@@ -122,3 +129,35 @@ describe('remediators/SelectAuthenticatorAuthenticate', () => {
122
129
} ) ;
123
130
} ) ;
124
131
} ) ;
132
+
133
+ describe ( 'remediators/SelectAuthenticatorUnlockAccount' , ( ) => {
134
+ describe ( 'mapAuthenticator' , ( ) => {
135
+ // TODO: return methodType 1
136
+
137
+ // TODO: return methodType 2
138
+
139
+ // TODO: return methodType 3
140
+
141
+ // TODO: return no methodType
142
+ fit ( 'should not return a methodType value' , ( ) => {
143
+ const phoneAuthenticatorValue = AuthenticatorValueFactory . build ( {
144
+ options : [
145
+ PhoneAuthenticatorOptionFactory . build ( ) ,
146
+ ]
147
+ } ) ;
148
+
149
+ const remediation = SelectAuthenticatorUnlockAccountRemediationFactory . build ( {
150
+ value : [
151
+ phoneAuthenticatorValue
152
+ ]
153
+ } ) ;
154
+
155
+ console . log ( phoneAuthenticatorValue ) ;
156
+ console . log ( '##########' )
157
+ console . log ( remediation ) ;
158
+
159
+ const r = new SelectAuthenticatorUnlockAccount ( remediation ) ;
160
+ expect ( r . mapAuthenticator ( phoneAuthenticatorValue ) ) . toBe ( false ) ;
161
+ } ) ;
162
+ } ) ;
163
+ } ) ;
0 commit comments