diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-19 16:15:48 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-19 16:17:20 +0200 |
commit | 3f83ae145f9a6ff6f10433085d30359216e17325 (patch) | |
tree | 07bcc551490e53c385a02e6b68594a9097ae2e81 /cypress/e2e/settings/users_columns.cy.ts | |
parent | add1d922baf94dd8bfa2e9a4cb1e26d30f42b1e4 (diff) | |
download | nextcloud-server-3f83ae145f9a6ff6f10433085d30359216e17325.tar.gz nextcloud-server-3f83ae145f9a6ff6f10433085d30359216e17325.zip |
fix(cypress): Test using `data-test-id` attributes rather than private classes
Makes the test more resilant to inner component changes of the `@nextcloud/vue` library.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress/e2e/settings/users_columns.cy.ts')
-rw-r--r-- | cypress/e2e/settings/users_columns.cy.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cypress/e2e/settings/users_columns.cy.ts b/cypress/e2e/settings/users_columns.cy.ts index 31df0eacf78..68313a0b245 100644 --- a/cypress/e2e/settings/users_columns.cy.ts +++ b/cypress/e2e/settings/users_columns.cy.ts @@ -21,7 +21,7 @@ */ import { User } from '@nextcloud/cypress' -import { assertNotExistOrNotVisible } from './usersUtils.js' +import { assertNotExistOrNotVisible, getUserList } from './usersUtils.js' const admin = new User('admin', 'admin') @@ -77,8 +77,8 @@ describe('Settings: Show and hide columns', function() { }) // see that the language column is in all user rows - cy.get('tbody.user-list__body tr').each(($row) => { - cy.wrap($row).get('[data-test="language"]').should('exist') + getUserList().find('tbody tr').each(($row) => { + cy.wrap($row).get('[data-test-id="cell-language"]').should('exist') }) }) @@ -89,8 +89,8 @@ describe('Settings: Show and hide columns', function() { }) // see that the last login column is in all user rows - cy.get('tbody.user-list__body tr').each(($row) => { - cy.wrap($row).get('[data-test="lastLogin"]').should('exist') + getUserList().find('tbody tr').each(($row) => { + cy.wrap($row).get('[data-test-id="cell-lastLogin"]').should('exist') }) // open the settings dialog @@ -112,8 +112,8 @@ describe('Settings: Show and hide columns', function() { }) // see that the last login column is not in all user rows - cy.get('tbody.user-list__body tr').each(($row) => { - cy.wrap($row).get('[data-test="lastLogin"]').should('not.exist') + getUserList().find('tbody tr').each(($row) => { + cy.wrap($row).get('[data-test-id="cell-lastLogin"]').should('not.exist') }) }) }) |