@umbraco/playwright-testhelpers 17.0.15 → 17.0.17
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 +27 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +20 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js +108 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/ContentDeliveryApiHelper.js +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/ContentDeliveryApiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -175,6 +175,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
175
175
|
private readonly hostNameItem;
|
|
176
176
|
private readonly languageToggle;
|
|
177
177
|
private readonly contentVariantDropdown;
|
|
178
|
+
private readonly blockProperty;
|
|
178
179
|
constructor(page: Page);
|
|
179
180
|
enterContentName(name: string): Promise<void>;
|
|
180
181
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -449,4 +450,9 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
449
450
|
isChooseButtonVisible(isVisible?: boolean): Promise<void>;
|
|
450
451
|
clickDocumentNotificationOptionWithName(name: string): Promise<void>;
|
|
451
452
|
switchLanguage(languageName: string): Promise<void>;
|
|
453
|
+
clickAddBlockListElementWithName(blockName: string): Promise<void>;
|
|
454
|
+
isAddBlockListElementWithNameDisabled(blockName: string): Promise<void>;
|
|
455
|
+
isAddBlockListElementWithNameVisible(blockName: string): Promise<void>;
|
|
456
|
+
enterBlockPropertyValue(propertyName: string, value: string): Promise<void>;
|
|
457
|
+
isBlockPropertyEditable(propertyName: string, isEditable?: boolean): Promise<void>;
|
|
452
458
|
}
|
|
@@ -179,6 +179,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
179
179
|
hostNameItem;
|
|
180
180
|
languageToggle;
|
|
181
181
|
contentVariantDropdown;
|
|
182
|
+
blockProperty;
|
|
182
183
|
constructor(page) {
|
|
183
184
|
super(page);
|
|
184
185
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -366,6 +367,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
366
367
|
this.entityPickerTree = page.locator('umb-tree[alias="Umb.Tree.EntityDataPicker"]');
|
|
367
368
|
this.languageToggle = page.getByTestId('input:entity-name').locator('#toggle');
|
|
368
369
|
this.contentVariantDropdown = page.locator('umb-document-workspace-split-view-variant-selector uui-popover-container #dropdown');
|
|
370
|
+
this.blockProperty = page.locator('umb-block-workspace-view-edit-property');
|
|
369
371
|
}
|
|
370
372
|
async enterContentName(name) {
|
|
371
373
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -1541,6 +1543,31 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1541
1543
|
await languageOptionLocator.click();
|
|
1542
1544
|
await (0, test_1.expect)(languageOptionLocator).toContainClass('selected');
|
|
1543
1545
|
}
|
|
1546
|
+
async clickAddBlockListElementWithName(blockName) {
|
|
1547
|
+
const createNewButtonLocator = this.page.getByTestId('property:' + blockName.toLowerCase()).getByLabel('Create new');
|
|
1548
|
+
await (0, test_1.expect)(createNewButtonLocator).toBeVisible();
|
|
1549
|
+
await createNewButtonLocator.click();
|
|
1550
|
+
}
|
|
1551
|
+
async isAddBlockListElementWithNameDisabled(blockName) {
|
|
1552
|
+
const createNewButtonLocator = this.page.getByTestId('property:' + blockName.toLowerCase()).locator('uui-button[label="Create new"]');
|
|
1553
|
+
await (0, test_1.expect)(createNewButtonLocator).toHaveAttribute('disabled');
|
|
1554
|
+
}
|
|
1555
|
+
async isAddBlockListElementWithNameVisible(blockName) {
|
|
1556
|
+
const createNewButtonLocator = this.page.getByTestId('property:' + blockName.toLowerCase()).locator('uui-button[label="Create new"]');
|
|
1557
|
+
await (0, test_1.expect)(createNewButtonLocator).toBeVisible();
|
|
1558
|
+
await (0, test_1.expect)(createNewButtonLocator).not.toHaveAttribute('disabled');
|
|
1559
|
+
}
|
|
1560
|
+
async enterBlockPropertyValue(propertyName, value) {
|
|
1561
|
+
const property = this.blockProperty.filter({ hasText: propertyName });
|
|
1562
|
+
await (0, test_1.expect)(property).toBeVisible();
|
|
1563
|
+
await property.locator('input').clear();
|
|
1564
|
+
await property.locator('input').fill(value);
|
|
1565
|
+
}
|
|
1566
|
+
async isBlockPropertyEditable(propertyName, isEditable = true) {
|
|
1567
|
+
const propertyLocator = this.blockProperty.filter({ hasText: propertyName }).locator('#input');
|
|
1568
|
+
await (0, test_1.expect)(propertyLocator).toBeVisible();
|
|
1569
|
+
await (0, test_1.expect)(propertyLocator).toBeEditable({ editable: isEditable });
|
|
1570
|
+
}
|
|
1544
1571
|
}
|
|
1545
1572
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1546
1573
|
//# sourceMappingURL=ContentUiHelper.js.map
|