diff --git a/lib/helpers/ContentUiHelper.ts b/lib/helpers/ContentUiHelper.ts index 7cd5d512..cc7524d6 100644 --- a/lib/helpers/ContentUiHelper.ts +++ b/lib/helpers/ContentUiHelper.ts @@ -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); @@ -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) { @@ -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(); + } } \ No newline at end of file diff --git a/lib/helpers/UiBaseLocators.ts b/lib/helpers/UiBaseLocators.ts index bf7901e2..0eecadf1 100644 --- a/lib/helpers/UiBaseLocators.ts +++ b/lib/helpers/UiBaseLocators.ts @@ -1401,6 +1401,10 @@ export class UiBaseLocators { await this.clickEntityActionWithName('Lock'); } + async isDashboardTabWithNameVisible(name: string, isVisible: boolean = true) { + await expect(this.page.locator('uui-tab[label="' + name + '"]')).toBeVisible({visible: isVisible}); + } + async enterMonacoEditorValue(value: string) { await expect(this.monacoEditor).toBeVisible(); await this.monacoEditor.click(); diff --git a/package-lock.json b/package-lock.json index ae16ca1b..59890f53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "16.0.51", + "version": "16.0.52", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@umbraco/playwright-testhelpers", - "version": "16.0.51", + "version": "16.0.52", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.40", diff --git a/package.json b/package.json index eef25440..cf287304 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "16.0.51", + "version": "16.0.52", "description": "Test helpers for making playwright tests for Umbraco solutions", "main": "dist/lib/index.js", "files": [