From 1fc79420e0cc636f387306a7e8cf47617e3fcf35 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Sun, 12 Jan 2025 09:24:33 +0100 Subject: [PATCH 1/2] more cli user test --- tests/System/integration/cli/User.cy.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/System/integration/cli/User.cy.js b/tests/System/integration/cli/User.cy.js index a67c6bfc4fdb..47e5483d967c 100644 --- a/tests/System/integration/cli/User.cy.js +++ b/tests/System/integration/cli/User.cy.js @@ -10,6 +10,24 @@ describe('Test that console command user', () => { .its('stdout') .should('contain', 'User created!'); }); +it('can reset password', () => { + const para = '--username=test --password=abcdefghilmno -n'; + cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:reset-password ${para}`) + .its('stdout') + .should('contain', 'Password changed!'); + }); + it('can add a user to user group', () => { + const para = '--username=test --group=Registered -n'; + cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:addtogroup ${para}`) + .its('stdout') + .should('contain', "Added 'test' to group 'Registered'!"); + }); + it('can remove a user from user group', () => { + const para = '--username=test --group=Registered -n'; + cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:removefromgroup ${para}`) + .its('stdout') + .should('contain', "Removed 'test' from group 'Registered'!"); + }); it('can delete a user', () => { const para = '--username=test -n'; cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:delete ${para}`) From 4ca69a2fe886485e4ae7829eba3e8458d3b1ab75 Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Sun, 12 Jan 2025 09:25:38 +0100 Subject: [PATCH 2/2] cs --- tests/System/integration/cli/User.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/System/integration/cli/User.cy.js b/tests/System/integration/cli/User.cy.js index 47e5483d967c..f8ca86d9fc30 100644 --- a/tests/System/integration/cli/User.cy.js +++ b/tests/System/integration/cli/User.cy.js @@ -10,7 +10,7 @@ describe('Test that console command user', () => { .its('stdout') .should('contain', 'User created!'); }); -it('can reset password', () => { + it('can reset password', () => { const para = '--username=test --password=abcdefghilmno -n'; cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php user:reset-password ${para}`) .its('stdout')