Skip to content

Commit f1faf6b

Browse files
alikonlaoneo
andauthored
5.3][cypress] test console command user:reset-password etc (#44722)
* more cli user test * cs --------- Co-authored-by: Allon Moritz <[email protected]>
1 parent 960d792 commit f1faf6b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/System/integration/cli/User.cy.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ describe('Test that console command user', () => {
1010
.its('stdout')
1111
.should('contain', 'User created!');
1212
});
13+
it('can reset password', () => {
14+
const para = '--username=test --password=abcdefghilmno -n';
15+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:reset-password ${para}`)
16+
.its('stdout')
17+
.should('contain', 'Password changed!');
18+
});
19+
it('can add a user to user group', () => {
20+
const para = '--username=test --group=Registered -n';
21+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:addtogroup ${para}`)
22+
.its('stdout')
23+
.should('contain', "Added 'test' to group 'Registered'!");
24+
});
25+
it('can remove a user from user group', () => {
26+
const para = '--username=test --group=Registered -n';
27+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:removefromgroup ${para}`)
28+
.its('stdout')
29+
.should('contain', "Removed 'test' from group 'Registered'!");
30+
});
1331
it('can delete a user', () => {
1432
const para = '--username=test -n';
1533
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:delete ${para}`)

0 commit comments

Comments
 (0)