@@ -170,6 +170,10 @@ export class ContentUiHelper extends UiBaseLocators {
170170 private readonly mediaPickerSearchTxt : Locator ;
171171 private readonly memberPickerSearchTxt : Locator ;
172172 private readonly documentCreateOptionsModal : Locator ;
173+ private readonly refListBlock : Locator ;
174+ private readonly propertyActionMenu : Locator ;
175+ private readonly documentCreateOptionsModal : Locator ;
176+ private readonly listViewCustomRows : Locator ;
173177
174178 constructor ( page : Page ) {
175179 super ( page ) ;
@@ -306,6 +310,7 @@ export class ContentUiHelper extends UiBaseLocators {
306310 this . blockGridAreasContainer = page . locator ( 'umb-block-grid-areas-container' ) ;
307311 this . blockGridEntries = page . locator ( 'umb-block-grid-entries' ) ;
308312 this . inlineCreateBtn = page . locator ( 'uui-button-inline-create' ) ;
313+ this . refListBlock = page . locator ( 'umb-ref-list-block' ) ;
309314 // TipTap
310315 this . tipTapPropertyEditor = page . locator ( 'umb-property-editor-ui-tiptap' ) ;
311316 this . tipTapEditor = this . tipTapPropertyEditor . locator ( '#editor .tiptap' ) ;
@@ -348,6 +353,10 @@ export class ContentUiHelper extends UiBaseLocators {
348353 this . treePickerSearchTxt = this . page . locator ( 'umb-tree-picker-modal #input' ) ;
349354 this . mediaPickerSearchTxt = this . page . locator ( 'umb-media-picker-modal #search #input' ) ;
350355 this . memberPickerSearchTxt = this . page . locator ( 'umb-member-picker-modal #input' ) ;
356+ // Property Actions
357+ this . propertyActionMenu = page . locator ( '#property-action-popover umb-popover-layout' ) ;
358+ // List view custom
359+ this . listViewCustomRows = page . locator ( 'table tbody tr' ) ;
351360 }
352361
353362 async enterContentName ( name : string ) {
@@ -1708,6 +1717,33 @@ export class ContentUiHelper extends UiBaseLocators {
17081717 async isContentNameReadOnly ( ) {
17091718 await expect ( this . contentNameTxt ) . toHaveAttribute ( 'readonly' ) ;
17101719 }
1720+
1721+ // Block Custom View
1722+ async isBlockCustomViewVisible ( blockCustomViewLocator : string , isVisible : boolean = true ) {
1723+ await expect ( this . page . locator ( blockCustomViewLocator ) ) . toBeVisible ( { visible : isVisible } ) ;
1724+ }
1725+
1726+ async isSingleBlockElementVisible ( isVisible : boolean = true ) {
1727+ const count = await this . refListBlock . count ( ) ;
1728+ if ( isVisible ) {
1729+ expect ( count , `Expected only one element, but found ${ count } ` ) . toBe ( 1 ) ;
1730+ } else {
1731+ expect ( count , `Expected only one element, but found ${ count } ` ) . toBe ( 0 ) ;
1732+ }
1733+ await expect ( this . refListBlock ) . toBeVisible ( { visible : isVisible } ) ;
1734+ }
1735+
1736+ async doesBlockCustomViewHaveValue ( customBlockViewLocator : string , valueText : string ) {
1737+ const locator = this . page . locator ( `${ customBlockViewLocator } p` ) ;
1738+ await expect ( locator ) . toBeVisible ( ) ;
1739+ await expect ( locator ) . toHaveText ( valueText ) ;
1740+ }
1741+
1742+ async clickPropertyActionWithName ( name : string ) {
1743+ const actionLocator = this . propertyActionMenu . locator ( 'umb-property-action uui-menu-item[label="' + name + '"]' ) ;
1744+ await expect ( actionLocator ) . toBeVisible ( ) ;
1745+ await actionLocator . click ( ) ;
1746+ }
17111747
17121748 async isContentWithNameVisibleInList ( contentName : string , isVisible : boolean = true ) {
17131749 await expect ( this . documentTableColumnName . filter ( { hasText : contentName } ) ) . toBeVisible ( { visible : isVisible } ) ;
@@ -1721,4 +1757,17 @@ export class ContentUiHelper extends UiBaseLocators {
17211757 async doesDocumentModalHaveText ( text : string ) {
17221758 await expect ( this . documentCreateOptionsModal ) . toContainText ( text ) ;
17231759 }
1760+
1761+ async doesListViewItemsHaveCount ( pageSize : number ) {
1762+ await expect ( this . listViewCustomRows ) . toHaveCount ( pageSize ) ;
1763+ }
1764+
1765+ async isListViewItemWithNameVisible ( itemName : string , index : number = 0 ) {
1766+ await expect ( this . listViewCustomRows . nth ( index ) ) . toContainText ( itemName ) ;
1767+ }
1768+
1769+ async clickPaginationNextButton ( ) {
1770+ await expect ( this . nextBtn ) . toBeVisible ( ) ;
1771+ await this . nextBtn . click ( ) ;
1772+ }
17241773}
0 commit comments