@@ -107,7 +107,7 @@ describe('Password Policy: ', () => {
107107 } )
108108 . then ( response => {
109109 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 \& / ;
111111 expect ( response . text . match ( re ) ) . not . toBe ( null ) ;
112112 done ( ) ;
113113 } )
@@ -622,7 +622,7 @@ describe('Password Policy: ', () => {
622622 } )
623623 . then ( response => {
624624 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 \& / ;
626626 const match = response . text . match ( re ) ;
627627 if ( ! match ) {
628628 fail ( 'should have a token' ) ;
@@ -634,7 +634,7 @@ describe('Password Policy: ', () => {
634634 request ( {
635635 method : 'POST' ,
636636 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 } ` ,
638638 headers : {
639639 'Content-Type' : 'application/x-www-form-urlencoded' ,
640640 } ,
@@ -645,7 +645,7 @@ describe('Password Policy: ', () => {
645645 . then ( response => {
646646 expect ( response . status ) . toEqual ( 302 ) ;
647647 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'
649649 ) ;
650650
651651 Parse . User . logIn ( 'user1' , 'has2init' )
@@ -714,7 +714,7 @@ describe('Password Policy: ', () => {
714714 } )
715715 . then ( response => {
716716 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 \& / ;
718718 const match = response . text . match ( re ) ;
719719 if ( ! match ) {
720720 fail ( 'should have a token' ) ;
@@ -726,7 +726,7 @@ describe('Password Policy: ', () => {
726726 request ( {
727727 method : 'POST' ,
728728 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 } ` ,
730730 headers : {
731731 'Content-Type' : 'application/x-www-form-urlencoded' ,
732732 } ,
@@ -737,7 +737,7 @@ describe('Password Policy: ', () => {
737737 . then ( response => {
738738 expect ( response . status ) . toEqual ( 302 ) ;
739739 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`
741741 ) ;
742742
743743 Parse . User . logIn ( 'user1' , 'has 1 digit' )
@@ -900,7 +900,7 @@ describe('Password Policy: ', () => {
900900 } )
901901 . then ( response => {
902902 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 \& / ;
904904 const match = response . text . match ( re ) ;
905905 if ( ! match ) {
906906 fail ( 'should have a token' ) ;
@@ -912,7 +912,7 @@ describe('Password Policy: ', () => {
912912 request ( {
913913 method : 'POST' ,
914914 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 } ` ,
916916 headers : {
917917 'Content-Type' : 'application/x-www-form-urlencoded' ,
918918 } ,
@@ -923,7 +923,7 @@ describe('Password Policy: ', () => {
923923 . then ( response => {
924924 expect ( response . status ) . toEqual ( 302 ) ;
925925 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`
927927 ) ;
928928
929929 Parse . User . logIn ( 'user1' , 'r@nd0m' )
@@ -991,7 +991,7 @@ describe('Password Policy: ', () => {
991991 resolveWithFullResponse : true ,
992992 } ) ;
993993 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 \& / ;
995995 const match = response . text . match ( re ) ;
996996 if ( ! match ) {
997997 fail ( 'should have a token' ) ;
@@ -1003,7 +1003,7 @@ describe('Password Policy: ', () => {
10031003 await request ( {
10041004 method : 'POST' ,
10051005 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 } ` ,
10071007 headers : {
10081008 'Content-Type' : 'application/x-www-form-urlencoded' ,
10091009 'X-Requested-With' : 'XMLHttpRequest' ,
@@ -1051,7 +1051,7 @@ describe('Password Policy: ', () => {
10511051 } )
10521052 . then ( response => {
10531053 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 \& / ;
10551055 const match = response . text . match ( re ) ;
10561056 if ( ! match ) {
10571057 fail ( 'should have a token' ) ;
@@ -1063,7 +1063,7 @@ describe('Password Policy: ', () => {
10631063 request ( {
10641064 method : 'POST' ,
10651065 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 } ` ,
10671067 headers : {
10681068 'Content-Type' : 'application/x-www-form-urlencoded' ,
10691069 } ,
@@ -1074,7 +1074,7 @@ describe('Password Policy: ', () => {
10741074 . then ( response => {
10751075 expect ( response . status ) . toEqual ( 302 ) ;
10761076 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'
10781078 ) ;
10791079
10801080 Parse . User . logIn ( 'user1' , 'uuser11' )
@@ -1317,7 +1317,7 @@ describe('Password Policy: ', () => {
13171317 } )
13181318 . then ( response => {
13191319 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 \& / ;
13211321 const match = response . text . match ( re ) ;
13221322 if ( ! match ) {
13231323 fail ( 'should have a token' ) ;
@@ -1329,7 +1329,7 @@ describe('Password Policy: ', () => {
13291329 request ( {
13301330 method : 'POST' ,
13311331 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 } ` ,
13331333 headers : {
13341334 'Content-Type' : 'application/x-www-form-urlencoded' ,
13351335 } ,
@@ -1340,7 +1340,7 @@ describe('Password Policy: ', () => {
13401340 . then ( response => {
13411341 expect ( response . status ) . toEqual ( 302 ) ;
13421342 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'
13441344 ) ;
13451345
13461346 Parse . User . logIn ( 'user1' , 'uuser11' )
@@ -1472,7 +1472,7 @@ describe('Password Policy: ', () => {
14721472 } )
14731473 . then ( response => {
14741474 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 \& / ;
14761476 const match = response . text . match ( re ) ;
14771477 if ( ! match ) {
14781478 fail ( 'should have a token' ) ;
@@ -1484,7 +1484,7 @@ describe('Password Policy: ', () => {
14841484 return request ( {
14851485 method : 'POST' ,
14861486 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 } ` ,
14881488 headers : {
14891489 'Content-Type' : 'application/x-www-form-urlencoded' ,
14901490 } ,
@@ -1500,7 +1500,7 @@ describe('Password Policy: ', () => {
15001500 const token = data [ 1 ] ;
15011501 expect ( response . status ) . toEqual ( 302 ) ;
15021502 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`
15041504 ) ;
15051505 done ( ) ;
15061506 return Promise . resolve ( ) ;
0 commit comments