Skip to content

Commit 15e87ac

Browse files
alikonlaoneo
andauthored
[5.3][cypress] test console command user:list & add & delete (#44690)
* test-console-user-command * cs * cs2 * Manager * username from env --------- Co-authored-by: Allon Moritz <[email protected]>
1 parent d4d77c8 commit 15e87ac

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
describe('Test that console command user', () => {
2+
it('can list users', () => {
3+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:list`)
4+
.its('stdout')
5+
.should('contain', `${Cypress.env('username')}`);
6+
});
7+
it('can add a user', () => {
8+
const para = '--username=test --name=test --password=123456789012 [email protected] --usergroup=Manager -n';
9+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:add ${para}`)
10+
.its('stdout')
11+
.should('contain', 'User created!');
12+
});
13+
it('can delete a user', () => {
14+
const para = '--username=test -n';
15+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:delete ${para}`)
16+
.its('stdout')
17+
.should('contain', 'User test deleted!');
18+
});
19+
});

0 commit comments

Comments
 (0)