@@ -132,7 +132,7 @@ describe('verifies all commands run successfully ', () => {
132132 ensureExitCode : 0 ,
133133 } ) . jsonOutput ?. result ;
134134 // testing default length
135- expect ( output ?. password ?. length ) . to . equal ( 13 ) ;
135+ expect ( output ?. password ?. length ) . to . equal ( 20 ) ;
136136 const complexity5Regex = new RegExp ( '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$|%^&*()[\\]_-])' ) ;
137137 // testing default complexity
138138 expect ( complexity5Regex . test ( output ?. password ?? '' ) ) . to . be . true ;
@@ -142,7 +142,8 @@ describe('verifies all commands run successfully ', () => {
142142 const output = execCmd < { username : string ; password : string } > ( 'org:generate:password --json -l 11 -c 3' , {
143143 ensureExitCode : 0 ,
144144 } ) . jsonOutput ?. result ;
145- expect ( output ?. password . length ) . to . equal ( 11 ) ;
145+ // Password length gets overridden to 20
146+ expect ( output ?. password . length ) . to . equal ( 20 ) ;
146147 const complexity3Regex = new RegExp ( '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])' ) ;
147148 expect ( complexity3Regex . test ( output ?. password ?? '' ) ) ;
148149 } ) ;
@@ -157,7 +158,8 @@ describe('verifies all commands run successfully ', () => {
157158 ensureExitCode : 0 ,
158159 } ) . jsonOutput ?. result ;
159160
160- expect ( output ?. password . length ) . to . equal ( 12 ) ;
161+ // Password length overridden to 20
162+ expect ( output ?. password . length ) . to . equal ( 20 ) ;
161163 const complexity5Regex = new RegExp ( '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$|%^&*()[\\]_-])' ) ;
162164 // testing the default complexity
163165 expect ( complexity5Regex . test ( output ?. password ?? '' ) ) ;
@@ -168,7 +170,7 @@ describe('verifies all commands run successfully ', () => {
168170 ensureExitCode : 0 ,
169171 } ) . jsonOutput ?. result ;
170172 // testing default length
171- expect ( output ?. password . length ) . to . equal ( 13 ) ;
173+ expect ( output ?. password . length ) . to . equal ( 20 ) ;
172174 const complexity3Regex = new RegExp ( '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])' ) ;
173175 expect ( complexity3Regex . test ( output ?. password ?? '' ) ) ;
174176 } ) ;
0 commit comments