Browse Source

test: CY markers for user-mgmt modal

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3192/head
Raju Udava 2 years ago
parent
commit
69dbf96467
  1. 14
      packages/nc-gui-v2/components/tabs/auth/UserManagement.vue
  2. 4
      packages/nc-gui-v2/components/tabs/auth/user-management/UsersModal.vue

14
packages/nc-gui-v2/components/tabs/auth/UserManagement.vue

@ -192,7 +192,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
<div class="text-gray-500">Reload</div> <div class="text-gray-500">Reload</div>
</div> </div>
</a-button> </a-button>
<a-button v-if="isUIAllowed('newUser')" size="middle" type="primary" ghost @click="onInvite"> <a-button v-if="isUIAllowed('newUser')" size="middle" type="primary" ghost class="nc-invite-team" @click="onInvite">
<div class="flex flex-row justify-center items-center caption capitalize space-x-1"> <div class="flex flex-row justify-center items-center caption capitalize space-x-1">
<MdiAccountPlusOutline class="mr-1" /> <MdiAccountPlusOutline class="mr-1" />
<div>{{ $t('activity.inviteTeam') }}</div> <div>{{ $t('activity.inviteTeam') }}</div>
@ -217,13 +217,13 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
</div> </div>
</div> </div>
<div v-for="(user, index) of users" :key="index" class="flex flex-row items-center border-b-1 py-2 px-2"> <div v-for="(user, index) of users" :key="index" class="flex flex-row items-center border-b-1 py-2 px-2 nc-user-row">
<div class="flex w-4/6 flex-wrap"> <div class="flex w-4/6 flex-wrap nc-user-email">
{{ user.email }} {{ user.email }}
</div> </div>
<div class="flex w-1/6 justify-center flex-wrap ml-4"> <div class="flex w-1/6 justify-center flex-wrap ml-4">
<div class="rounded-full px-2 py-1" :style="{ backgroundColor: projectRoleTagColors[user.roles] }"> <div class="rounded-full px-2 py-1 nc-user-role" :style="{ backgroundColor: projectRoleTagColors[user.roles] }">
{{ user.roles }} {{ user.roles }}
</div> </div>
</div> </div>
@ -232,7 +232,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
<template #title> <template #title>
<span>{{ $t('activity.editUser') }}</span> <span>{{ $t('activity.editUser') }}</span>
</template> </template>
<a-button type="text" class="!rounded-md" @click="onEdit(user)"> <a-button type="text" class="!rounded-md nc-user-edit" @click="onEdit(user)">
<template #icon> <template #icon>
<IcRoundEdit class="flex mx-auto h-[1rem] text-gray-500" /> <IcRoundEdit class="flex mx-auto h-[1rem] text-gray-500" />
</template> </template>
@ -242,7 +242,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
<template #title> <template #title>
<span>Add user to the project</span> <span>Add user to the project</span>
</template> </template>
<a-button type="text" class="!rounded-md" @click="inviteUser(user)"> <a-button type="text" class="!rounded-md nc-user-invite" @click="inviteUser(user)">
<template #icon> <template #icon>
<MdiPlus class="flex mx-auto h-[1.1rem] text-gray-500" /> <MdiPlus class="flex mx-auto h-[1.1rem] text-gray-500" />
</template> </template>
@ -253,7 +253,7 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
<template #title> <template #title>
<span>Remove user from the project</span> <span>Remove user from the project</span>
</template> </template>
<a-button type="text" class="!rounded-md" @click="onDelete(user)"> <a-button type="text" class="!rounded-md nc-user-delete" @click="onDelete(user)">
<template #icon> <template #icon>
<MdiDeleteOutline class="flex mx-auto h-[1.1rem] text-gray-500" /> <MdiDeleteOutline class="flex mx-auto h-[1.1rem] text-gray-500" />
</template> </template>

4
packages/nc-gui-v2/components/tabs/auth/user-management/UsersModal.vue

@ -205,8 +205,8 @@ const clickInviteMore = () => {
<div class="flex flex-col w-1/4"> <div class="flex flex-col w-1/4">
<a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]"> <a-form-item name="role" :rules="[{ required: true, message: 'Role required' }]">
<div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div> <div class="ml-1 mb-1 text-xs text-gray-500">{{ $t('labels.selectUserRole') }}</div>
<a-select v-model:value="usersData.role"> <a-select v-model:value="usersData.role" class="nc-user-roles">
<a-select-option v-for="(role, index) in projectRoles" :key="index" :value="role"> <a-select-option v-for="(role, index) in projectRoles" :key="index" :value="role" class="nc-role-option">
<div class="flex flex-row h-full justify-start items-center"> <div class="flex flex-row h-full justify-start items-center">
<div <div
class="px-2 py-1 flex rounded-full text-xs" class="px-2 py-1 flex rounded-full text-xs"

Loading…
Cancel
Save