fix(cypress): users_disable

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/39050/head
Christopher Ng 1 year ago
parent 821fcc6d8e
commit 957dbee1b0
  1. 3
      apps/settings/src/components/Users/UserRow.vue
  2. 12
      cypress/e2e/settings/users_disable.cy.ts
  3. 4
      dist/settings-users-8351.js
  4. 2
      dist/settings-users-8351.js.map
  5. 4
      dist/settings-vue-settings-apps-users-management.js
  6. 2
      dist/settings-vue-settings-apps-users-management.js.map

@ -36,7 +36,8 @@
:user="user.id" />
</td>
<td class="row__cell row__cell--displayname">
<td class="row__cell row__cell--displayname"
:data-test="user.id">
<template v-if="idState.editing && user.backendCapabilities.setDisplayName">
<label class="hidden-visually"
:for="'displayName' + uniqueId">

@ -41,24 +41,24 @@ describe('Settings: Disable and enable users', function() {
// open the User settings
cy.visit('/settings/users')
// see that the user is in the list of active users
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).within(() => {
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
// see that the list of users contains the user jdoe
cy.contains(jdoe.userId).should('exist')
// open the actions menu for the user
cy.get('.userActions button.action-item__menutoggle').click()
cy.get('td.row__cell--actions button.action-item__menutoggle').click()
})
// The "Disable user" action in the actions menu is shown and clicked
cy.get('.action-item__popper .action').contains('Disable user').should('exist').click()
// When clicked the section is not shown anymore
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).should('not.exist')
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('not.be.visible')
// But the disabled user section now exists
cy.get('#disabled').should('exist')
// Open disabled users section
cy.get('#disabled a').click()
cy.url().should('match', /\/disabled/)
// The list of disabled users should now contain the user
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).should('exist')
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('exist')
})
it('Can enable the user', function() {
@ -71,11 +71,11 @@ describe('Settings: Disable and enable users', function() {
cy.get('#disabled a').click()
cy.url().should('match', /\/disabled/)
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).within(() => {
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
// see that the list of disabled users contains the user jdoe
cy.contains(jdoe.userId).should('exist')
// open the actions menu for the user
cy.get('.userActions button.action-item__menutoggle').click()
cy.get('td.row__cell--actions button.action-item__menutoggle').click()
})
// The "Enable user" action in the actions menu is shown and clicked

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save