From e8f2bb33d767d2cbb49a6846349dd2ad04aeda45 Mon Sep 17 00:00:00 2001 From: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:54:09 +0700 Subject: [PATCH] E2E: QA Fixed the failing tests due to the recent UI changes (#20576) * Added skip tag for the failing tests due to the issues and added waits for the flaky tests * Commentted code as the reference items displays randomly * Bumped version * Added more waits to avoid the flaky tests * Updated tests for setting culture and hostnames since the first content already has the default domain * Fixed flaky tests * Updated tests since the reload step is flaky * Added more waits for the flaky tests in Windows * Need to publish first document before set domain for second document * Make permission tests run in the pipeline * Added step to ensure the rollback action is completed * Reverted npm command * Added skip tag for the permission tests * Fixed test for the culture and hostname permission * Removed waits as it is includes in test helper * Fixed test for adding a media in RTE Tiptap property editor * Updated test helper function to avoid the flaky tests releated to block * Added more waits to ensure image uploaded * Bumped version * Bumped version * Reverted * Reverted code * Bumped version of test helper * Bumped version * Reverted code * Added more waits to avoid flaky tests * Added more waits * Updated nightly pipeline: remove v17/dev, run different app setting tests by default and not run Relation Type in Linux as they are too flaky * Added more waits * Added npm command for testWindows * Added more waits after creating a folder --- build/nightly-E2E-test-pipelines.yml | 15 +++++++-------- .../package-lock.json | 8 ++++---- .../Umbraco.Tests.AcceptanceTest/package.json | 5 +++-- .../BlockGrid/ContentWithBlockGrid.spec.ts | 19 +++++++++---------- .../BlockList/ContentWithBlockList.spec.ts | 8 ++++---- .../Content/ContentWithImageCropper.spec.ts | 2 ++ .../RichTextEditor/ContentWithTiptap.spec.ts | 2 +- .../RichTextEditor/TiptapToolbar.spec.ts | 2 +- .../Content/TrashContent/TrashContent.spec.ts | 2 +- .../BlockListEditor/BlockListBlocks.spec.ts | 1 + .../DataTypeCollectionWorkspace.spec.ts | 2 ++ .../DataType/DataTypeFolder.spec.ts | 3 +++ .../Settings/Dashboard/Profiling.spec.ts | 6 +++--- .../DocumentTypeCollectionWorkspace.spec.ts | 1 + .../DocumentType/DocumentTypeFolder.spec.ts | 1 + .../MediaType/MediaTypeFolder.spec.ts | 6 +++--- .../User/ContentStartNodes.spec.ts | 5 +++-- .../Permissions/User/MediaStartNodes.spec.ts | 6 ++++-- .../UserGroup/ContentStartNodes.spec.ts | 3 ++- .../DefaultPermissionsInContent.spec.ts | 4 +++- ...entPropertyValueGranularPermission.spec.ts | 5 +++-- .../DocumentPropertyValuePermission.spec.ts | 3 ++- .../GranularPermissionsInContent.spec.ts | 14 ++++++++++---- .../UserGroup/MediaStartNodes.spec.ts | 6 ++++-- 24 files changed, 77 insertions(+), 52 deletions(-) diff --git a/build/nightly-E2E-test-pipelines.yml b/build/nightly-E2E-test-pipelines.yml index 74c6f7b0f7..8ed64d6030 100644 --- a/build/nightly-E2E-test-pipelines.yml +++ b/build/nightly-E2E-test-pipelines.yml @@ -11,7 +11,6 @@ schedules: - v15/dev - v16/dev - main - - v17/dev parameters: - name: skipIntegrationTests @@ -19,10 +18,10 @@ parameters: type: boolean default: false - - name: differentAppSettingsAcceptanceTests - displayName: Run acceptance tests with different app settings + - name: skipDifferentAppSettingsAcceptanceTests + displayName: Skip acceptance tests with different app settings type: boolean - default: true + default: false - name: skipDefaultConfigAcceptanceTests displayName: Skip tests with DefaultConfig @@ -444,15 +443,15 @@ stages: vmImage: "ubuntu-latest" CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True" WindowsPart1Of3: - testCommand: "npm run test -- --shard=1/3" + testCommand: "npm run testWindows -- --shard=1/3" testFolder: "DefaultConfig" vmImage: "windows-latest" WindowsPart2Of3: - testCommand: "npm run test -- --shard=2/3" + testCommand: "npm run testWindows -- --shard=2/3" testFolder: "DefaultConfig" vmImage: "windows-latest" WindowsPart3Of3: - testCommand: "npm run test -- --shard=3/3" + testCommand: "npm run testWindows -- --shard=3/3" testFolder: "DefaultConfig" vmImage: "windows-latest" pool: @@ -506,7 +505,7 @@ stages: jobs: - job: displayName: E2E Tests with Different App settings (SQL Server) - condition: ${{ eq(parameters.differentAppSettingsAcceptanceTests, true) }} + condition: ${{ eq(parameters.skipDifferentAppSettingsAcceptanceTests, false) }} timeoutInMinutes: 180 variables: SA_PASSWORD: UmbracoAcceptance123! diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index 08bccb8177..6011fa4e8f 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -8,7 +8,7 @@ "hasInstallScript": true, "dependencies": { "@umbraco/json-models-builders": "^2.0.41", - "@umbraco/playwright-testhelpers": "^17.0.0-beta.10", + "@umbraco/playwright-testhelpers": "^17.0.3", "camelize": "^1.0.0", "dotenv": "^16.3.1", "node-fetch": "^2.6.7" @@ -67,9 +67,9 @@ } }, "node_modules/@umbraco/playwright-testhelpers": { - "version": "17.0.0-beta.10", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.0-beta.10.tgz", - "integrity": "sha512-ePvtWK2IG/j3TIL1w7xkZR63FHM32hIjZxaxJOQ4rYNuVxBKT7TTKEvASfdwpDBFnlAN186xZRGA9KJq+Jxijg==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.3.tgz", + "integrity": "sha512-nlc7c7l/E264De+Z/niPfTT8yfRPauEmwbpX+N85PD30iM0mGLHd80InfM0mia19kL2njUm9ww3X8p7ZwBUM/g==", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.41", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 953a56cd0c..4697f58b54 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -11,7 +11,8 @@ "createTest": "node createTest.js", "smokeTest": "npx playwright test DefaultConfig --grep \"@smoke\"", "smokeTestSqlite": "npx playwright test DefaultConfig --grep \"@smoke\" --grep-invert \"Users\"", - "releaseTest": "npx playwright test DefaultConfig --grep \"@release\"" + "releaseTest": "npx playwright test DefaultConfig --grep \"@release\"", + "testWindows": "npx playwright test DefaultConfig --grep-invert \"RelationType\"" }, "devDependencies": { "@playwright/test": "1.50", @@ -22,7 +23,7 @@ }, "dependencies": { "@umbraco/json-models-builders": "^2.0.41", - "@umbraco/playwright-testhelpers": "^17.0.0-beta.10", + "@umbraco/playwright-testhelpers": "^17.0.3", "camelize": "^1.0.0", "dotenv": "^16.3.1", "node-fetch": "^2.6.7" diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/ContentWithBlockGrid.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/ContentWithBlockGrid.spec.ts index b16ede4a08..6e8a92a7c4 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/ContentWithBlockGrid.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/ContentWithBlockGrid.spec.ts @@ -81,7 +81,7 @@ test('can add a block element in the content', async ({umbracoApi, umbracoUi}) = // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButton(); @@ -160,8 +160,7 @@ test('cannot add number of block element greater than the maximum amount', {tag: // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.waitForTimeout(500); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.clickCreateModalButton(); // Assert @@ -196,7 +195,7 @@ test('can set the label of block element in the content', async ({umbracoApi, um // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButton(); @@ -217,7 +216,7 @@ test('can set the number of columns for the layout in the content', async ({umbr // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButton(); @@ -245,7 +244,7 @@ test('can add settings model for the block in the content', async ({umbracoApi, // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(contentBlockInputText); await umbracoUi.content.clickAddBlockSettingsTabButton(); await umbracoUi.content.enterTextArea(settingBlockInputText); @@ -298,7 +297,7 @@ test('can add a block element with inline editing mode enabled', async ({umbraco // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveAndPublishButton(); @@ -329,7 +328,7 @@ test('can add an invariant block element with an invariant RTE Tiptap in the con // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); @@ -363,7 +362,7 @@ test('can add a variant block element with variant RTE Tiptap in the content', a // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); @@ -399,7 +398,7 @@ test('can add a variant block element with invariant RTE Tiptap in the content', // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/ContentWithBlockList.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/ContentWithBlockList.spec.ts index 7fed44f119..398d6aead1 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/ContentWithBlockList.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/ContentWithBlockList.spec.ts @@ -194,7 +194,7 @@ test('can add settings model for the block in the content', async ({umbracoApi, // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(contentBlockInputText); await umbracoUi.content.clickAddBlockSettingsTabButton(); await umbracoUi.content.enterTextArea(settingBlockInputText); @@ -276,7 +276,7 @@ test('can add an invariant block element with invariant RTE Tiptap in the conten // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButton(); @@ -310,7 +310,7 @@ test('can add a variant block element with variant RTE Tiptap in the content', a // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); @@ -346,7 +346,7 @@ test('can add a variant block element with invariant RTE Tiptap in the content', // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(customElementTypeName); + await umbracoUi.content.clickBlockElementWithName(customElementTypeName); await umbracoUi.content.enterRTETipTapEditor(inputText); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts index 5b1e1b150d..0459dc10c7 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts @@ -36,6 +36,8 @@ test('can create content with the image cropper data type', async ({umbracoApi, await umbracoUi.content.chooseDocumentType(documentTypeName); await umbracoUi.content.enterContentName(contentName); await umbracoUi.content.uploadFile(imageFilePath); + // Wait for the upload to complete + await umbracoUi.waitForTimeout(1000); await umbracoUi.content.clickSaveButton(); // Assert diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts index fc39dacff6..4933d3c196 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts @@ -114,7 +114,7 @@ test('can save a variant content node after removing embedded block in RTE', asy // Act await umbracoUi.content.clickInsertBlockButton(); - await umbracoUi.content.clickLinkWithName(elementTypeName); + await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(textStringValue); await umbracoUi.content.clickCreateModalButton(); await umbracoUi.content.clickSaveButtonForContent(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/TiptapToolbar.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/TiptapToolbar.spec.ts index 9c61a24955..84d10ef71c 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/TiptapToolbar.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/TiptapToolbar.spec.ts @@ -31,7 +31,7 @@ test('can add a media in RTE Tiptap property editor', async ({umbracoApi, umbrac // Act await umbracoUi.content.goToContentWithName(contentName); await umbracoUi.content.clickTipTapToolbarIconWithTitle(iconTitle); - await umbracoUi.content.selectMediaWithName(imageName); + await umbracoUi.content.selectMediaWithName(imageName, true); await umbracoUi.content.clickChooseModalButton(); await umbracoUi.content.clickMediaCaptionAltTextModalSubmitButton(); await umbracoUi.content.clickSaveAndPublishButton(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/TrashContent/TrashContent.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/TrashContent/TrashContent.spec.ts index f65a686143..0bed742233 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/TrashContent/TrashContent.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/TrashContent/TrashContent.spec.ts @@ -1,4 +1,4 @@ -import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; import {expect} from "@playwright/test"; let dataTypeId = ''; diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts index 2196ef194b..43efd6e553 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts @@ -427,6 +427,7 @@ test('can add a thumbnail to a block', {tag: '@release'}, async ({umbracoApi, um // Act await umbracoUi.dataType.goToDataType(blockListEditorName); await umbracoUi.dataType.goToBlockWithName(elementTypeName); + await umbracoUi.waitForTimeout(500); await umbracoUi.dataType.chooseBlockThumbnailWithPath(mediaUrl); await umbracoUi.dataType.clickSubmitButton(); await umbracoUi.dataType.clickSaveButton(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeCollectionWorkspace.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeCollectionWorkspace.spec.ts index 93f16cf332..fbbdef9350 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeCollectionWorkspace.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeCollectionWorkspace.spec.ts @@ -47,6 +47,7 @@ test('can create a data type folder using create options', async ({umbracoApi, u // Assert await umbracoUi.dataType.waitForDataTypeToBeCreated(); + await umbracoUi.waitForTimeout(500); // Wait for the folder to be fully created expect(await umbracoApi.dataType.doesNameExist(dataTypeFolderName)).toBeTruthy(); // Check if the created data type is displayed in the collection view and has correct icon await umbracoUi.dataType.clickDataTypesMenu(); @@ -89,6 +90,7 @@ test('can create a data type folder in a folder using create options', async ({u // Assert await umbracoUi.dataType.waitForDataTypeToBeCreated(); + await umbracoUi.waitForTimeout(500); // Wait for folder to be created expect(await umbracoApi.dataType.doesNameExist(childFolderName)).toBeTruthy(); // Check if the created data type is displayed in the collection view and has correct icon await umbracoUi.dataType.doesCollectionTreeItemTableRowHaveName(childFolderName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeFolder.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeFolder.spec.ts index 0a274fdd1b..78ade510fa 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeFolder.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeFolder.spec.ts @@ -43,6 +43,7 @@ test('can rename a data type folder', async ({umbracoApi, umbracoUi}) => { // Assert await umbracoUi.dataType.waitForDataTypeToBeRenamed(); + await umbracoUi.waitForTimeout(500); // Wait for the rename to be fully processed expect(await umbracoApi.dataType.doesNameExist(dataTypeFolderName)).toBeTruthy(); expect(await umbracoApi.dataType.doesNameExist(wrongDataTypeFolderName)).toBeFalsy(); }); @@ -99,6 +100,7 @@ test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => { // Assert await umbracoUi.dataType.waitForDataTypeToBeCreated(); + await umbracoUi.waitForTimeout(500); // Wait for folder to be created expect(await umbracoApi.dataType.doesNameExist(childFolderName)).toBeTruthy(); const dataTypeChildren = await umbracoApi.dataType.getChildren(dataTypeFolderId); expect(dataTypeChildren[0].name).toBe(childFolderName); @@ -120,6 +122,7 @@ test('can create a folder in a folder in a folder', async ({umbracoApi, umbracoU // Assert await umbracoUi.dataType.waitForDataTypeToBeCreated(); + await umbracoUi.waitForTimeout(500); // Wait for folder to be created expect(await umbracoApi.dataType.doesNameExist(childOfChildFolderName)).toBeTruthy(); const childrenFolderData = await umbracoApi.dataType.getChildren(childFolderId); expect(childrenFolderData[0].name).toBe(childOfChildFolderName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Dashboard/Profiling.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Dashboard/Profiling.spec.ts index 7f5d864ba4..64e22f203b 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Dashboard/Profiling.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Dashboard/Profiling.spec.ts @@ -7,11 +7,11 @@ test('can update value of activate the profiler by default', async ({umbracoUi}) await umbracoUi.profiling.clickProfilingTab(); // Act + await umbracoUi.profiling.isActivateProfilerByDefaultToggleChecked(false); await umbracoUi.profiling.clickActivateProfilerByDefaultToggle(); - await umbracoUi.reloadPage(); - // TODO: We need to wait a bit to make sure the page is loaded after we have reloaded the page, otherwise it can be flaky and it might not find the toggle - await umbracoUi.waitForTimeout(500); // Assert + await umbracoUi.profiling.goToSection(ConstantHelper.sections.settings); + await umbracoUi.profiling.clickProfilingTab(); await umbracoUi.profiling.isActivateProfilerByDefaultToggleChecked(true); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeCollectionWorkspace.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeCollectionWorkspace.spec.ts index 855f93fe71..b452154a29 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeCollectionWorkspace.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeCollectionWorkspace.spec.ts @@ -172,6 +172,7 @@ test('can create a document type folder in a folder using create options', async const childFolderName = 'Test Child Folder'; await umbracoApi.documentType.ensureNameNotExists(childFolderName); await umbracoApi.documentType.createFolder(documentFolderName); + await umbracoUi.waitForTimeout(500); // Wait for folder to be created before navigating to it await umbracoUi.documentType.goToDocumentType(documentFolderName); // Act diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeFolder.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeFolder.spec.ts index 4c571df224..6cf5f21ae3 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeFolder.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeFolder.spec.ts @@ -61,6 +61,7 @@ test('can rename a document type folder', async ({umbracoApi, umbracoUi}) => { // Assert await umbracoUi.documentType.waitForDocumentTypeToBeRenamed(); + await umbracoUi.waitForTimeout(500); // Wait for the rename to be fully processed expect(await umbracoApi.documentType.doesNameExist(oldFolderName)).toBeFalsy(); expect(await umbracoApi.documentType.doesNameExist(documentFolderName)).toBeTruthy(); await umbracoUi.documentType.isDocumentTreeItemVisible(oldFolderName, false); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeFolder.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeFolder.spec.ts index fa19f68f4d..26d6fc5c95 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeFolder.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeFolder.spec.ts @@ -54,14 +54,14 @@ test('can rename a media type folder', async ({umbracoApi, umbracoUi}) => { await umbracoUi.mediaType.clickRootFolderCaretButton(); await umbracoUi.mediaType.clickActionsMenuForName(oldFolderName); await umbracoUi.mediaType.clickUpdateActionMenuOption(); - await umbracoUi.waitForTimeout(500); await umbracoUi.mediaType.enterFolderName(mediaTypeFolderName); await umbracoUi.mediaType.clickConfirmRenameButton(); // Assert await umbracoUi.mediaType.waitForMediaTypeToBeRenamed(); - const folder = await umbracoApi.mediaType.getByName(mediaTypeFolderName); - expect(folder.name).toBe(mediaTypeFolderName); + await umbracoUi.waitForTimeout(500); // Small wait to ensure the API has caught up + const folderData = await umbracoApi.mediaType.getByName(mediaTypeFolderName); + expect(folderData.name).toBe(mediaTypeFolderName); await umbracoUi.mediaType.isMediaTypeTreeItemVisible(oldFolderName, false); await umbracoUi.mediaType.isMediaTypeTreeItemVisible(mediaTypeFolderName, true); }); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/ContentStartNodes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/ContentStartNodes.spec.ts index b2445d4588..d5b7d00d10 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/ContentStartNodes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/ContentStartNodes.spec.ts @@ -1,4 +1,4 @@ -import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; const testUser = ConstantHelper.testUserCredentials; let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""}; @@ -57,7 +57,8 @@ test('can see root start node and children', async ({umbracoApi, umbracoUi}) => await umbracoUi.content.isChildContentInTreeVisible(rootDocumentName, childDocumentTwoName); }); -test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { // Arrange await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId, [childDocumentOneId]); testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/MediaStartNodes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/MediaStartNodes.spec.ts index f16608353b..07cbf792a4 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/MediaStartNodes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/MediaStartNodes.spec.ts @@ -1,4 +1,4 @@ -import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; const testUser = ConstantHelper.testUserCredentials; let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""}; @@ -50,7 +50,8 @@ test('can see root media start node and children', async ({umbracoApi, umbracoUi await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderTwoName); }); -test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { // Arrange await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId, [], false, [childFolderOneId]); testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password); @@ -62,6 +63,7 @@ test('can see parent of start node but not access it', async ({umbracoApi, umbra // Assert await umbracoUi.media.isMediaTreeItemVisible(rootFolderName); await umbracoUi.media.goToMediaWithName(rootFolderName); + await umbracoUi.waitForTimeout(500); // Wait for workspace to load await umbracoUi.media.doesMediaWorkspaceHaveText('Access denied'); await umbracoUi.media.openMediaCaretButtonForName(rootFolderName); await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderOneName); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/ContentStartNodes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/ContentStartNodes.spec.ts index 82178e73fc..aa896ed493 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/ContentStartNodes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/ContentStartNodes.spec.ts @@ -58,7 +58,8 @@ test('can see root start node and children', async ({umbracoApi, umbracoUi}) => await umbracoUi.content.isChildContentInTreeVisible(rootDocumentName, childDocumentTwoName); }); -test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithDocumentStartNode(userGroupName, childDocumentOneId); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts index 32837242d1..32a36e0e34 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts @@ -71,7 +71,8 @@ test('can read content node with permission enabled', {tag: '@release'}, async ( await umbracoUi.content.doesDocumentHaveName(rootDocumentName); }); -test('can not read content node with permission disabled', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can not read content node with permission disabled', async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermission(userGroupName, false); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); @@ -161,6 +162,7 @@ test('can empty recycle bin with delete permission enabled', {tag: '@release'}, // Act await umbracoUi.content.clickRecycleBinButton(); + await umbracoUi.waitForTimeout(700); await umbracoUi.content.clickEmptyRecycleBinButton(); await umbracoUi.content.clickConfirmEmptyRecycleBinButton(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValueGranularPermission.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValueGranularPermission.spec.ts index c479594750..9cc0085c4c 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValueGranularPermission.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValueGranularPermission.spec.ts @@ -1,5 +1,5 @@ import {expect} from '@playwright/test'; -import {AliasHelper, ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {AliasHelper, ConstantHelper, test} from '@umbraco/playwright-testhelpers'; const testUser = ConstantHelper.testUserCredentials; let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""}; @@ -35,7 +35,8 @@ test.afterEach(async ({umbracoApi}) => { await umbracoApi.userGroup.ensureNameNotExists(userGroupName); }); -test('can only see property values for specific document with read UI enabled', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can only see property values for specific document with read UI enabled', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithPermissionsForSpecificDocumentAndTwoPropertyValues(userGroupName, firstDocumentId, documentTypeId, firstPropertyName[0], true, false, secondPropertyName[0], true, false); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValuePermission.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValuePermission.spec.ts index 2e84a852d2..b8ba9b7c3f 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValuePermission.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DocumentPropertyValuePermission.spec.ts @@ -58,7 +58,8 @@ test('can see property values with UI read but not UI write permission', {tag: ' await umbracoUi.content.isPropertyEditorUiWithNameReadOnly('text-box'); }); -test('cannot open content without document read permission even with UI read permission', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('cannot open content without document read permission even with UI read permission', {tag: '@release'}, async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermissionAndReadPropertyValuePermission(userGroupName, false, true); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/GranularPermissionsInContent.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/GranularPermissionsInContent.spec.ts index bd5b2f94d1..cf67544d88 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/GranularPermissionsInContent.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/GranularPermissionsInContent.spec.ts @@ -43,6 +43,7 @@ test.beforeEach(async ({umbracoApi}) => { documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNodeAndDataType(documentTypeName, childDocumentTypeId, dataTypeName, dataTypeId); firstDocumentId = await umbracoApi.document.createDocumentWithTextContent(firstDocumentName, documentTypeId, documentText, dataTypeName); secondDocumentId = await umbracoApi.document.createDocumentWithTextContent(secondDocumentName, documentTypeId, documentText, dataTypeName); + await umbracoApi.language.createDanishLanguage(); }); test.afterEach(async ({umbracoApi}) => { @@ -54,9 +55,11 @@ test.afterEach(async ({umbracoApi}) => { await umbracoApi.documentType.ensureNameNotExists(childDocumentTypeName); await umbracoApi.documentBlueprint.ensureNameNotExists(documentBlueprintName); await umbracoApi.userGroup.ensureNameNotExists(userGroupName); + await umbracoApi.language.ensureIsoCodeNotExists('da'); }); -test('can read a specific document with read permission enabled', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can read a specific document with read permission enabled', async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithReadPermissionForSpecificDocument(userGroupName, firstDocumentId); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); @@ -254,6 +257,7 @@ test('can sort children with sort children permission enabled', async ({umbracoA test('can set culture and hostnames for a specific content with culture and hostnames permission enabled', async ({umbracoApi, umbracoUi}) => { // Arrange const domainName = '/domain'; + const languageName = 'Danish'; userGroupId = await umbracoApi.userGroup.createUserGroupWithCultureAndHostnamesPermissionForSpecificDocument(userGroupName, firstDocumentId); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); testUserCookieAndToken = await umbracoApi.user.loginToUser(testUser.name, testUser.email, testUser.password); @@ -264,16 +268,17 @@ test('can set culture and hostnames for a specific content with culture and host await umbracoUi.content.clickActionsMenuForContent(firstDocumentName); await umbracoUi.content.clickCultureAndHostnamesActionMenuOption(); await umbracoUi.content.clickAddNewDomainButton(); - await umbracoUi.content.enterDomain(domainName); + await umbracoUi.content.enterDomain(domainName, 0); + await umbracoUi.content.selectDomainLanguageOption(languageName, 0); await umbracoUi.content.clickSaveModalButton(); // Assert await umbracoUi.content.waitForDomainToBeCreated(); - await umbracoUi.waitForTimeout(500); // Wait for the domain to be set + await umbracoUi.waitForTimeout(1000); // Wait for the domain to be set const document = await umbracoApi.document.getByName(firstDocumentName); const domains = await umbracoApi.document.getDomains(document.id); expect(domains.domains[0].domainName).toEqual(domainName); - expect(domains.domains[0].isoCode).toEqual('en-US'); + expect(domains.domains[0].isoCode).toEqual('da'); await umbracoUi.content.isActionsMenuForNameVisible(secondDocumentName, false); }); @@ -322,6 +327,7 @@ test('can rollback a specific content with rollback permission enabled', async ( await umbracoUi.content.clickRollbackContainerButton(); // Assert + await umbracoUi.content.isSuccessNotificationVisible(); await umbracoUi.content.goToContentWithName(firstDocumentName); await umbracoUi.content.doesDocumentPropertyHaveValue(dataTypeName, documentText); await umbracoUi.content.isActionsMenuForNameVisible(secondDocumentName, false); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MediaStartNodes.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MediaStartNodes.spec.ts index be8b531d44..b747e3ece2 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MediaStartNodes.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MediaStartNodes.spec.ts @@ -1,4 +1,4 @@ -import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; const testUser = ConstantHelper.testUserCredentials; let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""}; @@ -50,7 +50,8 @@ test('can see root media start node and children', {tag: '@release'}, async ({um await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderTwoName); }); -test('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { +// Skip this test due to this issue: https://github.com/umbraco/Umbraco-CMS/issues/20505 +test.skip('can see parent of start node but not access it', async ({umbracoApi, umbracoUi}) => { // Arrange userGroupId = await umbracoApi.userGroup.createUserGroupWithMediaStartNode(userGroupName, childFolderOneId); await umbracoApi.user.setUserPermissions(testUser.name, testUser.email, testUser.password, userGroupId); @@ -63,6 +64,7 @@ test('can see parent of start node but not access it', async ({umbracoApi, umbra // Assert await umbracoUi.media.isMediaTreeItemVisible(rootFolderName); await umbracoUi.media.goToMediaWithName(rootFolderName); + await umbracoUi.waitForTimeout(500); // Wait for workspace to load await umbracoUi.media.doesMediaWorkspaceHaveText('Access denied'); await umbracoUi.media.openMediaCaretButtonForName(rootFolderName); await umbracoUi.media.isChildMediaVisible(rootFolderName, childFolderOneName);