diff options
author | Joas Schilling <coding@schilljs.com> | 2024-02-01 20:37:42 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-02-02 15:37:44 +0000 |
commit | 2be083169efbacbb18f5a785c79bc4573582c68c (patch) | |
tree | 60847f1960b40c9860054fdc27a5d7232283ab7e /cypress | |
parent | 5e22ee1e051dc0f4523829d65b1ab17c052f3339 (diff) | |
download | nextcloud-server-2be083169efbacbb18f5a785c79bc4573582c68c.tar.gz nextcloud-server-2be083169efbacbb18f5a785c79bc4573582c68c.zip |
fix(tests): Make the cypress apps management test more reliable
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/settings/apps.cy.ts | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/cypress/e2e/settings/apps.cy.ts b/cypress/e2e/settings/apps.cy.ts index 8bec0bd00f4..bfd6b1965fa 100644 --- a/cypress/e2e/settings/apps.cy.ts +++ b/cypress/e2e/settings/apps.cy.ts @@ -40,7 +40,8 @@ describe('Settings: App management', { testIsolation: true }, () => { it('Can enable an installed app', () => { cy.get('#apps-list').should('be.visible') - .contains('tr', 'QA testing') + // Wait for the app list to load + .contains('tr', 'QA testing', { timeout: 10000 }) .should('exist') .find('.actions') // I enable the "QA testing" app @@ -49,6 +50,14 @@ describe('Settings: App management', { testIsolation: true }, () => { handlePasswordConfirmation(admin.password) + // Wait until we see the disable button for the app + cy.get('#apps-list').should('be.visible') + .contains('tr', 'QA testing') + .should('exist') + .find('.actions') + // I see the disable button for the app + .contains('button', 'Disable', { timeout: 10000 }) + // Change to enabled apps view cy.get('#app-category-enabled a').click({ force: true }) cy.url().should('match', /settings\/apps\/enabled$/) @@ -58,7 +67,8 @@ describe('Settings: App management', { testIsolation: true }, () => { it('Can disable an installed app', () => { cy.get('#apps-list').should('be.visible') - .contains('tr', 'Update notification') + // Wait for the app list to load + .contains('tr', 'Update notification', { timeout: 10000 }) .should('exist') .find('.actions') // I disable the "Update notification" app @@ -67,6 +77,14 @@ describe('Settings: App management', { testIsolation: true }, () => { handlePasswordConfirmation(admin.password) + // Wait until we see the disable button for the app + cy.get('#apps-list').should('be.visible') + .contains('tr', 'Update notification') + .should('exist') + .find('.actions') + // I see the enable button for the app + .contains('button', 'Enable', { timeout: 10000 }) + // Change to disabled apps view cy.get('#app-category-disabled a').click({ force: true }) cy.url().should('match', /settings\/apps\/disabled$/) |