@@ -107,7 +107,7 @@ describe('Password Policy: ', () => {
107
107
} )
108
108
. then ( response => {
109
109
expect ( response . status ) . toEqual ( 302 ) ;
110
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = [ a - z A - Z 0 - 9 ] + \& i d = t e s t \& u s e r n a m e = t e s t R e s e t T o k e n V a l i d i t y / ;
110
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = [ a - z A - Z 0 - 9 ] + \& i d = t e s t \& / ;
111
111
expect ( response . text . match ( re ) ) . not . toBe ( null ) ;
112
112
done ( ) ;
113
113
} )
@@ -622,7 +622,7 @@ describe('Password Policy: ', () => {
622
622
} )
623
623
. then ( response => {
624
624
expect ( response . status ) . toEqual ( 302 ) ;
625
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
625
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
626
626
const match = response . text . match ( re ) ;
627
627
if ( ! match ) {
628
628
fail ( 'should have a token' ) ;
@@ -634,7 +634,7 @@ describe('Password Policy: ', () => {
634
634
request ( {
635
635
method : 'POST' ,
636
636
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
637
- body : `new_password=has2init&token=${ token } &username=user1 ` ,
637
+ body : `new_password=has2init&token=${ token } ` ,
638
638
headers : {
639
639
'Content-Type' : 'application/x-www-form-urlencoded' ,
640
640
} ,
@@ -645,7 +645,7 @@ describe('Password Policy: ', () => {
645
645
. then ( response => {
646
646
expect ( response . status ) . toEqual ( 302 ) ;
647
647
expect ( response . text ) . toEqual (
648
- 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html?username=user1 '
648
+ 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html'
649
649
) ;
650
650
651
651
Parse . User . logIn ( 'user1' , 'has2init' )
@@ -714,7 +714,7 @@ describe('Password Policy: ', () => {
714
714
} )
715
715
. then ( response => {
716
716
expect ( response . status ) . toEqual ( 302 ) ;
717
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
717
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
718
718
const match = response . text . match ( re ) ;
719
719
if ( ! match ) {
720
720
fail ( 'should have a token' ) ;
@@ -726,7 +726,7 @@ describe('Password Policy: ', () => {
726
726
request ( {
727
727
method : 'POST' ,
728
728
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
729
- body : `new_password=hasnodigit&token=${ token } &username=user1 ` ,
729
+ body : `new_password=hasnodigit&token=${ token } ` ,
730
730
headers : {
731
731
'Content-Type' : 'application/x-www-form-urlencoded' ,
732
732
} ,
@@ -737,7 +737,7 @@ describe('Password Policy: ', () => {
737
737
. then ( response => {
738
738
expect ( response . status ) . toEqual ( 302 ) ;
739
739
expect ( response . text ) . toEqual (
740
- `Found. Redirecting to http://localhost:8378/1/apps/choose_password?username=user1& token=${ token } &id=test&error=Password%20should%20contain%20at%20least%20one%20digit.&app=passwordPolicy`
740
+ `Found. Redirecting to http://localhost:8378/1/apps/choose_password?token=${ token } &id=test&error=Password%20should%20contain%20at%20least%20one%20digit.&app=passwordPolicy`
741
741
) ;
742
742
743
743
Parse . User . logIn ( 'user1' , 'has 1 digit' )
@@ -900,7 +900,7 @@ describe('Password Policy: ', () => {
900
900
} )
901
901
. then ( response => {
902
902
expect ( response . status ) . toEqual ( 302 ) ;
903
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
903
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
904
904
const match = response . text . match ( re ) ;
905
905
if ( ! match ) {
906
906
fail ( 'should have a token' ) ;
@@ -912,7 +912,7 @@ describe('Password Policy: ', () => {
912
912
request ( {
913
913
method : 'POST' ,
914
914
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
915
- body : `new_password=xuser12&token=${ token } &username=user1 ` ,
915
+ body : `new_password=xuser12&token=${ token } ` ,
916
916
headers : {
917
917
'Content-Type' : 'application/x-www-form-urlencoded' ,
918
918
} ,
@@ -923,7 +923,7 @@ describe('Password Policy: ', () => {
923
923
. then ( response => {
924
924
expect ( response . status ) . toEqual ( 302 ) ;
925
925
expect ( response . text ) . toEqual (
926
- `Found. Redirecting to http://localhost:8378/1/apps/choose_password?username=user1& token=${ token } &id=test&error=Password%20cannot%20contain%20your%20username.&app=passwordPolicy`
926
+ `Found. Redirecting to http://localhost:8378/1/apps/choose_password?token=${ token } &id=test&error=Password%20cannot%20contain%20your%20username.&app=passwordPolicy`
927
927
) ;
928
928
929
929
Parse . User . logIn ( 'user1' , 'r@nd0m' )
@@ -991,7 +991,7 @@ describe('Password Policy: ', () => {
991
991
resolveWithFullResponse : true ,
992
992
} ) ;
993
993
expect ( response . status ) . toEqual ( 302 ) ;
994
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
994
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
995
995
const match = response . text . match ( re ) ;
996
996
if ( ! match ) {
997
997
fail ( 'should have a token' ) ;
@@ -1003,7 +1003,7 @@ describe('Password Policy: ', () => {
1003
1003
await request ( {
1004
1004
method : 'POST' ,
1005
1005
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
1006
- body : `new_password=xuser12&token=${ token } &username=user1 ` ,
1006
+ body : `new_password=xuser12&token=${ token } ` ,
1007
1007
headers : {
1008
1008
'Content-Type' : 'application/x-www-form-urlencoded' ,
1009
1009
'X-Requested-With' : 'XMLHttpRequest' ,
@@ -1051,7 +1051,7 @@ describe('Password Policy: ', () => {
1051
1051
} )
1052
1052
. then ( response => {
1053
1053
expect ( response . status ) . toEqual ( 302 ) ;
1054
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
1054
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
1055
1055
const match = response . text . match ( re ) ;
1056
1056
if ( ! match ) {
1057
1057
fail ( 'should have a token' ) ;
@@ -1063,7 +1063,7 @@ describe('Password Policy: ', () => {
1063
1063
request ( {
1064
1064
method : 'POST' ,
1065
1065
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
1066
- body : `new_password=uuser11&token=${ token } &username=user1 ` ,
1066
+ body : `new_password=uuser11&token=${ token } ` ,
1067
1067
headers : {
1068
1068
'Content-Type' : 'application/x-www-form-urlencoded' ,
1069
1069
} ,
@@ -1074,7 +1074,7 @@ describe('Password Policy: ', () => {
1074
1074
. then ( response => {
1075
1075
expect ( response . status ) . toEqual ( 302 ) ;
1076
1076
expect ( response . text ) . toEqual (
1077
- 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html?username=user1 '
1077
+ 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html'
1078
1078
) ;
1079
1079
1080
1080
Parse . User . logIn ( 'user1' , 'uuser11' )
@@ -1317,7 +1317,7 @@ describe('Password Policy: ', () => {
1317
1317
} )
1318
1318
. then ( response => {
1319
1319
expect ( response . status ) . toEqual ( 302 ) ;
1320
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
1320
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
1321
1321
const match = response . text . match ( re ) ;
1322
1322
if ( ! match ) {
1323
1323
fail ( 'should have a token' ) ;
@@ -1329,7 +1329,7 @@ describe('Password Policy: ', () => {
1329
1329
request ( {
1330
1330
method : 'POST' ,
1331
1331
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
1332
- body : `new_password=uuser11&token=${ token } &username=user1 ` ,
1332
+ body : `new_password=uuser11&token=${ token } ` ,
1333
1333
headers : {
1334
1334
'Content-Type' : 'application/x-www-form-urlencoded' ,
1335
1335
} ,
@@ -1340,7 +1340,7 @@ describe('Password Policy: ', () => {
1340
1340
. then ( response => {
1341
1341
expect ( response . status ) . toEqual ( 302 ) ;
1342
1342
expect ( response . text ) . toEqual (
1343
- 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html?username=user1 '
1343
+ 'Found. Redirecting to http://localhost:8378/1/apps/password_reset_success.html'
1344
1344
) ;
1345
1345
1346
1346
Parse . User . logIn ( 'user1' , 'uuser11' )
@@ -1472,7 +1472,7 @@ describe('Password Policy: ', () => {
1472
1472
} )
1473
1473
. then ( response => {
1474
1474
expect ( response . status ) . toEqual ( 302 ) ;
1475
- const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& u s e r n a m e = u s e r 1 / ;
1475
+ const re = / h t t p : \/ \/ l o c a l h o s t : 8 3 7 8 \/ 1 \/ a p p s \/ c h o o s e _ p a s s w o r d \? t o k e n = ( [ a - z A - Z 0 - 9 ] + ) \& i d = t e s t \& / ;
1476
1476
const match = response . text . match ( re ) ;
1477
1477
if ( ! match ) {
1478
1478
fail ( 'should have a token' ) ;
@@ -1484,7 +1484,7 @@ describe('Password Policy: ', () => {
1484
1484
return request ( {
1485
1485
method : 'POST' ,
1486
1486
url : 'http://localhost:8378/1/apps/test/request_password_reset' ,
1487
- body : `new_password=user1&token=${ token } &username=user1 ` ,
1487
+ body : `new_password=user1&token=${ token } ` ,
1488
1488
headers : {
1489
1489
'Content-Type' : 'application/x-www-form-urlencoded' ,
1490
1490
} ,
@@ -1500,7 +1500,7 @@ describe('Password Policy: ', () => {
1500
1500
const token = data [ 1 ] ;
1501
1501
expect ( response . status ) . toEqual ( 302 ) ;
1502
1502
expect ( response . text ) . toEqual (
1503
- `Found. Redirecting to http://localhost:8378/1/apps/choose_password?username=user1& token=${ token } &id=test&error=New%20password%20should%20not%20be%20the%20same%20as%20last%201%20passwords.&app=passwordPolicy`
1503
+ `Found. Redirecting to http://localhost:8378/1/apps/choose_password?token=${ token } &id=test&error=New%20password%20should%20not%20be%20the%20same%20as%20last%201%20passwords.&app=passwordPolicy`
1504
1504
) ;
1505
1505
done ( ) ;
1506
1506
return Promise . resolve ( ) ;
0 commit comments