@umbraco/playwright-testhelpers 17.0.0-beta.8 → 17.0.2
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 +10 -0
- package/dist/lib/helpers/ContentUiHelper.js +42 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +2 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +37 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +3 -3
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +0 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +4 -6
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.d.ts +0 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +3 -5
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.d.ts +0 -1
- package/dist/lib/helpers/ScriptUiHelper.js +2 -4
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.d.ts +0 -3
- package/dist/lib/helpers/StylesheetUiHelper.js +2 -10
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +2 -2
- package/dist/lib/helpers/UiBaseLocators.js +13 -6
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -168,6 +168,9 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
168
168
|
private readonly mediaPickerSearchTxt;
|
|
169
169
|
private readonly memberPickerSearchTxt;
|
|
170
170
|
private readonly documentCreateOptionsModal;
|
|
171
|
+
private readonly refListBlock;
|
|
172
|
+
private readonly propertyActionMenu;
|
|
173
|
+
private readonly listViewCustomRows;
|
|
171
174
|
constructor(page: Page);
|
|
172
175
|
enterContentName(name: string): Promise<void>;
|
|
173
176
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -427,7 +430,14 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
427
430
|
enterSearchKeywordInMediaPickerModal(keyword: string): Promise<void>;
|
|
428
431
|
enterSearchKeywordInMemberPickerModal(keyword: string): Promise<void>;
|
|
429
432
|
isContentNameReadOnly(): Promise<void>;
|
|
433
|
+
isBlockCustomViewVisible(blockCustomViewLocator: string, isVisible?: boolean): Promise<void>;
|
|
434
|
+
isSingleBlockElementVisible(isVisible?: boolean): Promise<void>;
|
|
435
|
+
doesBlockCustomViewHaveValue(customBlockViewLocator: string, valueText: string): Promise<void>;
|
|
436
|
+
clickPropertyActionWithName(name: string): Promise<void>;
|
|
430
437
|
isContentWithNameVisibleInList(contentName: string, isVisible?: boolean): Promise<void>;
|
|
431
438
|
selectDocumentBlueprintWithName(blueprintName: string): Promise<void>;
|
|
432
439
|
doesDocumentModalHaveText(text: string): Promise<void>;
|
|
440
|
+
doesListViewItemsHaveCount(pageSize: number): Promise<void>;
|
|
441
|
+
isListViewItemWithNameVisible(itemName: string, index?: number): Promise<void>;
|
|
442
|
+
clickPaginationNextButton(): Promise<void>;
|
|
433
443
|
}
|
|
@@ -172,6 +172,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
172
172
|
mediaPickerSearchTxt;
|
|
173
173
|
memberPickerSearchTxt;
|
|
174
174
|
documentCreateOptionsModal;
|
|
175
|
+
refListBlock;
|
|
176
|
+
propertyActionMenu;
|
|
177
|
+
listViewCustomRows;
|
|
175
178
|
constructor(page) {
|
|
176
179
|
super(page);
|
|
177
180
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -307,6 +310,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
307
310
|
this.blockGridAreasContainer = page.locator('umb-block-grid-areas-container');
|
|
308
311
|
this.blockGridEntries = page.locator('umb-block-grid-entries');
|
|
309
312
|
this.inlineCreateBtn = page.locator('uui-button-inline-create');
|
|
313
|
+
this.refListBlock = page.locator('umb-ref-list-block');
|
|
310
314
|
// TipTap
|
|
311
315
|
this.tipTapPropertyEditor = page.locator('umb-property-editor-ui-tiptap');
|
|
312
316
|
this.tipTapEditor = this.tipTapPropertyEditor.locator('#editor .tiptap');
|
|
@@ -349,6 +353,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
349
353
|
this.treePickerSearchTxt = this.page.locator('umb-tree-picker-modal #input');
|
|
350
354
|
this.mediaPickerSearchTxt = this.page.locator('umb-media-picker-modal #search #input');
|
|
351
355
|
this.memberPickerSearchTxt = this.page.locator('umb-member-picker-modal #input');
|
|
356
|
+
// Property Actions
|
|
357
|
+
this.propertyActionMenu = page.locator('#property-action-popover umb-popover-layout');
|
|
358
|
+
// List view custom
|
|
359
|
+
this.listViewCustomRows = page.locator('table tbody tr');
|
|
352
360
|
}
|
|
353
361
|
async enterContentName(name) {
|
|
354
362
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -1450,6 +1458,30 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1450
1458
|
async isContentNameReadOnly() {
|
|
1451
1459
|
await (0, test_1.expect)(this.contentNameTxt).toHaveAttribute('readonly');
|
|
1452
1460
|
}
|
|
1461
|
+
// Block Custom View
|
|
1462
|
+
async isBlockCustomViewVisible(blockCustomViewLocator, isVisible = true) {
|
|
1463
|
+
await (0, test_1.expect)(this.page.locator(blockCustomViewLocator)).toBeVisible({ visible: isVisible });
|
|
1464
|
+
}
|
|
1465
|
+
async isSingleBlockElementVisible(isVisible = true) {
|
|
1466
|
+
const count = await this.refListBlock.count();
|
|
1467
|
+
if (isVisible) {
|
|
1468
|
+
(0, test_1.expect)(count, `Expected only one element, but found ${count}`).toBe(1);
|
|
1469
|
+
}
|
|
1470
|
+
else {
|
|
1471
|
+
(0, test_1.expect)(count, `Expected only one element, but found ${count}`).toBe(0);
|
|
1472
|
+
}
|
|
1473
|
+
await (0, test_1.expect)(this.refListBlock).toBeVisible({ visible: isVisible });
|
|
1474
|
+
}
|
|
1475
|
+
async doesBlockCustomViewHaveValue(customBlockViewLocator, valueText) {
|
|
1476
|
+
const locator = this.page.locator(`${customBlockViewLocator} p`);
|
|
1477
|
+
await (0, test_1.expect)(locator).toBeVisible();
|
|
1478
|
+
await (0, test_1.expect)(locator).toHaveText(valueText);
|
|
1479
|
+
}
|
|
1480
|
+
async clickPropertyActionWithName(name) {
|
|
1481
|
+
const actionLocator = this.propertyActionMenu.locator('umb-property-action uui-menu-item[label="' + name + '"]');
|
|
1482
|
+
await (0, test_1.expect)(actionLocator).toBeVisible();
|
|
1483
|
+
await actionLocator.click();
|
|
1484
|
+
}
|
|
1453
1485
|
async isContentWithNameVisibleInList(contentName, isVisible = true) {
|
|
1454
1486
|
await (0, test_1.expect)(this.documentTableColumnName.filter({ hasText: contentName })).toBeVisible({ visible: isVisible });
|
|
1455
1487
|
}
|
|
@@ -1460,6 +1492,16 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1460
1492
|
async doesDocumentModalHaveText(text) {
|
|
1461
1493
|
await (0, test_1.expect)(this.documentCreateOptionsModal).toContainText(text);
|
|
1462
1494
|
}
|
|
1495
|
+
async doesListViewItemsHaveCount(pageSize) {
|
|
1496
|
+
await (0, test_1.expect)(this.listViewCustomRows).toHaveCount(pageSize);
|
|
1497
|
+
}
|
|
1498
|
+
async isListViewItemWithNameVisible(itemName, index = 0) {
|
|
1499
|
+
await (0, test_1.expect)(this.listViewCustomRows.nth(index)).toContainText(itemName);
|
|
1500
|
+
}
|
|
1501
|
+
async clickPaginationNextButton() {
|
|
1502
|
+
await (0, test_1.expect)(this.nextBtn).toBeVisible();
|
|
1503
|
+
await this.nextBtn.click();
|
|
1504
|
+
}
|
|
1463
1505
|
}
|
|
1464
1506
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1465
1507
|
//# sourceMappingURL=ContentUiHelper.js.map
|