File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
modules/test/playwright/tests/site-cms-site-initializer/main Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ const testWithRepeatableFF = mergeTests(
733733testWithRepeatableFF (
734734 'Create item with repeatable groups' ,
735735 {
736- tag : '@LPD-50378' ,
736+ tag : [ '@LPD-50378' , '@LPD-68645' ] ,
737737 } ,
738738 async ( { contentsPage, page, structureBuilderPage} ) => {
739739
@@ -817,6 +817,22 @@ testWithRepeatableFF(
817817
818818 await contentsPage . saveContent ( ) ;
819819
820+ // View content and check that the repeatable buttons are not showed
821+
822+ await contentsPage . viewContent ( title ) ;
823+
824+ expect (
825+ page
826+ . getByRole ( 'dialog' , { name : title } )
827+ . frameLocator ( 'iframe' )
828+ . getByLabel ( 'Add new' )
829+ ) . not . toBeVisible ( ) ;
830+
831+ await page
832+ . getByRole ( 'dialog' , { name : title } )
833+ . getByRole ( 'button' , { name : 'close' } )
834+ . click ( ) ;
835+
820836 // Edit the content again and check values
821837
822838 await contentsPage . editContent ( title ) ;
Original file line number Diff line number Diff line change @@ -237,4 +237,23 @@ export class ContentsPage {
237237 this . page . locator ( '.management-bar' ) . getByText ( 'Publish' )
238238 ) . toBeVisible ( ) ;
239239 }
240+
241+ async viewContent ( title : string ) {
242+ const card = this . page
243+ . locator ( 'tr' , { hasText : title } )
244+ . or ( this . page . locator ( '.card-row' , { hasText : title } ) ) ;
245+
246+ await clickAndExpectToBeVisible ( {
247+ autoClick : true ,
248+ target : this . page . getByRole ( 'menuitem' , {
249+ exact : true ,
250+ name : 'View' ,
251+ } ) ,
252+ trigger : card . locator ( 'button' ) ,
253+ } ) ;
254+
255+ await expect (
256+ this . page . getByRole ( 'dialog' , { name : title } )
257+ ) . toBeVisible ( ) ;
258+ }
240259}
You can’t perform that action at this time.
0 commit comments