@@ -95,7 +95,6 @@ export class ContentUiHelper extends UiBaseLocators {
9595 private readonly publicAccessBtn : Locator ;
9696 private readonly uuiCheckbox : Locator ;
9797 private readonly sortBtn : Locator ;
98- private readonly modalChooseBtn : Locator ;
9998 private readonly containerSaveBtn : Locator
10099 private readonly groupBasedProtectionBtn : Locator ;
101100 private readonly nextBtn : Locator ;
@@ -143,8 +142,8 @@ export class ContentUiHelper extends UiBaseLocators {
143142 private readonly workspaceActionMenu : Locator ;
144143 private readonly workspaceActionMenuItem : Locator ;
145144 private readonly viewMoreOptionsBtn : Locator ;
146- private readonly scheduleBtn : Locator ;
147- private readonly scheduleModalBtn : Locator ;
145+ private readonly schedulePublishBtn : Locator ;
146+ private readonly schedulePublishModalBtn : Locator ;
148147 private readonly documentScheduleModal : Locator ;
149148 private readonly publishAtFormLayout : Locator ;
150149 private readonly unpublishAtFormLayout : Locator ;
@@ -177,7 +176,7 @@ export class ContentUiHelper extends UiBaseLocators {
177176 this . contentNameTxt = page . locator ( '#name-input input' ) ;
178177 this . publishBtn = page . getByLabel ( / ^ P u b l i s h ( … ) ? $ / ) ;
179178 this . unpublishBtn = page . getByLabel ( / ^ U n p u b l i s h ( … ) ? $ / ) ;
180- this . actionMenuForContentBtn = page . locator ( '#header [label="Open actions menu"] ' ) ;
179+ this . actionMenuForContentBtn = page . locator ( '#header #action-modal ' ) ;
181180 this . openedModal = page . locator ( 'uui-modal-container[backdrop]' ) ;
182181 this . textstringTxt = page . locator ( 'umb-property-editor-ui-text-box #input' ) ;
183182 this . reloadChildrenThreeDotsBtn = page . getByRole ( 'button' , { name : 'Reload children…' } ) ;
@@ -195,7 +194,7 @@ export class ContentUiHelper extends UiBaseLocators {
195194 this . chooseMemberPickerBtn = page . locator ( 'umb-property-editor-ui-member-picker #btn-add' ) ;
196195 this . numericTxt = page . locator ( 'umb-property-editor-ui-number input' ) ;
197196 this . addMultiURLPickerBtn = page . locator ( 'umb-property-editor-ui-multi-url-picker #btn-add' ) ;
198- this . linkTxt = page . locator ( '[data-mark=" input:url"] #input') ;
197+ this . linkTxt = page . getByTestId ( ' input:url' ) . locator ( ' #input') ;
199198 this . anchorQuerystringTxt = page . getByLabel ( '#value or ?key=value' ) ;
200199 this . linkTitleTxt = this . linkPickerModal . getByLabel ( 'Title' ) ;
201200 this . tagItems = page . locator ( 'uui-tag' ) ;
@@ -219,7 +218,7 @@ export class ContentUiHelper extends UiBaseLocators {
219218 this . documentLanguageSelectPopover = page . locator ( 'umb-popover-layout' ) ;
220219 this . documentReadOnly = this . documentWorkspace . locator ( '#name-input' ) . getByText ( 'Read-only' ) ;
221220 // Info tab
222- this . infoTab = page . locator ( 'uui-tab[data-mark=" workspace:view-link:Umb.WorkspaceView.Document.Info"] ') ;
221+ this . infoTab = page . getByTestId ( ' workspace:view-link:Umb.WorkspaceView.Document.Info') ;
223222 this . linkContent = page . locator ( 'umb-document-links-workspace-info-app' ) ;
224223 this . historyItems = page . locator ( 'umb-history-item' ) ;
225224 this . generalItem = page . locator ( '.general-item' ) ;
@@ -239,7 +238,7 @@ export class ContentUiHelper extends UiBaseLocators {
239238 this . saveModalBtn = this . sidebarModal . getByLabel ( 'Save' , { exact : true } ) ;
240239 this . resetFocalPointBtn = page . getByLabel ( 'Reset focal point' ) ;
241240 // List View
242- this . enterNameInContainerTxt = this . container . locator ( '[data-mark=" input:entity-name"] #input') ;
241+ this . enterNameInContainerTxt = this . container . getByTestId ( ' input:entity-name' ) . locator ( ' #input') ;
243242 this . listView = page . locator ( 'umb-document-table-collection-view' ) ;
244243 this . nameBtn = page . getByRole ( 'button' , { name : 'Name' } ) ;
245244 this . listViewTableRow = this . listView . locator ( 'uui-table-row' ) ;
@@ -269,7 +268,6 @@ export class ContentUiHelper extends UiBaseLocators {
269268 this . publicAccessBtn = page . getByRole ( 'button' , { name : 'Public Access' } ) ;
270269 this . uuiCheckbox = page . locator ( 'uui-checkbox' ) ;
271270 this . sortBtn = page . getByLabel ( 'Sort' , { exact : true } ) ;
272- this . modalChooseBtn = page . locator ( 'umb-tree-picker-modal' ) . getByLabel ( 'Choose' ) ;
273271 this . containerSaveBtn = this . container . getByLabel ( 'Save' ) ;
274272 this . groupBasedProtectionBtn = page . locator ( 'span' ) . filter ( { hasText : 'Group based protection' } ) ;
275273 this . nextBtn = page . getByLabel ( 'Next' ) ;
@@ -278,9 +276,9 @@ export class ContentUiHelper extends UiBaseLocators {
278276 this . selectErrorPageDocument = page . locator ( '.select-item' ) . filter ( { hasText : 'Error Page' } ) . locator ( 'umb-input-document' ) ;
279277 this . rollbackItem = page . locator ( '.rollback-item' ) ;
280278 this . actionsMenu = page . locator ( 'uui-scroll-container' ) ;
281- this . linkToDocumentBtn = this . linkPickerModal . locator ( '[data-mark=" action:document"] #button') ;
282- this . linkToMediaBtn = this . linkPickerModal . locator ( '[data-mark=" action:media"] #button') ;
283- this . linkToManualBtn = this . linkPickerModal . locator ( '[data-mark=" action:external"] #button') ;
279+ this . linkToDocumentBtn = this . linkPickerModal . getByTestId ( ' action:document' ) . locator ( ' #button') ;
280+ this . linkToMediaBtn = this . linkPickerModal . getByTestId ( ' action:media' ) . locator ( ' #button') ;
281+ this . linkToManualBtn = this . linkPickerModal . getByTestId ( ' action:external' ) . locator ( ' #button') ;
284282 this . umbDocumentCollection = page . locator ( 'umb-document-collection' ) ;
285283 this . documentTableColumnName = this . listView . locator ( 'umb-document-table-column-name' ) ;
286284 //Block Grid - Block List
@@ -300,7 +298,7 @@ export class ContentUiHelper extends UiBaseLocators {
300298 this . workspaceEditTab = page . locator ( 'umb-content-workspace-view-edit-tab' ) ;
301299 this . blockWorkspaceEditTab = page . locator ( 'umb-block-workspace-view-edit-tab' ) ;
302300 this . workspaceEditProperties = page . locator ( 'umb-content-workspace-view-edit-properties' ) ;
303- this . openActionsMenu = page . getByLabel ( 'Open actions menu') ;
301+ this . openActionsMenu = page . locator ( '#action- menu') ;
304302 this . replaceExactBtn = page . getByRole ( 'button' , { name : 'Replace' , exact : true } ) ;
305303 this . clipboardEntryPicker = page . locator ( 'umb-clipboard-entry-picker' ) ;
306304 this . blockGridAreasContainer = page . locator ( 'umb-block-grid-areas-container' ) ;
@@ -322,9 +320,9 @@ export class ContentUiHelper extends UiBaseLocators {
322320 this . workspaceActionMenu = page . locator ( 'umb-workspace-action-menu' ) ;
323321 this . workspaceActionMenuItem = page . locator ( 'umb-workspace-action-menu-item' ) ;
324322 this . viewMoreOptionsBtn = this . workspaceActionMenu . locator ( '#popover-trigger' ) ;
325- this . scheduleBtn = this . workspaceActionMenuItem . getByLabel ( 'Schedule' , { exact : true } ) ;
323+ this . schedulePublishBtn = this . workspaceActionMenuItem . getByLabel ( 'Schedule publish ' , { exact : true } ) ;
326324 this . documentScheduleModal = page . locator ( 'umb-document-schedule-modal' ) ;
327- this . scheduleModalBtn = this . documentScheduleModal . getByLabel ( 'Schedule' , { exact : true } ) ;
325+ this . schedulePublishModalBtn = this . documentScheduleModal . getByLabel ( 'Schedule publish ' , { exact : true } ) ;
328326 this . publishAtFormLayout = this . documentScheduleModal . locator ( 'uui-form-layout-item' ) . first ( ) ;
329327 this . unpublishAtFormLayout = this . documentScheduleModal . locator ( 'uui-form-layout-item' ) . last ( ) ;
330328 this . publishAtValidationMessage = this . publishAtFormLayout . locator ( '#messages' ) ;
@@ -1055,13 +1053,13 @@ export class ContentUiHelper extends UiBaseLocators {
10551053 await this . nextBtn . click ( ) ;
10561054 await this . chooseMemberGroupBtn . click ( ) ;
10571055 await this . page . getByLabel ( memberGroupName ) . click ( ) ;
1058- await this . clickSubmitButton ( ) ;
1056+ await this . clickChooseModalButton ( ) ;
10591057 await this . selectLoginPageDocument . click ( ) ;
10601058 await this . container . getByLabel ( documentName , { exact : true } ) . click ( ) ;
1061- await this . modalChooseBtn . click ( ) ;
1059+ await this . clickChooseModalButton ( ) ;
10621060 await this . selectErrorPageDocument . click ( ) ;
10631061 await this . container . getByLabel ( documentName , { exact : true } ) . click ( ) ;
1064- await this . modalChooseBtn . click ( ) ;
1062+ await this . clickChooseModalButton ( ) ;
10651063 await this . containerSaveBtn . click ( ) ;
10661064 }
10671065
@@ -1423,15 +1421,15 @@ export class ContentUiHelper extends UiBaseLocators {
14231421 }
14241422
14251423 async doesRichTextEditorBlockContainLabel ( richTextEditorAlias : string , label : string ) {
1426- await expect ( this . page . locator ( '[data-mark=" property:' + richTextEditorAlias + '"]' ) . locator ( this . rteBlock ) ) . toContainText ( label ) ;
1424+ await expect ( this . page . getByTestId ( ' property:' + richTextEditorAlias ) . locator ( this . rteBlock ) ) . toContainText ( label ) ;
14271425 }
14281426
14291427 async doesBlockEditorModalContainEditorSize ( editorSize : string , elementName : string ) {
14301428 await expect ( this . backofficeModalContainer . locator ( '[size="' + editorSize + '"]' ) . locator ( '[headline="Add ' + elementName + '"]' ) ) . toBeVisible ( ) ;
14311429 }
14321430
14331431 async doesBlockEditorModalContainInline ( richTextEditorAlias : string , elementName : string ) {
1434- await expect ( this . page . locator ( '[data-mark=" property:' + richTextEditorAlias + '"]' ) . locator ( this . tiptapInput ) . locator ( this . rteBlockInline ) ) . toContainText ( elementName ) ;
1432+ await expect ( this . page . getByTestId ( ' property:' + richTextEditorAlias ) . locator ( this . tiptapInput ) . locator ( this . rteBlockInline ) ) . toContainText ( elementName ) ;
14351433 }
14361434
14371435 async doesBlockHaveBackgroundColor ( elementName : string , backgroundColor : string ) {
@@ -1456,14 +1454,14 @@ export class ContentUiHelper extends UiBaseLocators {
14561454 await this . viewMoreOptionsBtn . click ( ) ;
14571455 }
14581456
1459- async clickScheduleButton ( ) {
1460- await expect ( this . scheduleBtn ) . toBeVisible ( ) ;
1461- await this . scheduleBtn . click ( ) ;
1457+ async clickSchedulePublishButton ( ) {
1458+ await expect ( this . schedulePublishBtn ) . toBeVisible ( ) ;
1459+ await this . schedulePublishBtn . click ( ) ;
14621460 }
14631461
1464- async clickScheduleModalButton ( ) {
1465- await expect ( this . scheduleModalBtn ) . toBeVisible ( ) ;
1466- await this . scheduleModalBtn . click ( ) ;
1462+ async clickSchedulePublishModalButton ( ) {
1463+ await expect ( this . schedulePublishModalBtn ) . toBeVisible ( ) ;
1464+ await this . schedulePublishModalBtn . click ( ) ;
14671465 }
14681466
14691467 async enterPublishTime ( time : string , index : number = 0 ) {
@@ -1504,12 +1502,10 @@ export class ContentUiHelper extends UiBaseLocators {
15041502 }
15051503
15061504 async doesSchedulePublishModalButtonContainDisabledTag ( hasDisabledTag : boolean = false ) {
1507- const button = this . page . locator ( 'uui-button[label="Schedule"]' ) ;
1508-
15091505 if ( ! hasDisabledTag ) {
1510- return await expect ( button ) . not . toHaveAttribute ( 'disabled' , '' ) ;
1506+ return await expect ( this . schedulePublishModalBtn ) . not . toHaveAttribute ( 'disabled' , '' ) ;
15111507 }
1512- return await expect ( button ) . toHaveAttribute ( 'disabled' , '' ) ;
1508+ return await expect ( this . schedulePublishModalBtn ) . toHaveAttribute ( 'disabled' , '' ) ;
15131509 }
15141510
15151511 async clickInlineBlockCaretButtonForName ( blockEditorName : string , index : number = 0 ) {
@@ -1561,4 +1557,9 @@ export class ContentUiHelper extends UiBaseLocators {
15611557 async doesDocumentVariantLanguageItemHaveName ( name : string ) {
15621558 await expect ( this . documentVariantLanguagePicker ) . toContainText ( name ) ;
15631559 }
1560+
1561+ async clickSchedulePublishLanguageButton ( languageName : string ) {
1562+ await expect ( this . page . getByRole ( 'menu' ) . filter ( { hasText : languageName } ) ) . toBeVisible ( ) ;
1563+ await this . page . getByRole ( 'menu' ) . filter ( { hasText : languageName } ) . click ( ) ;
1564+ }
15641565}
0 commit comments