aboutsummaryrefslogtreecommitdiffstats
path: root/cypress/e2e
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-10-04 17:54:42 -0700
committerChristopher Ng <chrng8@gmail.com>2023-10-05 16:52:37 -0700
commit95a7925dc9b373c0a0a1485a8e777129aceacfb4 (patch)
tree047cd7f83701a2992a5c5501a6cc9981b04e94ea /cypress/e2e
parent37fa4efdae9620e85da3feb68103cfb06a6fc933 (diff)
downloadnextcloud-server-95a7925dc9b373c0a0a1485a8e777129aceacfb4.tar.gz
nextcloud-server-95a7925dc9b373c0a0a1485a8e777129aceacfb4.zip
fix(cypress): User table disable/enable tests
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'cypress/e2e')
-rw-r--r--cypress/e2e/settings/users_disable.cy.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cypress/e2e/settings/users_disable.cy.ts b/cypress/e2e/settings/users_disable.cy.ts
index 349ff21589c..a9ea21901fc 100644
--- a/cypress/e2e/settings/users_disable.cy.ts
+++ b/cypress/e2e/settings/users_disable.cy.ts
@@ -42,24 +42,24 @@ describe('Settings: Disable and enable users', function() {
cy.enableUser(jdoe)
// see that the user is in the list of active users
- cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
+ cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).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('td.row__cell--actions button.action-item__menutoggle').click()
+ cy.get('td.row__cell--actions button.action-item__menutoggle').click({ scrollBehavior: 'center' })
})
// 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(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('not.be.visible')
+ cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).should('not.exist')
// 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(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('exist')
+ cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).should('exist')
})
it('Can enable the user', function() {
@@ -71,11 +71,11 @@ describe('Settings: Disable and enable users', function() {
cy.url().should('match', /\/disabled/)
// see that the user is in the list of active users
- cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
+ cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).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('td.row__cell--actions button.action-item__menutoggle').click()
+ cy.get('td.row__cell--actions button.action-item__menutoggle').click({ scrollBehavior: 'center' })
})
// The "Enable user" action in the actions menu is shown and clicked