@umbraco/playwright-testhelpers 17.1.0-beta.1 → 17.1.0-beta.3
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 +37 -4
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +4 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.js +121 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +3 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -192,6 +192,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
192
192
|
waitForModalHidden(): Promise<void>;
|
|
193
193
|
clickSaveButtonForContent(): Promise<void>;
|
|
194
194
|
enterTextstring(text: string): Promise<void>;
|
|
195
|
+
isTextstringPropertyVisible(isVisible?: boolean): Promise<void>;
|
|
195
196
|
doesContentTreeHaveName(contentName: string): Promise<void>;
|
|
196
197
|
enterRichTextArea(value: string): Promise<void>;
|
|
197
198
|
enterTextArea(value: string): Promise<void>;
|
|
@@ -273,6 +274,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
273
274
|
isDocumentTypeNameVisible(contentName: string, isVisible?: boolean): Promise<void>;
|
|
274
275
|
doesModalHaveText(text: string): Promise<void>;
|
|
275
276
|
isTabNameVisible(tabName: string): Promise<void>;
|
|
277
|
+
clickTabWithName(tabName: string): Promise<void>;
|
|
276
278
|
doesDocumentHaveName(name: string): Promise<void>;
|
|
277
279
|
doesDocumentTableColumnNameValuesMatch(expectedValues: string[]): Promise<void>;
|
|
278
280
|
searchByKeywordInCollection(keyword: string): Promise<void>;
|
|
@@ -455,4 +457,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
455
457
|
isAddBlockListElementWithNameVisible(blockName: string): Promise<void>;
|
|
456
458
|
enterBlockPropertyValue(propertyName: string, value: string): Promise<void>;
|
|
457
459
|
isBlockPropertyEditable(propertyName: string, isEditable?: boolean): Promise<void>;
|
|
460
|
+
isInlineBlockPropertyVisible(propertyName: string, isVisible?: boolean): Promise<void>;
|
|
461
|
+
isInlineBlockPropertyVisibleForBlockWithName(blockName: string, propertyName: string, isVisible?: boolean, index?: number): Promise<void>;
|
|
462
|
+
enterInlineBlockPropertyValue(propertyName: string, value: string, index?: number): Promise<void>;
|
|
463
|
+
doesInlineBlockPropertyHaveValue(propertyName: string, value: string, index?: number): Promise<void>;
|
|
458
464
|
}
|
|
@@ -248,7 +248,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
248
248
|
this.hostnameComboBox = this.hostNameItem.locator('[label="Culture"]').locator('uui-combobox-list-option');
|
|
249
249
|
this.saveModalBtn = this.sidebarModal.getByLabel('Save', { exact: true });
|
|
250
250
|
this.resetFocalPointBtn = page.getByLabel('Reset focal point');
|
|
251
|
-
this.addNewHostnameBtn = page.
|
|
251
|
+
this.addNewHostnameBtn = page.locator('umb-property-layout[label="Hostnames"]').locator('[label="Add new hostname"]');
|
|
252
252
|
// List View
|
|
253
253
|
this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
|
|
254
254
|
this.listView = page.locator('umb-document-table-collection-view');
|
|
@@ -423,6 +423,14 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
423
423
|
async enterTextstring(text) {
|
|
424
424
|
await this.enterText(this.textstringTxt, text);
|
|
425
425
|
}
|
|
426
|
+
async isTextstringPropertyVisible(isVisible = true) {
|
|
427
|
+
if (isVisible) {
|
|
428
|
+
await (0, test_1.expect)(this.textstringTxt).toBeVisible();
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
await (0, test_1.expect)(this.textstringTxt).not.toBeVisible();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
426
434
|
async doesContentTreeHaveName(contentName) {
|
|
427
435
|
await this.containsText(this.contentTree, contentName);
|
|
428
436
|
}
|
|
@@ -467,6 +475,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
467
475
|
}
|
|
468
476
|
async waitForContentToBeCreated() {
|
|
469
477
|
await this.waitForLoadState();
|
|
478
|
+
// Extra wait as content creation seems to take a bit longer sometimes
|
|
479
|
+
await this.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
470
480
|
}
|
|
471
481
|
async waitForContentToBeDeleted() {
|
|
472
482
|
await this.waitForLoadState();
|
|
@@ -565,10 +575,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
565
575
|
return await this.isVisible(this.sidebarModal.getByText(contentName), isVisible);
|
|
566
576
|
}
|
|
567
577
|
async isContentInTreeVisible(name, isVisible = true) {
|
|
568
|
-
await this.isVisible(this.documentTreeItem.
|
|
578
|
+
await this.isVisible(this.documentTreeItem.getByLabel(name, { exact: true }).first(), isVisible);
|
|
569
579
|
}
|
|
570
580
|
async isChildContentInTreeVisible(parentName, childName, isVisible = true) {
|
|
571
|
-
await this.isVisible(this.documentTreeItem.locator('[label="' + parentName + '"]').locator('
|
|
581
|
+
await this.isVisible(this.documentTreeItem.locator('[label="' + parentName + '"]').locator('uui-menu-item[label="' + childName + '"]'), isVisible);
|
|
572
582
|
}
|
|
573
583
|
async removeContentPicker(contentPickerName) {
|
|
574
584
|
const contentPickerLocator = this.entityItem.filter({ has: this.page.locator(`[name="${contentPickerName}"]`) });
|
|
@@ -740,6 +750,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
740
750
|
async isTabNameVisible(tabName) {
|
|
741
751
|
return await this.isVisible(this.tabItems.filter({ hasText: tabName }));
|
|
742
752
|
}
|
|
753
|
+
async clickTabWithName(tabName) {
|
|
754
|
+
const tabLocator = this.tabItems.filter({ hasText: tabName });
|
|
755
|
+
await this.click(tabLocator);
|
|
756
|
+
}
|
|
743
757
|
async doesDocumentHaveName(name) {
|
|
744
758
|
await this.hasValue(this.enterAName, name);
|
|
745
759
|
}
|
|
@@ -1204,7 +1218,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1204
1218
|
await this.isVisible(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(`[style="background-color:${backgroundColor};"]`));
|
|
1205
1219
|
}
|
|
1206
1220
|
async doesBlockHaveIconColor(elementName, backgroundColor) {
|
|
1207
|
-
await this.isVisible(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(`
|
|
1221
|
+
await this.isVisible(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(`[color="${backgroundColor}"]`));
|
|
1208
1222
|
}
|
|
1209
1223
|
async addDocumentDomain(domainName, languageName) {
|
|
1210
1224
|
await this.clickCultureAndHostnamesButton();
|
|
@@ -1275,6 +1289,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1275
1289
|
}
|
|
1276
1290
|
async clickConfirmToPublishButton() {
|
|
1277
1291
|
await this.click(this.confirmToPublishBtn);
|
|
1292
|
+
// Extra wait to ensure publish process starts
|
|
1293
|
+
await this.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.medium);
|
|
1278
1294
|
}
|
|
1279
1295
|
async clickPublishWithDescendantsButton() {
|
|
1280
1296
|
await this.click(this.publishWithDescendantsBtn);
|
|
@@ -1438,6 +1454,23 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1438
1454
|
await this.waitForVisible(propertyLocator);
|
|
1439
1455
|
await (0, test_1.expect)(propertyLocator).toBeEditable({ editable: isEditable });
|
|
1440
1456
|
}
|
|
1457
|
+
async isInlineBlockPropertyVisible(propertyName, isVisible = true) {
|
|
1458
|
+
const propertyLocator = this.blockListEntry.locator(this.blockProperty).filter({ hasText: propertyName });
|
|
1459
|
+
await this.isVisible(propertyLocator, isVisible);
|
|
1460
|
+
}
|
|
1461
|
+
async isInlineBlockPropertyVisibleForBlockWithName(blockName, propertyName, isVisible = true, index = 0) {
|
|
1462
|
+
const blockEntryLocator = this.blockListEntry.filter({ hasText: blockName }).nth(index);
|
|
1463
|
+
const propertyLocator = blockEntryLocator.locator(this.blockProperty).filter({ hasText: propertyName });
|
|
1464
|
+
await this.isVisible(propertyLocator, isVisible);
|
|
1465
|
+
}
|
|
1466
|
+
async enterInlineBlockPropertyValue(propertyName, value, index = 0) {
|
|
1467
|
+
const propertyLocator = this.blockListEntry.nth(index).locator(this.blockProperty).filter({ hasText: propertyName });
|
|
1468
|
+
await this.enterText(propertyLocator.locator('input'), value);
|
|
1469
|
+
}
|
|
1470
|
+
async doesInlineBlockPropertyHaveValue(propertyName, value, index = 0) {
|
|
1471
|
+
const propertyLocator = this.blockListEntry.nth(index).locator(this.blockProperty).filter({ hasText: propertyName }).locator('input');
|
|
1472
|
+
await this.hasValue(propertyLocator, value);
|
|
1473
|
+
}
|
|
1441
1474
|
}
|
|
1442
1475
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1443
1476
|
//# sourceMappingURL=ContentUiHelper.js.map
|