@@ -91,7 +91,7 @@ describe('VerifyComponent', () => {
91
91
// });
92
92
93
93
it ( 'should require only email verification if only email unverified' , async ( ) => {
94
- await init ( ) ;
94
+ await init ( defaultAuthData , { sendEmail : true } ) ;
95
95
96
96
expect ( component . verifyingEmail ) . toBeTruthy ( ) ;
97
97
expect ( component . needsEmail ) . toBeTruthy ( ) ;
@@ -100,16 +100,15 @@ describe('VerifyComponent', () => {
100
100
101
101
it ( 'should require only phone verification if only phone unverified' , async ( ) => {
102
102
const unverifiedPhoneData = require ( '@root/test/responses/auth.verify.unverifiedPhone.success.json' ) ;
103
- await init ( unverifiedPhoneData ) ;
104
-
103
+ await init ( unverifiedPhoneData , { sendSms : true } ) ;
105
104
expect ( component . verifyingPhone ) . toBeTruthy ( ) ;
106
105
expect ( component . needsPhone ) . toBeTruthy ( ) ;
107
106
expect ( component . needsEmail ) . toBeFalsy ( ) ;
108
107
} ) ;
109
108
110
109
it ( 'should require verification of both if both unverified, and verify email first' , async ( ) => {
111
110
const unverifiedBothData = require ( '@root/test/responses/auth.verify.unverifiedBoth.success.json' ) ;
112
- await init ( unverifiedBothData ) ;
111
+ await init ( unverifiedBothData , { sendEmail : true , sendSms : true } ) ;
113
112
114
113
expect ( component . verifyingEmail ) . toBeTruthy ( ) ;
115
114
expect ( component . needsPhone ) . toBeTruthy ( ) ;
@@ -118,7 +117,7 @@ describe('VerifyComponent', () => {
118
117
119
118
it ( 'should verify email and then switch to phone verification if needed' , async ( ) => {
120
119
const unverifiedBothData = require ( '@root/test/responses/auth.verify.unverifiedBoth.success.json' ) ;
121
- await init ( unverifiedBothData ) ;
120
+ await init ( unverifiedBothData , { sendEmail : true , sendSms : true } ) ;
122
121
123
122
expect ( component . verifyingEmail ) . toBeTruthy ( ) ;
124
123
expect ( component . needsPhone ) . toBeTruthy ( ) ;
@@ -141,7 +140,7 @@ describe('VerifyComponent', () => {
141
140
142
141
it ( 'should verify email and redirect if only email needed' , async ( ) => {
143
142
const unverifiedEmailData = require ( '@root/test/responses/auth.verify.unverifiedEmail.success.json' ) ;
144
- await init ( unverifiedEmailData ) ;
143
+ await init ( unverifiedEmailData , { sendEmail : true } ) ;
145
144
146
145
const finishSpy = spyOn ( component , 'finish' ) ;
147
146
@@ -165,7 +164,7 @@ describe('VerifyComponent', () => {
165
164
166
165
it ( 'should verify phone and redirect if only phone needed' , async ( ) => {
167
166
const unverifiedPhoneData = require ( '@root/test/responses/auth.verify.unverifiedPhone.success.json' ) ;
168
- await init ( unverifiedPhoneData ) ;
167
+ await init ( unverifiedPhoneData , { sendSms : true } ) ;
169
168
170
169
const finishSpy = spyOn ( component , 'finish' ) ;
171
170
@@ -190,7 +189,7 @@ describe('VerifyComponent', () => {
190
189
191
190
it ( 'should show CAPTCHA before verifying phone' , async ( ) => {
192
191
const unverifiedPhoneData = require ( '@root/test/responses/auth.verify.unverifiedPhone.success.json' ) ;
193
- await init ( unverifiedPhoneData ) ;
192
+ await init ( unverifiedPhoneData , { sendSms : true } ) ;
194
193
195
194
// Testing environments might not have the site key enabled,
196
195
// so force captchaEnabled to be true.
0 commit comments