@umbraco/playwright-testhelpers 16.0.51 → 16.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/helpers/ContentUiHelper.d.ts +6 -0
- package/dist/lib/helpers/ContentUiHelper.js +29 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +1 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +13 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +1 -0
- package/dist/lib/helpers/UiBaseLocators.js +3 -0
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -170,6 +170,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
170
170
|
private readonly treePickerSearchTxt;
|
|
171
171
|
private readonly mediaPickerSearchTxt;
|
|
172
172
|
private readonly memberPickerSearchTxt;
|
|
173
|
+
private readonly refListBlock;
|
|
174
|
+
private readonly propertyActionMenu;
|
|
173
175
|
constructor(page: Page);
|
|
174
176
|
enterContentName(name: string): Promise<void>;
|
|
175
177
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -429,4 +431,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
429
431
|
enterSearchKeywordInMediaPickerModal(keyword: string): Promise<void>;
|
|
430
432
|
enterSearchKeywordInMemberPickerModal(keyword: string): Promise<void>;
|
|
431
433
|
isContentNameReadOnly(): Promise<void>;
|
|
434
|
+
isBlockCustomViewVisible(blockCustomViewLocator: string, isVisible?: boolean): Promise<void>;
|
|
435
|
+
isSingleBlockElementVisible(isVisible?: boolean): Promise<void>;
|
|
436
|
+
doesBlockCustomViewHaveValue(customBlockViewLocator: string, valueText: string): Promise<void>;
|
|
437
|
+
clickPropertyActionWithName(name: string): Promise<void>;
|
|
432
438
|
}
|
|
@@ -174,6 +174,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
174
174
|
treePickerSearchTxt;
|
|
175
175
|
mediaPickerSearchTxt;
|
|
176
176
|
memberPickerSearchTxt;
|
|
177
|
+
refListBlock;
|
|
178
|
+
propertyActionMenu;
|
|
177
179
|
constructor(page) {
|
|
178
180
|
super(page);
|
|
179
181
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -311,6 +313,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
311
313
|
this.blockGridAreasContainer = page.locator('umb-block-grid-areas-container');
|
|
312
314
|
this.blockGridEntries = page.locator('umb-block-grid-entries');
|
|
313
315
|
this.inlineCreateBtn = page.locator('uui-button-inline-create');
|
|
316
|
+
this.refListBlock = page.locator('umb-ref-list-block');
|
|
314
317
|
// TipTap
|
|
315
318
|
this.tipTapPropertyEditor = page.locator('umb-property-editor-ui-tiptap');
|
|
316
319
|
this.tipTapEditor = this.tipTapPropertyEditor.locator('#editor .tiptap');
|
|
@@ -353,6 +356,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
353
356
|
this.treePickerSearchTxt = this.page.locator('umb-tree-picker-modal #input');
|
|
354
357
|
this.mediaPickerSearchTxt = this.page.locator('umb-media-picker-modal #search #input');
|
|
355
358
|
this.memberPickerSearchTxt = this.page.locator('umb-member-picker-modal #input');
|
|
359
|
+
// Property Actions
|
|
360
|
+
this.propertyActionMenu = page.locator('#property-action-popover umb-popover-layout');
|
|
356
361
|
}
|
|
357
362
|
async enterContentName(name) {
|
|
358
363
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -1456,6 +1461,30 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1456
1461
|
async isContentNameReadOnly() {
|
|
1457
1462
|
await (0, test_1.expect)(this.contentNameTxt).toHaveAttribute('readonly');
|
|
1458
1463
|
}
|
|
1464
|
+
// Block Custom View
|
|
1465
|
+
async isBlockCustomViewVisible(blockCustomViewLocator, isVisible = true) {
|
|
1466
|
+
await (0, test_1.expect)(this.page.locator(blockCustomViewLocator)).toBeVisible({ visible: isVisible });
|
|
1467
|
+
}
|
|
1468
|
+
async isSingleBlockElementVisible(isVisible = true) {
|
|
1469
|
+
const count = await this.refListBlock.count();
|
|
1470
|
+
if (isVisible) {
|
|
1471
|
+
(0, test_1.expect)(count, `Expected only one element, but found ${count}`).toBe(1);
|
|
1472
|
+
}
|
|
1473
|
+
else {
|
|
1474
|
+
(0, test_1.expect)(count, `Expected only one element, but found ${count}`).toBe(0);
|
|
1475
|
+
}
|
|
1476
|
+
await (0, test_1.expect)(this.refListBlock).toBeVisible({ visible: isVisible });
|
|
1477
|
+
}
|
|
1478
|
+
async doesBlockCustomViewHaveValue(customBlockViewLocator, valueText) {
|
|
1479
|
+
const locator = this.page.locator(`${customBlockViewLocator} p`);
|
|
1480
|
+
await (0, test_1.expect)(locator).toBeVisible();
|
|
1481
|
+
await (0, test_1.expect)(locator).toHaveText(valueText);
|
|
1482
|
+
}
|
|
1483
|
+
async clickPropertyActionWithName(name) {
|
|
1484
|
+
const actionLocator = this.propertyActionMenu.locator('umb-property-action uui-menu-item[label="' + name + '"]');
|
|
1485
|
+
await (0, test_1.expect)(actionLocator).toBeVisible();
|
|
1486
|
+
await actionLocator.click();
|
|
1487
|
+
}
|
|
1459
1488
|
}
|
|
1460
1489
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1461
1490
|
//# sourceMappingURL=ContentUiHelper.js.map
|