diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-18 15:19:11 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-25 11:36:24 +0200 |
commit | 5b0c27b6dafb6ab6007339214c1d22d79e4b6f5d (patch) | |
tree | e292568c4e2311fa0b29f0b95c7432c4418e1a84 /cypress/support | |
parent | 888473f5e2aa47b92c11fd169a3ffdd23b2c5504 (diff) | |
download | nextcloud-server-5b0c27b6dafb6ab6007339214c1d22d79e4b6f5d.tar.gz nextcloud-server-5b0c27b6dafb6ab6007339214c1d22d79e4b6f5d.zip |
fix(settings): Stablize user list cypress tests
* Use common `data-testid` to identify elements rather than to depend on internal classes or properties
* Force clean the state for the user tests
* Move leftover acceptance tests for users from drone to cypress
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress/support')
-rw-r--r-- | cypress/support/commands.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 58363112a75..1596bfe81fc 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -67,7 +67,7 @@ declare global { /** * Run an occ command in the docker container. */ - runOccCommand(command: string): Cypress.Chainable<void>, + runOccCommand(command: string, options?: Partial<Cypress.ExecOptions>): Cypress.Chainable<Cypress.Exec>, } } } @@ -131,6 +131,7 @@ Cypress.Commands.add('uploadFile', (user, fixture = 'image.jpg', mimeType = 'ima * @param {string} target the target of the file relative to the user root */ Cypress.Commands.add('uploadContent', (user, blob, mimeType, target) => { + // eslint-disable-next-line cypress/unsafe-to-chain-command cy.clearCookies() .then(async () => { const fileName = basename(target) @@ -216,6 +217,6 @@ Cypress.Commands.add('resetUserTheming', (user?: User) => { } }) -Cypress.Commands.add('runOccCommand', (command: string) => { - cy.exec(`docker exec --user www-data nextcloud-cypress-tests-server php ./occ ${command}`) +Cypress.Commands.add('runOccCommand', (command: string, options?: Partial<Cypress.ExecOptions>) => { + return cy.exec(`docker exec --user www-data nextcloud-cypress-tests-server php ./occ ${command}`, options) }) |