@umbraco/playwright-testhelpers 17.0.20 → 17.0.22
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 +3 -0
- package/dist/lib/helpers/ContentUiHelper.js +19 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +5 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js +35 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -354,6 +354,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
354
354
|
clickActionsMenuForProperty(groupName: string, propertyName: string): Promise<void>;
|
|
355
355
|
clickAddBlockGridElementWithName(elementTypeName: string): Promise<void>;
|
|
356
356
|
clickEditBlockListEntryWithName(blockListElementName: string): Promise<void>;
|
|
357
|
+
clickEditBlockGridEntryWithName(blockGridElementName: string): Promise<void>;
|
|
358
|
+
goToRTEBlockWithName(groupName: string, propertyName: string, blockName: string, index?: number): Promise<void>;
|
|
357
359
|
clickSelectBlockElementWithName(elementTypeName: string): Promise<void>;
|
|
358
360
|
clickSelectBlockElementInAreaWithName(elementTypeName: string): Promise<void>;
|
|
359
361
|
clickBlockElementWithName(elementTypeName: string): Promise<void>;
|
|
@@ -461,4 +463,5 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
461
463
|
isInlineBlockPropertyVisibleForBlockWithName(blockName: string, propertyName: string, isVisible?: boolean, index?: number): Promise<void>;
|
|
462
464
|
enterInlineBlockPropertyValue(propertyName: string, value: string, index?: number): Promise<void>;
|
|
463
465
|
doesInlineBlockPropertyHaveValue(propertyName: string, value: string, index?: number): Promise<void>;
|
|
466
|
+
removeNotFoundContentPickerWithId(contentPickerId?: string): Promise<void>;
|
|
464
467
|
}
|
|
@@ -1131,6 +1131,18 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1131
1131
|
await (0, test_1.expect)(this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit')).toBeVisible();
|
|
1132
1132
|
await this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit').click({ force: true });
|
|
1133
1133
|
}
|
|
1134
|
+
async clickEditBlockGridEntryWithName(blockGridElementName) {
|
|
1135
|
+
await (0, test_1.expect)(this.blockGridEntry.filter({ hasText: blockGridElementName })).toBeVisible();
|
|
1136
|
+
await this.blockGridEntry.filter({ hasText: blockGridElementName }).hover();
|
|
1137
|
+
await (0, test_1.expect)(this.blockGridEntry.filter({ hasText: blockGridElementName }).getByLabel('edit')).toBeVisible();
|
|
1138
|
+
await this.blockGridEntry.filter({ hasText: blockGridElementName }).getByLabel('edit').click({ force: true });
|
|
1139
|
+
}
|
|
1140
|
+
async goToRTEBlockWithName(groupName, propertyName, blockName, index = 0) {
|
|
1141
|
+
const rteProperty = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName });
|
|
1142
|
+
const rteBlockLocator = rteProperty.locator(this.rteBlock).filter({ hasText: blockName }).nth(index);
|
|
1143
|
+
await (0, test_1.expect)(rteBlockLocator).toBeVisible();
|
|
1144
|
+
await rteBlockLocator.click();
|
|
1145
|
+
}
|
|
1134
1146
|
async clickSelectBlockElementWithName(elementTypeName) {
|
|
1135
1147
|
await (0, test_1.expect)(this.page.getByRole('button', { name: elementTypeName, exact: true })).toBeVisible();
|
|
1136
1148
|
await this.page.getByRole('button', { name: elementTypeName, exact: true }).click();
|
|
@@ -1600,6 +1612,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1600
1612
|
const propertyLocator = this.blockListEntry.nth(index).locator(this.blockProperty).filter({ hasText: propertyName }).locator('input');
|
|
1601
1613
|
await (0, test_1.expect)(propertyLocator).toHaveValue(value);
|
|
1602
1614
|
}
|
|
1615
|
+
async removeNotFoundContentPickerWithId(contentPickerId) {
|
|
1616
|
+
const hasText = contentPickerId ? contentPickerId : 'Not found';
|
|
1617
|
+
const contentPickerLocator = this.entityItem.filter({ hasText: hasText });
|
|
1618
|
+
await contentPickerLocator.hover();
|
|
1619
|
+
await contentPickerLocator.getByLabel('Remove').click();
|
|
1620
|
+
await this.clickConfirmRemoveButton();
|
|
1621
|
+
}
|
|
1603
1622
|
}
|
|
1604
1623
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1605
1624
|
//# sourceMappingURL=ContentUiHelper.js.map
|