From 6165048101d57c6aeec4ca8975c72ffb680982de Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Fri, 7 Nov 2025 12:43:49 +0700 Subject: [PATCH 1/4] Replace waitForNetworkToBeIdle to waitForLoadState --- lib/helpers/ContentUiHelper.ts | 18 +++++++++--------- lib/helpers/DataTypeUiHelper.ts | 6 +++--- lib/helpers/DictionaryUiHelper.ts | 6 +++--- lib/helpers/DocumentBlueprintUiHelper.ts | 4 ++-- lib/helpers/DocumentTypeUiHelper.ts | 6 +++--- lib/helpers/LanguageUiHelper.ts | 4 ++-- lib/helpers/MediaTypeUiHelper.ts | 6 +++--- lib/helpers/MediaUiHelper.ts | 8 ++++---- lib/helpers/MemberGroupUiHelper.ts | 4 ++-- lib/helpers/MemberUiHelper.ts | 4 ++-- lib/helpers/PartialViewUiHelper.ts | 6 +++--- lib/helpers/ScriptUiHelper.ts | 6 +++--- lib/helpers/StylesheetUiHelper.ts | 6 +++--- lib/helpers/TemplateUiHelper.ts | 6 +++--- lib/helpers/UserGroupUiHelper.ts | 6 +++--- lib/helpers/UserUiHelper.ts | 6 +++--- 16 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lib/helpers/ContentUiHelper.ts b/lib/helpers/ContentUiHelper.ts index 2f965cea..3dfc7221 100644 --- a/lib/helpers/ContentUiHelper.ts +++ b/lib/helpers/ContentUiHelper.ts @@ -496,31 +496,31 @@ export class ContentUiHelper extends UiBaseLocators { } async waitForContentToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForContentToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForContentToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDomainToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDomainToBeUpdated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDomainToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForContentToBeTrashed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clickDocumentTypeByName(documentTypeName: string) { @@ -1670,11 +1670,11 @@ export class ContentUiHelper extends UiBaseLocators { } async waitForContentToBePublished() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForRecycleBinToBeEmptied() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clearTipTapEditor() { diff --git a/lib/helpers/DataTypeUiHelper.ts b/lib/helpers/DataTypeUiHelper.ts index e2069c52..a3615400 100644 --- a/lib/helpers/DataTypeUiHelper.ts +++ b/lib/helpers/DataTypeUiHelper.ts @@ -355,7 +355,7 @@ export class DataTypeUiHelper extends UiBaseLocators { } async waitForDataTypeToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async isDataTypeTreeItemVisible(name: string, isVisible: boolean = true) { @@ -371,11 +371,11 @@ export class DataTypeUiHelper extends UiBaseLocators { } async waitForDataTypeToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDataTypeToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clickNewDataTypeButton() { diff --git a/lib/helpers/DictionaryUiHelper.ts b/lib/helpers/DictionaryUiHelper.ts index 87840da3..1ba597e1 100644 --- a/lib/helpers/DictionaryUiHelper.ts +++ b/lib/helpers/DictionaryUiHelper.ts @@ -65,15 +65,15 @@ export class DictionaryUiHelper extends UiBaseLocators { } async waitForDictionaryToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDictionaryToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDictionaryToBeImported() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async deleteDictionary() { diff --git a/lib/helpers/DocumentBlueprintUiHelper.ts b/lib/helpers/DocumentBlueprintUiHelper.ts index df779594..6822b374 100644 --- a/lib/helpers/DocumentBlueprintUiHelper.ts +++ b/lib/helpers/DocumentBlueprintUiHelper.ts @@ -27,11 +27,11 @@ export class DocumentBlueprintUiHelper extends UiBaseLocators{ } async waitForDocumentBlueprintToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDocumentBlueprintToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async reloadDocumentBlueprintsTree() { diff --git a/lib/helpers/DocumentTypeUiHelper.ts b/lib/helpers/DocumentTypeUiHelper.ts index 5fb67b95..a5d1ebe8 100644 --- a/lib/helpers/DocumentTypeUiHelper.ts +++ b/lib/helpers/DocumentTypeUiHelper.ts @@ -90,15 +90,15 @@ export class DocumentTypeUiHelper extends UiBaseLocators { } async waitForDocumentTypeToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDocumentTypeToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForDocumentTypeToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async enterDocumentTypeName(documentTypeName: string) { diff --git a/lib/helpers/LanguageUiHelper.ts b/lib/helpers/LanguageUiHelper.ts index ce2f2995..5b544a06 100644 --- a/lib/helpers/LanguageUiHelper.ts +++ b/lib/helpers/LanguageUiHelper.ts @@ -42,11 +42,11 @@ export class LanguageUiHelper extends UiBaseLocators { } async waitForLanguageToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForLanguageToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async removeFallbackLanguageByIsoCode(isoCode: string) { diff --git a/lib/helpers/MediaTypeUiHelper.ts b/lib/helpers/MediaTypeUiHelper.ts index 6c082c21..b146a1fd 100644 --- a/lib/helpers/MediaTypeUiHelper.ts +++ b/lib/helpers/MediaTypeUiHelper.ts @@ -46,15 +46,15 @@ export class MediaTypeUiHelper extends UiBaseLocators { } async waitForMediaTypeToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMediaTypeToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMediaTypeToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } diff --git a/lib/helpers/MediaUiHelper.ts b/lib/helpers/MediaUiHelper.ts index 6cad4761..b076a3d5 100644 --- a/lib/helpers/MediaUiHelper.ts +++ b/lib/helpers/MediaUiHelper.ts @@ -91,19 +91,19 @@ export class MediaUiHelper extends UiBaseLocators { } async waitForMediaToBeTrashed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForRecycleBinToBeEmptied() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMediaToBeMoved() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMediaItemToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async deleteMediaItem(name: string) { diff --git a/lib/helpers/MemberGroupUiHelper.ts b/lib/helpers/MemberGroupUiHelper.ts index 9a598a3f..1feb80b1 100644 --- a/lib/helpers/MemberGroupUiHelper.ts +++ b/lib/helpers/MemberGroupUiHelper.ts @@ -59,11 +59,11 @@ export class MemberGroupUiHelper extends UiBaseLocators { } async waitForMemberGroupToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMemberGroupToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async goToMemberGroups() { diff --git a/lib/helpers/MemberUiHelper.ts b/lib/helpers/MemberUiHelper.ts index 92aa38b0..d3725dfc 100644 --- a/lib/helpers/MemberUiHelper.ts +++ b/lib/helpers/MemberUiHelper.ts @@ -155,11 +155,11 @@ export class MemberUiHelper extends UiBaseLocators { } async waitForMemberToBeCreated(){ - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForMemberToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async goToMembers() { diff --git a/lib/helpers/PartialViewUiHelper.ts b/lib/helpers/PartialViewUiHelper.ts index 9848bd87..fbd115b3 100644 --- a/lib/helpers/PartialViewUiHelper.ts +++ b/lib/helpers/PartialViewUiHelper.ts @@ -32,15 +32,15 @@ export class PartialViewUiHelper extends UiBaseLocators { } async waitForPartialViewToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForPartialViewToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForPartialViewToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clickNewEmptyPartialViewButton() { diff --git a/lib/helpers/ScriptUiHelper.ts b/lib/helpers/ScriptUiHelper.ts index 0825df1f..425f9233 100644 --- a/lib/helpers/ScriptUiHelper.ts +++ b/lib/helpers/ScriptUiHelper.ts @@ -42,15 +42,15 @@ export class ScriptUiHelper extends UiBaseLocators{ } async waitForScriptToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForScriptToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForScriptToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } // Will only work for root scripts diff --git a/lib/helpers/StylesheetUiHelper.ts b/lib/helpers/StylesheetUiHelper.ts index 89f27a72..188f6cd0 100644 --- a/lib/helpers/StylesheetUiHelper.ts +++ b/lib/helpers/StylesheetUiHelper.ts @@ -48,15 +48,15 @@ export class StylesheetUiHelper extends UiBaseLocators{ } async waitForStylesheetToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForStylesheetToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForStylesheetToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async enterStylesheetName(stylesheetName: string) { diff --git a/lib/helpers/TemplateUiHelper.ts b/lib/helpers/TemplateUiHelper.ts index 4054e105..3b6cdd61 100644 --- a/lib/helpers/TemplateUiHelper.ts +++ b/lib/helpers/TemplateUiHelper.ts @@ -31,15 +31,15 @@ export class TemplateUiHelper extends UiBaseLocators { } async waitForTemplateToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForTemplateToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForTemplateToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async goToTemplate(templateName: string, childTemplateName: string = '') { diff --git a/lib/helpers/UserGroupUiHelper.ts b/lib/helpers/UserGroupUiHelper.ts index 6fab4739..38a78eaf 100644 --- a/lib/helpers/UserGroupUiHelper.ts +++ b/lib/helpers/UserGroupUiHelper.ts @@ -78,15 +78,15 @@ export class UserGroupUiHelper extends UiBaseLocators { } async waitForUserGroupToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForUserGroupToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForUserGroupToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clickCreateUserGroupButton() { diff --git a/lib/helpers/UserUiHelper.ts b/lib/helpers/UserUiHelper.ts index b5227271..d00dabfa 100644 --- a/lib/helpers/UserUiHelper.ts +++ b/lib/helpers/UserUiHelper.ts @@ -92,15 +92,15 @@ export class UserUiHelper extends UiBaseLocators { } async waitForUserToBeCreated() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForUserToBeDeleted() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async waitForUserToBeRenamed() { - await this.waitForNetworkToBeIdle(); + await this.page.waitForLoadState(); } async clickAddUserGroupsButton() { From 20f7761c1ee316679d1e5c0dd7aa3634c08896cd Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Fri, 7 Nov 2025 12:44:29 +0700 Subject: [PATCH 2/4] Bumped version of playwright --- package-lock.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 260a9bff..43d4c138 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,20 +13,20 @@ "node-fetch": "^2.6.7" }, "devDependencies": { - "@playwright/test": "^1.50", + "@playwright/test": "^1.56", "@types/node": "^20.9.0", "tslib": "^2.4.0", "typescript": "^4.8.3" } }, "node_modules/@playwright/test": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.1.tgz", - "integrity": "sha512-Jii3aBg+CEDpgnuDxEp/h7BimHcUTDlpEtce89xEumlJ5ef2hqepZ+PWp1DDpYC/VO9fmWVI1IlEaoI5fK9FXQ==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz", + "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.50.1" + "playwright": "1.56.1" }, "bin": { "playwright": "cli.js" @@ -96,13 +96,13 @@ } }, "node_modules/playwright": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", - "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.50.1" + "playwright-core": "1.56.1" }, "bin": { "playwright": "cli.js" @@ -115,9 +115,9 @@ } }, "node_modules/playwright-core": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", - "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -174,12 +174,12 @@ }, "dependencies": { "@playwright/test": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.1.tgz", - "integrity": "sha512-Jii3aBg+CEDpgnuDxEp/h7BimHcUTDlpEtce89xEumlJ5ef2hqepZ+PWp1DDpYC/VO9fmWVI1IlEaoI5fK9FXQ==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz", + "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", "dev": true, "requires": { - "playwright": "1.50.1" + "playwright": "1.56.1" } }, "@types/node": { @@ -220,19 +220,19 @@ } }, "playwright": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", - "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.50.1" + "playwright-core": "1.56.1" } }, "playwright-core": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", - "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", "dev": true }, "tr46": { From 588c2b585a5be94621b48c425ff0666162cc72c1 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Fri, 7 Nov 2025 12:44:57 +0700 Subject: [PATCH 3/4] Bumped version of playwright --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 17c552c1..a5d5a0b4 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "author": "Umbraco", "license": "MIT", "devDependencies": { - "@playwright/test": "^1.50", + "@playwright/test": "^1.56", "@types/node": "^20.9.0", "tslib": "^2.4.0", "typescript": "^4.8.3" From 3e18263a7bf50d26130bff4361c36f26064c9dbd Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Fri, 7 Nov 2025 12:45:49 +0700 Subject: [PATCH 4/4] Bumped version of test helper --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d8cb158..25b8307c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.5", + "version": "17.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.5", + "version": "17.0.6", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.42", diff --git a/package.json b/package.json index 05fb9f2c..58be9f16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.5", + "version": "17.0.6", "description": "Test helpers for making playwright tests for Umbraco solutions", "main": "dist/lib/index.js", "files": [