From 2b70863e5184116587a2e4204788ebfa5e5d0df3 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Thu, 13 Nov 2025 15:09:48 +0700 Subject: [PATCH 1/4] Added locators to wait for upload file complete --- lib/helpers/UiBaseLocators.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/helpers/UiBaseLocators.ts b/lib/helpers/UiBaseLocators.ts index 790d76e..f4b084e 100644 --- a/lib/helpers/UiBaseLocators.ts +++ b/lib/helpers/UiBaseLocators.ts @@ -153,6 +153,9 @@ export class UiBaseLocators { public readonly openedModal: Locator; public readonly uiLoader: Locator; public readonly createDocumentBlueprintModal: Locator; + public readonly inputDropzone: Locator; + public readonly imageCropperField: Locator; + public readonly inputUploadField: Locator; constructor(page: Page) { this.page = page; @@ -309,6 +312,9 @@ export class UiBaseLocators { this.monacoEditor = page.locator('.monaco-editor'); this.openedModal = page.locator('uui-modal-container[backdrop]'); this.uiLoader = page.locator('uui-loader'); + this.inputDropzone = page.locator('umb-input-dropzone'); + this.imageCropperField = page.locator('umb-image-cropper-field'); + this.inputUploadField = page.locator('umb-input-upload-field').locator('#wrapperInner'); } async clickActionsMenuForNameInSectionSidebar(name: string) { @@ -1430,4 +1436,16 @@ export class UiBaseLocators { async isWorkspaceViewTabWithAliasVisible(alias: string, isVisible: boolean = true) { await expect(this.page.getByTestId('workspace:view-link:' + alias)).toBeVisible({ visible: isVisible }); } + + async isInputDropzoneVisible(isVisible: boolean = true) { + await expect(this.inputDropzone).toBeVisible({visible: isVisible}); + } + + async isImageCropperFieldVisible(isVisible: boolean = true) { + await expect(this.imageCropperField).toBeVisible({visible: isVisible}); + } + + async isInputUploadFieldVisible(isVisible: boolean = true) { + await expect(this.inputUploadField).toBeVisible({visible: isVisible}); + } } From d8b2b4acb792540683a31f8672c29e8c0dc8cec4 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Tue, 18 Nov 2025 17:52:25 +0700 Subject: [PATCH 2/4] Updated api helper for creating user group with specific permission --- lib/helpers/UserGroupApiHelper.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/helpers/UserGroupApiHelper.ts b/lib/helpers/UserGroupApiHelper.ts index 6ea6dca..f8dc57c 100644 --- a/lib/helpers/UserGroupApiHelper.ts +++ b/lib/helpers/UserGroupApiHelper.ts @@ -399,6 +399,7 @@ export class UserGroupApiHelper { .withDocumentRootAccess(true) .addFallbackPermission() .withDuplicatePermission(enabled) + .withCreatePermission(enabled) .withReadPermission(true) .done() .build(); @@ -415,6 +416,7 @@ export class UserGroupApiHelper { .withDocumentRootAccess(true) .addFallbackPermission() .withMoveToPermission(enabled) + .withCreatePermission(enabled) .withReadPermission(true) .done() .build(); From 50e50abcdca3877dbeeb9791526d8e835ac9e6f0 Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Tue, 18 Nov 2025 17:52:47 +0700 Subject: [PATCH 3/4] Added ui helper to verify backoffice main visible or not --- lib/helpers/UiBaseLocators.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/helpers/UiBaseLocators.ts b/lib/helpers/UiBaseLocators.ts index 6529577..be4b8c8 100644 --- a/lib/helpers/UiBaseLocators.ts +++ b/lib/helpers/UiBaseLocators.ts @@ -158,6 +158,7 @@ export class UiBaseLocators { public readonly inputUploadField: Locator; public readonly entityItem: Locator; public readonly sectionLinks: Locator; + public readonly backOfficeMain: Locator; constructor(page: Page) { this.page = page; @@ -319,6 +320,7 @@ export class UiBaseLocators { this.imageCropperField = page.locator('umb-image-cropper-field'); this.inputUploadField = page.locator('umb-input-upload-field').locator('#wrapperInner'); this.entityItem = page.locator('umb-entity-item-ref'); + this.backOfficeMain = page.locator('umb-backoffice-main'); } async clickActionsMenuForNameInSectionSidebar(name: string) { @@ -1461,4 +1463,8 @@ export class UiBaseLocators { async isInputUploadFieldVisible(isVisible: boolean = true) { await expect(this.inputUploadField).toBeVisible({visible: isVisible}); } + + async isBackOfficeMainVisible(isVisible: boolean = true) { + await expect(this.backOfficeMain).toBeVisible({visible: isVisible}); + } } From 55a0dfa8a2a68432b5b1262a919c7a24a3d00beb Mon Sep 17 00:00:00 2001 From: Nhu Dinh Date: Tue, 18 Nov 2025 17:53:21 +0700 Subject: [PATCH 4/4] Bumped version --- 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 6cd558c..c4e7947 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.9", + "version": "17.0.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.9", + "version": "17.0.10", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.42", diff --git a/package.json b/package.json index 9c3dd35..e6a28a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@umbraco/playwright-testhelpers", - "version": "17.0.9", + "version": "17.0.10", "description": "Test helpers for making playwright tests for Umbraco solutions", "main": "dist/lib/index.js", "files": [