@@ -334,3 +334,29 @@ test('can not copy a block from a block grid to a block list without allowed blo
334
334
// Clean
335
335
await umbracoApi . documentType . ensureNameNotExists ( blockListElementTypeName ) ;
336
336
} ) ;
337
+
338
+ test ( 'can not copy a block from a block grid to root without allowed in root' , async ( { umbracoApi, umbracoUi} ) => {
339
+ // Arrange
340
+ const secondElementTypeName = 'SecondElementType' ;
341
+ const areaAlias = 'testArea' ;
342
+ await umbracoApi . documentType . ensureNameNotExists ( secondElementTypeName ) ;
343
+ const secondElementTypeId = await umbracoApi . documentType . createEmptyElementType ( secondElementTypeName ) ;
344
+ const blockGridId = await umbracoApi . dataType . createBlockGridWithAnAreaInABlockWithAllowInAreasAndASecondBlock ( blockGridDataTypeName , elementTypeId , secondElementTypeId , areaAlias , true , 'TestCreateLabel' , 12 , 1 , 0 , 10 , false , true ) ;
345
+ const areaKey = await umbracoApi . dataType . getBlockGridAreaKeyFromBlock ( blockGridDataTypeName , elementTypeId , areaAlias ) ;
346
+ const documentTypeId = await umbracoApi . documentType . createDocumentTypeWithPropertyEditor ( documentTypeName , blockGridDataTypeName , blockGridId , groupName ) ;
347
+ await umbracoApi . document . createDocumentWithABlockGridEditorWithABlockThatContainsABlockInAnArea ( contentName , documentTypeId , blockGridDataTypeName , elementTypeId , areaKey , secondElementTypeId , AliasHelper . toAlias ( elementPropertyName ) , blockPropertyValue , richTextDataTypeUiAlias ) ;
348
+ await umbracoUi . goToBackOffice ( ) ;
349
+ await umbracoUi . content . goToSection ( ConstantHelper . sections . content ) ;
350
+ await umbracoUi . content . goToContentWithName ( contentName ) ;
351
+
352
+ // Act
353
+ await umbracoUi . content . clickCopyBlockGridBlockButton ( groupName , blockGridDataTypeName , secondElementTypeName , 1 ) ;
354
+ await umbracoUi . content . clickActionsMenuForProperty ( groupName , blockGridDataTypeName ) ;
355
+ await umbracoUi . content . clickExactReplaceButton ( ) ;
356
+
357
+ // Assert
358
+ await umbracoUi . content . doesClipboardContainCopiedBlocksCount ( 0 ) ;
359
+
360
+ // Clean
361
+ await umbracoApi . documentType . ensureNameNotExists ( secondElementTypeName ) ;
362
+ } ) ;
0 commit comments