Browse Source

test: invite selectors

pull/6378/head
mertmit 1 year ago
parent
commit
ae061cc609
  1. 4
      packages/nc-gui/components/roles/Badge.vue
  2. 2
      packages/nc-gui/components/roles/Selector.vue
  3. 4
      tests/playwright/pages/WorkspacePage/CollaborationPage.ts

4
packages/nc-gui/components/roles/Badge.vue

@ -65,9 +65,11 @@ console.log('dummy')
</div> </div>
</NcBadge> </NcBadge>
<div class="flex-1"></div> <div class="flex-1"></div>
<!--
<a-tooltip v-if="inheritRef" placement="bottom"> <a-tooltip v-if="inheritRef" placement="bottom">
<div class="text-gray-400 text-xs p-1 rounded-md">Current Workspace Role</div> <div class="text-gray-400 text-xs p-1 rounded-md">Workspace Role</div>
</a-tooltip> </a-tooltip>
-->
</div> </div>
</template> </template>

2
packages/nc-gui/components/roles/Selector.vue

@ -23,7 +23,7 @@ const descriptionRef = toRef(props, 'description')
<template> <template>
<NcDropdown> <NcDropdown>
<RolesBadge class="border-1" :role="roleRef" :inherit="inheritRef === role" clickable /> <RolesBadge class="border-1" data-testid="roles" :role="roleRef" :inherit="inheritRef === role" clickable />
<template #overlay> <template #overlay>
<div class="nc-role-select-dropdown flex flex-col gap-[4px] p-1"> <div class="nc-role-select-dropdown flex flex-col gap-[4px] p-1">
<div class="flex flex-col gap-[4px]"> <div class="flex flex-col gap-[4px]">

4
tests/playwright/pages/WorkspacePage/CollaborationPage.ts

@ -39,8 +39,8 @@ export class CollaborationPage extends BasePage {
// role // role
await this.selector_role.click(); await this.selector_role.click();
await this.rootPage.waitForTimeout(500); const menu = this.rootPage.locator('.nc-role-select-dropdown:visible');
await this.rootPage.locator(`.ant-select-item-option-content:has-text("${role}"):visible`).click(); await menu.locator(`.nc-role-select-workspace-level-${role.toLowerCase()}:visible`).click();
// submit // submit

Loading…
Cancel
Save