|
|
@ -267,7 +267,13 @@ export class TreeViewPage extends BasePage { |
|
|
|
).toHaveCount(1); |
|
|
|
).toHaveCount(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async validateRoleAccess(param: { role: string; baseTitle?: string; tableTitle?: string; context: NcContext }) { |
|
|
|
async validateRoleAccess(param: { |
|
|
|
|
|
|
|
role: string; |
|
|
|
|
|
|
|
baseTitle?: string; |
|
|
|
|
|
|
|
tableTitle?: string; |
|
|
|
|
|
|
|
mode?: string; |
|
|
|
|
|
|
|
context: NcContext; |
|
|
|
|
|
|
|
}) { |
|
|
|
const context = param.context; |
|
|
|
const context = param.context; |
|
|
|
param.baseTitle = param.baseTitle ?? context.base.title; |
|
|
|
param.baseTitle = param.baseTitle ?? context.base.title; |
|
|
|
|
|
|
|
|
|
|
@ -275,6 +281,7 @@ export class TreeViewPage extends BasePage { |
|
|
|
const pjtNode = await this.getProject({ title: param.baseTitle }); |
|
|
|
const pjtNode = await this.getProject({ title: param.baseTitle }); |
|
|
|
await pjtNode.hover(); |
|
|
|
await pjtNode.hover(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (mode !== 'shareBase') { |
|
|
|
// add new table button & context menu is visible only for owner & creator
|
|
|
|
// add new table button & context menu is visible only for owner & creator
|
|
|
|
await expect(pjtNode.locator('[data-testid="nc-sidebar-add-base-entity"]')).toHaveCount(count); |
|
|
|
await expect(pjtNode.locator('[data-testid="nc-sidebar-add-base-entity"]')).toHaveCount(count); |
|
|
|
await expect(pjtNode.locator('[data-testid="nc-sidebar-context-menu"]')).toHaveCount(1); |
|
|
|
await expect(pjtNode.locator('[data-testid="nc-sidebar-context-menu"]')).toHaveCount(1); |
|
|
@ -284,6 +291,7 @@ export class TreeViewPage extends BasePage { |
|
|
|
await tblNode.hover(); |
|
|
|
await tblNode.hover(); |
|
|
|
await expect(tblNode.locator('.nc-tbl-context-menu')).toHaveCount(count); |
|
|
|
await expect(tblNode.locator('.nc-tbl-context-menu')).toHaveCount(count); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async openProject({ title, context }: { title: string; context: NcContext }) { |
|
|
|
async openProject({ title, context }: { title: string; context: NcContext }) { |
|
|
|
title = this.scopedProjectTitle({ title, context }); |
|
|
|
title = this.scopedProjectTitle({ title, context }); |
|
|
|