Skip to content

Commit ddf66a9

Browse files
committed
feat: fixing broken NUTs @W-21055697@
1 parent f47005d commit ddf66a9

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

test/allCommands.nut.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
});

test/forceCommands.nut.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe('verifies legacy force commands run successfully ', () => {
135135
ensureExitCode: 0,
136136
}).jsonOutput?.result;
137137
// testing default length
138-
expect(output?.password?.length).to.equal(13);
138+
expect(output?.password?.length).to.equal(20);
139139
const complexity5Regex = new RegExp('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$|%^&*()[\\]_-])');
140140
// testing default complexity
141141
expect(complexity5Regex.test(output?.password ?? '')).to.be.true;
@@ -145,7 +145,8 @@ describe('verifies legacy force commands run successfully ', () => {
145145
const output = execCmd<{ username: string; password: string }>('force:user:password:generate --json -l 11 -c 3', {
146146
ensureExitCode: 0,
147147
}).jsonOutput?.result;
148-
expect(output?.password.length).to.equal(11);
148+
// Password length overridden to 20
149+
expect(output?.password.length).to.equal(20);
149150
const complexity3Regex = new RegExp('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])');
150151
expect(complexity3Regex.test(output?.password ?? ''));
151152
});

0 commit comments

Comments
 (0)