diff options
author | Grigorii K. Shartsev <me@shgk.me> | 2024-03-18 15:18:36 +0100 |
---|---|---|
committer | Grigorii K. Shartsev <me@shgk.me> | 2024-03-19 15:38:51 +0100 |
commit | 127e3611ca0e7f2823bf1ca16295d488ec56b45f (patch) | |
tree | 4e45e86bd15635eb9030e17ca78e8c70f20c6979 /cypress | |
parent | 939759985a98d8d43f3cf19baa68945ab25ecc1e (diff) | |
download | nextcloud-server-127e3611ca0e7f2823bf1ca16295d488ec56b45f.tar.gz nextcloud-server-127e3611ca0e7f2823bf1ca16295d488ec56b45f.zip |
test(settings): adjust e2e tests selectors to new structure
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/settings/apps.cy.ts | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/cypress/e2e/settings/apps.cy.ts b/cypress/e2e/settings/apps.cy.ts index 581a6c0a1e7..c1ef24951a9 100644 --- a/cypress/e2e/settings/apps.cy.ts +++ b/cypress/e2e/settings/apps.cy.ts @@ -39,11 +39,10 @@ describe('Settings: App management', { testIsolation: true }, () => { }) it('Can enable an installed app', () => { - cy.get('#apps-list').should('be.visible') + cy.get('#apps-list').should('exist') // Wait for the app list to load .contains('tr', 'QA testing', { timeout: 10000 }) .should('exist') - .find('.actions') // I enable the "QA testing" app .contains('button', 'Enable') .click({ force: true }) @@ -51,10 +50,9 @@ 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') + cy.get('#apps-list').should('exist') .contains('tr', 'QA testing') .should('exist') - .find('.actions') // I see the disable button for the app .contains('button', 'Disable', { timeout: 10000 }) @@ -62,15 +60,15 @@ describe('Settings: App management', { testIsolation: true }, () => { cy.get('#app-category-enabled a').click({ force: true }) cy.url().should('match', /settings\/apps\/enabled$/) // I see that the "QA testing" app has been enabled - cy.get('.apps-list-container').contains('tr', 'QA testing') + cy.get('#apps-list').contains('tr', 'QA testing') }) it('Can disable an installed app', () => { - cy.get('#apps-list').should('be.visible') + cy.get('#apps-list') + .should('exist') // Wait for the app list to load .contains('tr', 'Update notification', { timeout: 10000 }) .should('exist') - .find('.actions') // I disable the "Update notification" app .contains('button', 'Disable') .click({ force: true }) @@ -78,10 +76,9 @@ 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') + cy.get('#apps-list').should('exist') .contains('tr', 'Update notification') .should('exist') - .find('.actions') // I see the enable button for the app .contains('button', 'Enable', { timeout: 10000 }) @@ -89,7 +86,7 @@ describe('Settings: App management', { testIsolation: true }, () => { cy.get('#app-category-disabled a').click({ force: true }) cy.url().should('match', /settings\/apps\/disabled$/) // I see that the "Update notification" app has been disabled - cy.get('.apps-list-container').contains('tr', 'Update notification') + cy.get('#apps-list').contains('tr', 'Update notification') }) it('Browse enabled apps', () => { @@ -102,8 +99,8 @@ describe('Settings: App management', { testIsolation: true }, () => { cy.get('#app-category-enabled').find('.active').should('exist') // I see that there are only enabled apps cy.get('#apps-list') - .should('be.visible') - .find('tr .actions') + .should('exist') + .find('tr button') .each(($action) => { cy.wrap($action).should('not.contain', 'Enable') }) @@ -119,8 +116,8 @@ describe('Settings: App management', { testIsolation: true }, () => { cy.get('#app-category-disabled').find('.active').should('exist') // I see that there are only disabled apps cy.get('#apps-list') - .should('be.visible') - .find('tr .actions') + .should('exist') + .find('tr button') .each(($action) => { cy.wrap($action).should('not.contain', 'Disable') }) |