mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
test(settings): adjust e2e tests selectors to new structure
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
parent
939759985a
commit
127e3611ca
1 changed files with 11 additions and 14 deletions
|
|
@ -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')
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue