Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/helpers/ContentUiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class ContentUiHelper extends UiBaseLocators {
private readonly treePickerSearchTxt: Locator;
private readonly mediaPickerSearchTxt: Locator;
private readonly memberPickerSearchTxt: Locator;
private readonly propertyActionMenu: Locator;

constructor(page: Page) {
super(page);
Expand Down Expand Up @@ -352,6 +353,8 @@ export class ContentUiHelper extends UiBaseLocators {
this.treePickerSearchTxt = this.page.locator('umb-tree-picker-modal #input');
this.mediaPickerSearchTxt = this.page.locator('umb-media-picker-modal #search #input');
this.memberPickerSearchTxt = this.page.locator('umb-member-picker-modal #input');
// Property Actions
this.propertyActionMenu = page.locator('#property-action-popover umb-popover-layout');
}

async enterContentName(name: string) {
Expand Down Expand Up @@ -1714,4 +1717,10 @@ export class ContentUiHelper extends UiBaseLocators {
async isContentNameReadOnly() {
await expect(this.contentNameTxt).toHaveAttribute('readonly');
}

async clickPropertyActionWithName(name: string) {
const actionLocator = this.propertyActionMenu.locator('umb-property-action uui-menu-item[label="' + name + '"]');
await expect(actionLocator).toBeVisible();
await actionLocator.click();
}
}
4 changes: 4 additions & 0 deletions lib/helpers/UiBaseLocators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1398,4 +1398,8 @@ export class UiBaseLocators {
async clickLockActionMenuOption() {
await this.clickEntityActionWithName('Lock');
}

async isDashboardTabVisible(name: string, isVisible = true) {
await expect(this.page.locator('uui-tab[label="' + name + '"]')).toBeVisible({visible: isVisible});
}
}