From 3f83ae145f9a6ff6f10433085d30359216e17325 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 19 Oct 2023 16:15:48 +0200 Subject: [PATCH] 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 --- apps/settings/src/components/UserList.vue | 1 + .../settings/src/components/Users/UserRow.vue | 28 +++++--- .../src/components/Users/UserRowActions.vue | 4 +- cypress/e2e/settings/users.cy.ts | 7 +- cypress/e2e/settings/usersUtils.ts | 21 +++++- cypress/e2e/settings/users_columns.cy.ts | 14 ++-- cypress/e2e/settings/users_modify.cy.ts | 67 ++++++++++--------- dist/settings-users-8351.js | 4 +- dist/settings-users-8351.js.map | 2 +- ...ings-vue-settings-apps-users-management.js | 4 +- ...-vue-settings-apps-users-management.js.map | 2 +- 11 files changed, 93 insertions(+), 61 deletions(-) diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue index 5d3993f040a..07e663d7912 100644 --- a/apps/settings/src/components/UserList.vue +++ b/apps/settings/src/components/UserList.vue @@ -45,6 +45,7 @@ :data-component="UserRow" :data-sources="filteredUsers" data-key="id" + data-test-id="userList" :item-height="rowHeight" :style="style" :extra-props="{ diff --git a/apps/settings/src/components/Users/UserRow.vue b/apps/settings/src/components/Users/UserRow.vue index 9a7acc54505..2e25c3e384c 100644 --- a/apps/settings/src/components/Users/UserRow.vue +++ b/apps/settings/src/components/Users/UserRow.vue @@ -36,11 +36,12 @@ :user="user.id" /> - +