Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(tests): Make the cypress apps management test more reliable #43295

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 20 additions & 2 deletions cypress/e2e/settings/apps.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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$/)
Expand All @@ -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
Expand All @@ -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$/)
Expand Down