Skip to content

Commit 8d6d118

Browse files
authored
Updated test helper for the .fixme() tests (#332)
* Added locators to wait for upload file complete * Updated api helper for creating user group with specific permission * Added ui helper to verify backoffice main visible or not * Bumped version
1 parent b478429 commit 8d6d118

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

lib/helpers/UiBaseLocators.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,12 @@ export class UiBaseLocators {
153153
public readonly openedModal: Locator;
154154
public readonly uiLoader: Locator;
155155
public readonly createDocumentBlueprintModal: Locator;
156+
public readonly inputDropzone: Locator;
157+
public readonly imageCropperField: Locator;
158+
public readonly inputUploadField: Locator;
156159
public readonly entityItem: Locator;
157160
public readonly sectionLinks: Locator;
161+
public readonly backOfficeMain: Locator;
158162

159163
constructor(page: Page) {
160164
this.page = page;
@@ -312,7 +316,11 @@ export class UiBaseLocators {
312316
this.monacoEditor = page.locator('.monaco-editor');
313317
this.openedModal = page.locator('uui-modal-container[backdrop]');
314318
this.uiLoader = page.locator('uui-loader');
319+
this.inputDropzone = page.locator('umb-input-dropzone');
320+
this.imageCropperField = page.locator('umb-image-cropper-field');
321+
this.inputUploadField = page.locator('umb-input-upload-field').locator('#wrapperInner');
315322
this.entityItem = page.locator('umb-entity-item-ref');
323+
this.backOfficeMain = page.locator('umb-backoffice-main');
316324
}
317325

318326
async clickActionsMenuForNameInSectionSidebar(name: string) {
@@ -1443,4 +1451,20 @@ export class UiBaseLocators {
14431451
async isWorkspaceViewTabWithAliasVisible(alias: string, isVisible: boolean = true) {
14441452
await expect(this.page.getByTestId('workspace:view-link:' + alias)).toBeVisible({visible: isVisible});
14451453
}
1454+
1455+
async isInputDropzoneVisible(isVisible: boolean = true) {
1456+
await expect(this.inputDropzone).toBeVisible({visible: isVisible});
1457+
}
1458+
1459+
async isImageCropperFieldVisible(isVisible: boolean = true) {
1460+
await expect(this.imageCropperField).toBeVisible({visible: isVisible});
1461+
}
1462+
1463+
async isInputUploadFieldVisible(isVisible: boolean = true) {
1464+
await expect(this.inputUploadField).toBeVisible({visible: isVisible});
1465+
}
1466+
1467+
async isBackOfficeMainVisible(isVisible: boolean = true) {
1468+
await expect(this.backOfficeMain).toBeVisible({visible: isVisible});
1469+
}
14461470
}

lib/helpers/UserGroupApiHelper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ export class UserGroupApiHelper {
399399
.withDocumentRootAccess(true)
400400
.addFallbackPermission()
401401
.withDuplicatePermission(enabled)
402+
.withCreatePermission(enabled)
402403
.withReadPermission(true)
403404
.done()
404405
.build();
@@ -415,6 +416,7 @@ export class UserGroupApiHelper {
415416
.withDocumentRootAccess(true)
416417
.addFallbackPermission()
417418
.withMoveToPermission(enabled)
419+
.withCreatePermission(enabled)
418420
.withReadPermission(true)
419421
.done()
420422
.build();

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@umbraco/playwright-testhelpers",
3-
"version": "17.0.9",
3+
"version": "17.0.10",
44
"description": "Test helpers for making playwright tests for Umbraco solutions",
55
"main": "dist/lib/index.js",
66
"files": [

0 commit comments

Comments
 (0)