diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts index 33a2afc94d..0ad59c90ad 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts @@ -32,9 +32,10 @@ test.beforeEach(async ({umbracoApi}) => { test.afterEach(async ({umbracoApi}) => { await umbracoApi.language.ensureIsoCodeNotExists('da'); - await umbracoApi.documentType.ensureNameNotExists(documentTypeName); await umbracoApi.documentType.ensureNameNotExists(blockName); await umbracoApi.dataType.ensureNameNotExists(blockGridName); + await umbracoApi.document.ensureNameNotExists(contentName); + await umbracoApi.documentType.ensureNameNotExists(documentTypeName); }); test('invariant document type with invariant block grid with invariant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { @@ -63,34 +64,25 @@ test('invariant document type with invariant block grid with invariant block wit await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); }); -test('invariant document type with invariant block grid with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant block grid with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, false); blockGridId = await umbracoApi.dataType.createBlockGridWithABlockAndAllowAtRoot(blockGridName, elementTypeId, true); documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, blockGridName, blockGridId, documentTypeGroupName); await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); - await umbracoUi.content.goToSection(ConstantHelper.sections.content); - await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.goToBlockGridBlockWithName(documentTypeGroupName, blockGridName, blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); -// Remove fixme when this test works. Currently, the textstring value is not saved when saving / publishing the document -test.fixme('invariant document type with invariant block grid with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant block grid with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, true); blockGridId = await umbracoApi.dataType.createBlockGridWithABlockAndAllowAtRoot(blockGridName, elementTypeId, true); @@ -98,22 +90,15 @@ test.fixme('invariant document type with invariant block grid with variant block await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); await umbracoUi.content.goToSection(ConstantHelper.sections.content); - await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickBlockElementWithName(blockName) - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.goToBlockGridBlockWithName(documentTypeGroupName, blockGridName, blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); test('variant document type with variant block grid with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { @@ -195,4 +180,4 @@ test('variant document type with invariant block grid with variant block with an await umbracoUi.reloadPage(); await umbracoUi.content.goToBlockGridBlockWithName(documentTypeGroupName, blockGridName, blockName); await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); -}); +}); \ No newline at end of file diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts index 1ad6625c86..222deef581 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts @@ -32,9 +32,10 @@ test.beforeEach(async ({umbracoApi}) => { test.afterEach(async ({umbracoApi}) => { await umbracoApi.language.ensureIsoCodeNotExists('da'); - await umbracoApi.documentType.ensureNameNotExists(documentTypeName); await umbracoApi.documentType.ensureNameNotExists(blockName); await umbracoApi.dataType.ensureNameNotExists(blockListName); + await umbracoApi.document.ensureNameNotExists(contentName); + await umbracoApi.documentType.ensureNameNotExists(documentTypeName); }); test('invariant document type with invariant block list with invariant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { @@ -63,57 +64,40 @@ test('invariant document type with invariant block list with invariant block wit await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); }); -test('invariant document type with invariant block list with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant block list with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, false); blockListId = await umbracoApi.dataType.createBlockListDataTypeWithABlock(blockListName, elementTypeId); documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, blockListName, blockListId, documentTypeGroupName); await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); - await umbracoUi.content.goToSection(ConstantHelper.sections.content); - await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.goToBlockListBlockWithName(documentTypeGroupName, blockListName, blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); -// Remove fixme when this test works. Currently the textstring value is is not saved when saving / publishing the document -test.fixme('invariant document type with invariant block list with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant block list with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, true); blockListId = await umbracoApi.dataType.createBlockListDataTypeWithABlock(blockListName, elementTypeId); documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, blockListName, blockListId, documentTypeGroupName); await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); - await umbracoUi.content.goToSection(ConstantHelper.sections.content); - await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickBlockElementWithName(blockName) - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.goToBlockListBlockWithName(documentTypeGroupName, blockListName, blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); test('variant document type with variant block list with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts index 21f8a99295..cf9a8a3088 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts @@ -32,9 +32,10 @@ test.beforeEach(async ({umbracoApi}) => { test.afterEach(async ({umbracoApi}) => { await umbracoApi.language.ensureIsoCodeNotExists('da'); - await umbracoApi.documentType.ensureNameNotExists(documentTypeName); await umbracoApi.documentType.ensureNameNotExists(blockName); await umbracoApi.dataType.ensureNameNotExists(tipTapName); + await umbracoApi.document.ensureNameNotExists(contentName); + await umbracoApi.documentType.ensureNameNotExists(documentTypeName); }); test('invariant document type with invariant tiptap RTE with invariant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { @@ -64,57 +65,41 @@ test('invariant document type with invariant tiptap RTE with invariant block wit await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); }); -test('invariant document type with invariant tiptap RTE with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant tiptap RTE with variant block with an invariant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, false); tipTapId = await umbracoApi.dataType.createTipTapDataTypeWithABlock(tipTapName, elementTypeId); documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, tipTapName, tipTapId, documentTypeGroupName); await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); - await umbracoUi.content.goToSection(ConstantHelper.sections.content); - await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickInsertBlockButton(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); -// Remove fixme when this test works. Currently the textstring value is is not saved when saving / publishing the document -test.fixme('invariant document type with invariant tiptap RTE with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { +test('can not create unsupported invariant document type with invariant tiptap RTE with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => { // Arrange elementTypeId = await umbracoApi.documentType.createDefaultElementTypeWithVaryByCulture(blockName, elementGroupName, textStringName, textStringDataTypeId, true, true); tipTapId = await umbracoApi.dataType.createTipTapDataTypeWithABlock(tipTapName, elementTypeId); documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, tipTapName, tipTapId, documentTypeGroupName); await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); await umbracoUi.goToBackOffice(); - await umbracoUi.content.goToSection(ConstantHelper.sections.content); await umbracoUi.content.goToContentWithName(contentName); // Act - await umbracoUi.content.clickInsertBlockButton(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.enterTextstring(textStringText); - await umbracoUi.content.clickCreateModalButton(); + await umbracoUi.content.goToContentWithName(contentName); + await umbracoUi.content.isValidationMessageVisible(ConstantHelper.validationMessages.unsupportInvariantContentItemWithVariantBlocks); await umbracoUi.content.clickSaveAndPublishButton(); // Assert await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.saved); - await umbracoUi.content.doesSuccessNotificationHaveText(NotificationConstantHelper.success.published); - - await umbracoUi.reloadPage(); - await umbracoUi.content.clickBlockElementWithName(blockName); - await umbracoUi.content.doesPropertyContainValue(textStringName, textStringText); + await umbracoUi.content.doesErrorNotificationHaveText(NotificationConstantHelper.error.documentCouldNotBePublished); }); test('variant document type with variant tiptap RTE with variant block with an variant textString', async ({umbracoApi, umbracoUi}) => {