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>
</NcBadge>
<div class="flex-1"></div>
<!--
<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>
-->
</div>
</template>

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

@ -23,7 +23,7 @@ const descriptionRef = toRef(props, 'description')
<template>
<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>
<div class="nc-role-select-dropdown flex flex-col gap-[4px] p-1">
<div class="flex flex-col gap-[4px]">

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

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

Loading…
Cancel
Save