Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.31",
"@umbraco/playwright-testhelpers": "^15.0.42",
"@umbraco/playwright-testhelpers": "^15.0.44",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,29 @@ test('can not copy a block from a block grid to a block list without allowed blo
// Clean
await umbracoApi.documentType.ensureNameNotExists(blockListElementTypeName);
});

test('can not copy a block from a block grid to root without allowed in root', async ({umbracoApi, umbracoUi}) => {
// Arrange
const secondElementTypeName = 'SecondElementType';
const areaAlias = 'testArea';
await umbracoApi.documentType.ensureNameNotExists(secondElementTypeName);
const secondElementTypeId = await umbracoApi.documentType.createEmptyElementType(secondElementTypeName);
const blockGridId = await umbracoApi.dataType.createBlockGridWithAnAreaInABlockWithAllowInAreasAndASecondBlock(blockGridDataTypeName, elementTypeId, secondElementTypeId, areaAlias, true, 'TestCreateLabel' ,12 ,1, 0 , 10, false, true);
const areaKey = await umbracoApi.dataType.getBlockGridAreaKeyFromBlock(blockGridDataTypeName, elementTypeId, areaAlias);
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, blockGridDataTypeName, blockGridId, groupName);
await umbracoApi.document.createDocumentWithABlockGridEditorWithABlockThatContainsABlockInAnArea(contentName, documentTypeId, blockGridDataTypeName, elementTypeId, areaKey, secondElementTypeId, AliasHelper.toAlias(elementPropertyName), blockPropertyValue, richTextDataTypeUiAlias);
await umbracoUi.goToBackOffice();
await umbracoUi.content.goToSection(ConstantHelper.sections.content);
await umbracoUi.content.goToContentWithName(contentName);

// Act
await umbracoUi.content.clickCopyBlockGridBlockButton(groupName, blockGridDataTypeName, secondElementTypeName, 1);
await umbracoUi.content.clickActionsMenuForProperty(groupName, blockGridDataTypeName);
await umbracoUi.content.clickExactReplaceButton();

// Assert
await umbracoUi.content.doesClipboardContainCopiedBlocksCount(0);

// Clean
await umbracoApi.documentType.ensureNameNotExists(secondElementTypeName);
});