@umbraco/playwright-testhelpers 17.1.0-beta.2 → 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 +32 -1
- 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();
|
|
@@ -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
|
}
|
|
@@ -1440,6 +1454,23 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1440
1454
|
await this.waitForVisible(propertyLocator);
|
|
1441
1455
|
await (0, test_1.expect)(propertyLocator).toBeEditable({ editable: isEditable });
|
|
1442
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
|
+
}
|
|
1443
1474
|
}
|
|
1444
1475
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1445
1476
|
//# sourceMappingURL=ContentUiHelper.js.map
|