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(cypress): Adjust user columns tests #41945

Merged
merged 1 commit into from Nov 30, 2023
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
8 changes: 4 additions & 4 deletions cypress/e2e/settings/users_columns.cy.ts
Expand Up @@ -38,7 +38,7 @@ describe('Settings: Show and hide columns', function() {
// reset all visibility toggles
cy.get('.modal-container #settings-section_visibility-settings input[type="checkbox"]').uncheck({ force: true })

cy.get('.modal-container').within(() => {
cy.contains('.modal-container', 'User management settings').within(() => {
// enable the last login toggle
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').check({ force: true })
// close the settings dialog
Expand All @@ -59,7 +59,7 @@ describe('Settings: Show and hide columns', function() {
// open the settings dialog
cy.get('.app-navigation-entry__settings').contains('User management settings').click()

cy.get('.modal-container').within(() => {
cy.contains('.modal-container', 'User management settings').within(() => {
// enable the language toggle
cy.get('[data-test="showLanguages"] input[type="checkbox"]').should('not.be.checked')
cy.get('[data-test="showLanguages"] input[type="checkbox"]').check({ force: true })
Expand Down Expand Up @@ -90,15 +90,15 @@ describe('Settings: Show and hide columns', function() {
// open the settings dialog
cy.get('.app-navigation-entry__settings').contains('User management settings').click()

cy.get('.modal-container').within(() => {
cy.contains('.modal-container', 'User management settings').within(() => {
// disable the last login toggle
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').should('be.checked')
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').uncheck({ force: true })
cy.get('[data-test="showLastLogin"] input[type="checkbox"]').should('not.be.checked')
// close the settings dialog
cy.get('button.modal-container__close').click()
})
cy.waitUntil(() => cy.get('.modal-container').should(el => assertNotExistOrNotVisible(el)))
cy.waitUntil(() => cy.contains('.modal-container', 'User management settings').should(el => assertNotExistOrNotVisible(el)))

// see that the last login column is not in the header
cy.get('[data-cy-user-list-header-last-login]').should('not.exist')
Expand Down