@@ -658,11 +658,13 @@ describe('Pages Router', () => {
658
658
const appId = linkResponse . headers [ 'x-parse-page-param-appid' ] ;
659
659
const token = linkResponse . headers [ 'x-parse-page-param-token' ] ;
660
660
const locale = linkResponse . headers [ 'x-parse-page-param-locale' ] ;
661
+ const username = linkResponse . headers [ 'x-parse-page-param-username' ] ;
661
662
const publicServerUrl = linkResponse . headers [ 'x-parse-page-param-publicserverurl' ] ;
662
663
const passwordResetPagePath = pageResponse . calls . all ( ) [ 0 ] . args [ 0 ] ;
663
664
expect ( appId ) . toBeDefined ( ) ;
664
665
expect ( token ) . toBeDefined ( ) ;
665
666
expect ( locale ) . toBeDefined ( ) ;
667
+ expect ( username ) . toBeDefined ( ) ;
666
668
expect ( publicServerUrl ) . toBeDefined ( ) ;
667
669
expect ( passwordResetPagePath ) . toMatch (
668
670
new RegExp ( `\/${ exampleLocale } \/${ pages . passwordReset . defaultFile } ` )
@@ -676,6 +678,7 @@ describe('Pages Router', () => {
676
678
body : {
677
679
token,
678
680
locale,
681
+ username,
679
682
new_password : 'newPassword' ,
680
683
} ,
681
684
headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } ,
@@ -770,13 +773,15 @@ describe('Pages Router', () => {
770
773
771
774
const appId = linkResponse . headers [ 'x-parse-page-param-appid' ] ;
772
775
const locale = linkResponse . headers [ 'x-parse-page-param-locale' ] ;
776
+ const username = linkResponse . headers [ 'x-parse-page-param-username' ] ;
773
777
const publicServerUrl = linkResponse . headers [ 'x-parse-page-param-publicserverurl' ] ;
774
778
const invalidVerificationPagePath = pageResponse . calls . all ( ) [ 0 ] . args [ 0 ] ;
775
779
expect ( appId ) . toBeDefined ( ) ;
776
780
expect ( locale ) . toBe ( exampleLocale ) ;
781
+ expect ( username ) . toBeDefined ( ) ;
777
782
expect ( publicServerUrl ) . toBeDefined ( ) ;
778
783
expect ( invalidVerificationPagePath ) . toMatch (
779
- new RegExp ( `\/${ exampleLocale } \/${ pages . emailVerificationLinkInvalid . defaultFile } ` )
784
+ new RegExp ( `\/${ exampleLocale } \/${ pages . emailVerificationLinkExpired . defaultFile } ` )
780
785
) ;
781
786
782
787
const formUrl = `${ publicServerUrl } /apps/${ appId } /resend_verification_email` ;
@@ -785,7 +790,7 @@ describe('Pages Router', () => {
785
790
method : 'POST' ,
786
791
body : {
787
792
locale,
788
- username : 'exampleUsername' ,
793
+ username,
789
794
} ,
790
795
headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } ,
791
796
followRedirects : false ,
@@ -821,13 +826,15 @@ describe('Pages Router', () => {
821
826
822
827
const appId = linkResponse . headers [ 'x-parse-page-param-appid' ] ;
823
828
const locale = linkResponse . headers [ 'x-parse-page-param-locale' ] ;
829
+ const username = linkResponse . headers [ 'x-parse-page-param-username' ] ;
824
830
const publicServerUrl = linkResponse . headers [ 'x-parse-page-param-publicserverurl' ] ;
825
831
const invalidVerificationPagePath = pageResponse . calls . all ( ) [ 0 ] . args [ 0 ] ;
826
832
expect ( appId ) . toBeDefined ( ) ;
827
833
expect ( locale ) . toBe ( exampleLocale ) ;
834
+ expect ( username ) . toBeDefined ( ) ;
828
835
expect ( publicServerUrl ) . toBeDefined ( ) ;
829
836
expect ( invalidVerificationPagePath ) . toMatch (
830
- new RegExp ( `\/${ exampleLocale } \/${ pages . emailVerificationLinkInvalid . defaultFile } ` )
837
+ new RegExp ( `\/${ exampleLocale } \/${ pages . emailVerificationLinkExpired . defaultFile } ` )
831
838
) ;
832
839
833
840
spyOn ( UserController . prototype , 'resendVerificationEmail' ) . and . callFake ( ( ) =>
@@ -840,7 +847,7 @@ describe('Pages Router', () => {
840
847
method : 'POST' ,
841
848
body : {
842
849
locale,
843
- username : 'exampleUsername' ,
850
+ username,
844
851
} ,
845
852
headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } ,
846
853
followRedirects : false ,
@@ -1125,10 +1132,12 @@ describe('Pages Router', () => {
1125
1132
1126
1133
const appId = linkResponse . headers [ 'x-parse-page-param-appid' ] ;
1127
1134
const token = linkResponse . headers [ 'x-parse-page-param-token' ] ;
1135
+ const username = linkResponse . headers [ 'x-parse-page-param-username' ] ;
1128
1136
const publicServerUrl = linkResponse . headers [ 'x-parse-page-param-publicserverurl' ] ;
1129
1137
const passwordResetPagePath = pageResponse . calls . all ( ) [ 0 ] . args [ 0 ] ;
1130
1138
expect ( appId ) . toBeDefined ( ) ;
1131
1139
expect ( token ) . toBeDefined ( ) ;
1140
+ expect ( username ) . toBeDefined ( ) ;
1132
1141
expect ( publicServerUrl ) . toBeDefined ( ) ;
1133
1142
expect ( passwordResetPagePath ) . toMatch ( new RegExp ( `\/${ pages . passwordReset . defaultFile } ` ) ) ;
1134
1143
pageResponse . calls . reset ( ) ;
@@ -1139,6 +1148,7 @@ describe('Pages Router', () => {
1139
1148
method : 'POST' ,
1140
1149
body : {
1141
1150
token,
1151
+ username,
1142
1152
new_password : 'newPassword' ,
1143
1153
} ,
1144
1154
headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } ,
0 commit comments