From 7ce62a0f4c7c899f898e8aa0fabf99e36bfd7f5e Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 13:22:27 +0700 Subject: [PATCH 1/5] =?UTF-8?q?Updated=20block=20list=20tests=20as=20the?= =?UTF-8?q?=20=E2=80=9CAdd=20Block=E2=80=9D=20button=20is=20hidden=20after?= =?UTF-8?q?=20reaching=20the=20maximum=20limit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/BlockList/ContentWithBlockList.spec.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 398d6aead1f8..f09d94b16152 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 @@ -147,13 +147,9 @@ test('cannot add number of block element greater than the maximum amount', async await umbracoUi.content.clickBlockElementWithName(elementTypeName); await umbracoUi.content.enterTextstring(inputText); await umbracoUi.content.clickCreateModalButton(); - await umbracoUi.content.clickAddBlockElementButton(); - await umbracoUi.content.clickTextButtonWithName(elementTypeName); - await umbracoUi.content.enterTextstring(inputText); - await umbracoUi.content.clickCreateModalButton(); // Assert - await umbracoUi.content.doesFormValidationMessageContainText('Maximum 1 entries, you have entered 1 too many.'); + await umbracoUi.content.isAddBlockElementButtonVisible(false); }); test('can set the label of block element in the content', async ({umbracoApi, umbracoUi}) => { From f66c61ac458ad9f66a6c7c122d9e030a60898cc2 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 13:22:59 +0700 Subject: [PATCH 2/5] Updated validation option due to UI changes --- .../Settings/DocumentType/DocumentTypeDesignTab.spec.ts | 2 +- .../DefaultConfig/Settings/MediaType/MediaTypeDesignTab.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts index d8762287aa01..28a8e0fc5558 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts @@ -384,7 +384,7 @@ test('can enable validation for a property in a document type', {tag: '@release' // Act await umbracoUi.documentType.goToDocumentType(documentTypeName); await umbracoUi.documentType.clickEditorSettingsButton(); - await umbracoUi.documentType.selectValidationOption(''); + await umbracoUi.documentType.selectValidationOption('.+'); await umbracoUi.documentType.enterRegEx(regex); await umbracoUi.documentType.enterRegExMessage(regexMessage); await umbracoUi.documentType.clickSubmitButton(); diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeDesignTab.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeDesignTab.spec.ts index 62931cf7b214..6022b0f5cca4 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeDesignTab.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeDesignTab.spec.ts @@ -137,7 +137,7 @@ test('can set up validation for a property in a media type', {tag: '@release'}, // Act await umbracoUi.mediaType.goToMediaType(mediaTypeName); await umbracoUi.mediaType.clickEditorSettingsButton(); - await umbracoUi.mediaType.selectValidationOption(''); + await umbracoUi.mediaType.selectValidationOption('.+'); await umbracoUi.mediaType.enterRegEx(regex); await umbracoUi.mediaType.enterRegExMessage(regexMessage); await umbracoUi.mediaType.clickSubmitButton(); From 59b0876773363adabf44d5e3e626606c7d780f8f Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 13:23:46 +0700 Subject: [PATCH 3/5] Updated tests for current user profile as waitForNetworkToBeIdle() is removed --- .../tests/DefaultConfig/Users/CurrentUserProfile.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/CurrentUserProfile.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/CurrentUserProfile.spec.ts index 6d9faa40899a..642cf92ec5ca 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/CurrentUserProfile.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/CurrentUserProfile.spec.ts @@ -1,4 +1,4 @@ -import {NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; +import {ConstantHelper, NotificationConstantHelper, test} from '@umbraco/playwright-testhelpers'; const userPassword = '0123456789'; let testUserCookieAndToken = {cookie: "", accessToken: "", refreshToken: ""}; @@ -21,7 +21,7 @@ for (const userGroup of userGroups) { await umbracoApi.user.updatePassword(userId, userPassword); testUserCookieAndToken = await umbracoApi.user.loginToUser(userName, userEmail, userPassword); await umbracoUi.goToBackOffice(); - await umbracoUi.currentUserProfile.waitForNetworkToBeIdle(); + await umbracoUi.currentUserProfile.goToSection(ConstantHelper.sections.users); // Act await umbracoUi.currentUserProfile.clickCurrentUserAvatarButton(); From 173814110ae093a98832e408d586c17c61f22af6 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 13:23:55 +0700 Subject: [PATCH 4/5] Fixed flaky tests --- .../tests/DefaultConfig/Dictionary/Dictionary.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts index f77000d4e9a0..7874c9eb683c 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts +++ b/tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts @@ -46,12 +46,12 @@ test('can delete a dictionary item', async ({umbracoApi, umbracoUi}) => { // Assert await umbracoUi.dictionary.waitForDictionaryToBeDeleted(); await umbracoUi.dictionary.isErrorNotificationVisible(false); - expect(await umbracoApi.dictionary.doesNameExist(dictionaryName)).toBeFalsy(); // Verify the dictionary item does not display in the tree await umbracoUi.dictionary.isDictionaryTreeItemVisible(dictionaryName, false); // Verify the dictionary item does not display in the list await umbracoUi.reloadPage(); await umbracoUi.dictionary.doesDictionaryCollectionContainText('No items'); + expect(await umbracoApi.dictionary.doesNameExist(dictionaryName)).toBeFalsy(); }); test('can create a dictionary item in a dictionary', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => { From b37b80fd097e6d85c008ba8dab03289978418670 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 15:51:56 +0700 Subject: [PATCH 5/5] Bumped version --- tests/Umbraco.Tests.AcceptanceTest/package-lock.json | 8 ++++---- tests/Umbraco.Tests.AcceptanceTest/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index 509985c5b118..9ccb41df2012 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.42", - "@umbraco/playwright-testhelpers": "^17.0.6", + "@umbraco/playwright-testhelpers": "^17.0.7", "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.6", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.6.tgz", - "integrity": "sha512-M0e5HJCqSTDxORFhebaNNGzBB4v6+77MerK6ctG1f+bU3JHfmbGZr4A4HDkD9eAeU7WGu5q7xoASdI0J1wqb1w==", + "version": "17.0.7", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-17.0.7.tgz", + "integrity": "sha512-GIkzigK1m11BhjFV83BP/1Ry+u3lHIuUM0evX2SLSp1Cqv0qd4i632D0NDsusAwmuwA2t5QVEXDfr/+zQj3sZA==", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.42", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 7528914b7dc9..eba35eb50761 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@umbraco/json-models-builders": "^2.0.42", - "@umbraco/playwright-testhelpers": "^17.0.6", + "@umbraco/playwright-testhelpers": "^17.0.7", "camelize": "^1.0.0", "dotenv": "^16.3.1", "node-fetch": "^2.6.7"