@umbraco/playwright-testhelpers 15.0.49 → 15.0.51
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 +9 -0
- package/dist/lib/helpers/ContentUiHelper.js +38 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +1 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +12 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +1 -1
- package/dist/lib/helpers/UiBaseLocators.js +3 -3
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -158,6 +158,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
158
158
|
private readonly selectAllCheckbox;
|
|
159
159
|
private readonly tiptapStatusbarWordCount;
|
|
160
160
|
private readonly tiptapStatusbarElementPath;
|
|
161
|
+
private readonly styleSelectBtn;
|
|
162
|
+
private readonly cascadingMenuContainer;
|
|
161
163
|
constructor(page: Page);
|
|
162
164
|
enterContentName(name: string): Promise<void>;
|
|
163
165
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -308,6 +310,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
308
310
|
clickMediaLinkButton(): Promise<void>;
|
|
309
311
|
clickManualLinkButton(): Promise<void>;
|
|
310
312
|
clickAddBlockElementButton(): Promise<void>;
|
|
313
|
+
clickAddBlockWithNameButton(name: string): Promise<void>;
|
|
314
|
+
clickCreateForModalWithHeadline(headline: string): Promise<void>;
|
|
311
315
|
isAddBlockElementButtonVisible(isVisible?: boolean): Promise<void>;
|
|
312
316
|
isAddBlockElementButtonWithLabelVisible(blockName: string, label: string, isVisible?: boolean): Promise<void>;
|
|
313
317
|
doesFormValidationMessageContainText(text: string): Promise<void>;
|
|
@@ -359,6 +363,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
359
363
|
doesPropertyContainValidationMessage(groupName: string, propertyName: string, message: string): Promise<void>;
|
|
360
364
|
clickInsertBlockButton(): Promise<void>;
|
|
361
365
|
enterRTETipTapEditor(value: string): Promise<void>;
|
|
366
|
+
enterRTETipTapEditorWithName(name: string, value: string): Promise<void>;
|
|
362
367
|
clickTipTapToolbarIconWithTitle(iconTitle: string): Promise<void>;
|
|
363
368
|
doesUploadedSvgThumbnailHaveSrc(imageSrc: string): Promise<void>;
|
|
364
369
|
doesRichTextEditorBlockContainLabel(richTextEditorAlias: string, label: string): Promise<void>;
|
|
@@ -384,4 +389,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
384
389
|
doesTiptapHaveCharacterCount(count: number): Promise<void>;
|
|
385
390
|
clickTiptapWordCountButton(): Promise<void>;
|
|
386
391
|
doesElementPathHaveText(text: string): Promise<void>;
|
|
392
|
+
clickStyleSelectButton(): Promise<void>;
|
|
393
|
+
clickCascadingMenuItemWithName(name: string): Promise<void>;
|
|
394
|
+
hoverCascadingMenuItemWithName(name: string): Promise<void>;
|
|
395
|
+
selectAllRTETipTapEditorText(): Promise<void>;
|
|
387
396
|
}
|
|
@@ -162,6 +162,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
162
162
|
selectAllCheckbox;
|
|
163
163
|
tiptapStatusbarWordCount;
|
|
164
164
|
tiptapStatusbarElementPath;
|
|
165
|
+
styleSelectBtn;
|
|
166
|
+
cascadingMenuContainer;
|
|
165
167
|
constructor(page) {
|
|
166
168
|
super(page);
|
|
167
169
|
this.saveContentBtn = page.locator('[data-mark="workspace-action:Umb.WorkspaceAction.Document.Save"]');
|
|
@@ -327,6 +329,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
327
329
|
this.publishAt = this.generalItem.filter({ hasText: 'Publish at' }).locator('umb-localize-date');
|
|
328
330
|
this.removeAt = this.generalItem.filter({ hasText: 'Remove at' }).locator('umb-localize-date');
|
|
329
331
|
this.selectAllCheckbox = this.documentScheduleModal.locator('[label="Select all"]');
|
|
332
|
+
// Tiptap - Style Select
|
|
333
|
+
this.styleSelectBtn = page.locator('uui-button[label="Style Select"]');
|
|
334
|
+
this.cascadingMenuContainer = page.locator('umb-cascading-menu-popover uui-scroll-container');
|
|
330
335
|
}
|
|
331
336
|
async enterContentName(name) {
|
|
332
337
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -956,6 +961,14 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
956
961
|
await (0, test_1.expect)(this.addBlockElementBtn).toBeVisible();
|
|
957
962
|
await this.addBlockElementBtn.click();
|
|
958
963
|
}
|
|
964
|
+
async clickAddBlockWithNameButton(name) {
|
|
965
|
+
await (0, test_1.expect)(this.page.getByLabel('Add ' + name)).toBeVisible();
|
|
966
|
+
await this.page.getByLabel('Add ' + name).click();
|
|
967
|
+
}
|
|
968
|
+
async clickCreateForModalWithHeadline(headline) {
|
|
969
|
+
await (0, test_1.expect)(this.page.locator('[headline="' + headline + '"]').getByLabel('Create')).toBeVisible();
|
|
970
|
+
await this.page.locator('[headline="' + headline + '"]').getByLabel('Create').click();
|
|
971
|
+
}
|
|
959
972
|
async isAddBlockElementButtonVisible(isVisible = true) {
|
|
960
973
|
await (0, test_1.expect)(this.addBlockElementBtn).toBeVisible({ visible: isVisible });
|
|
961
974
|
}
|
|
@@ -1192,6 +1205,12 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1192
1205
|
await this.tipTapEditor.clear();
|
|
1193
1206
|
await this.tipTapEditor.fill(value);
|
|
1194
1207
|
}
|
|
1208
|
+
async enterRTETipTapEditorWithName(name, value) {
|
|
1209
|
+
const tipTapEditorLocator = this.page.locator('[data-mark="property:' + name + '"]').locator(this.tipTapEditor);
|
|
1210
|
+
await (0, test_1.expect)(tipTapEditorLocator).toBeVisible();
|
|
1211
|
+
await tipTapEditorLocator.clear();
|
|
1212
|
+
await tipTapEditorLocator.fill(value);
|
|
1213
|
+
}
|
|
1195
1214
|
async clickTipTapToolbarIconWithTitle(iconTitle) {
|
|
1196
1215
|
await (0, test_1.expect)(this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg')).toBeVisible();
|
|
1197
1216
|
await this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg').click();
|
|
@@ -1289,6 +1308,25 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1289
1308
|
async doesElementPathHaveText(text) {
|
|
1290
1309
|
await (0, test_1.expect)(this.tiptapStatusbarElementPath).toHaveText(text);
|
|
1291
1310
|
}
|
|
1311
|
+
async clickStyleSelectButton() {
|
|
1312
|
+
await (0, test_1.expect)(this.styleSelectBtn).toBeVisible();
|
|
1313
|
+
await this.styleSelectBtn.click();
|
|
1314
|
+
}
|
|
1315
|
+
async clickCascadingMenuItemWithName(name) {
|
|
1316
|
+
const menuItemLocator = this.cascadingMenuContainer.locator('uui-menu-item[label="' + name + '"]');
|
|
1317
|
+
await (0, test_1.expect)(menuItemLocator).toBeVisible();
|
|
1318
|
+
await menuItemLocator.click();
|
|
1319
|
+
}
|
|
1320
|
+
async hoverCascadingMenuItemWithName(name) {
|
|
1321
|
+
const menuItemLocator = this.cascadingMenuContainer.locator('uui-menu-item[label="' + name + '"]');
|
|
1322
|
+
await (0, test_1.expect)(menuItemLocator).toBeVisible();
|
|
1323
|
+
await menuItemLocator.hover();
|
|
1324
|
+
}
|
|
1325
|
+
async selectAllRTETipTapEditorText() {
|
|
1326
|
+
await (0, test_1.expect)(this.tipTapEditor).toBeVisible();
|
|
1327
|
+
await this.tipTapEditor.click();
|
|
1328
|
+
await this.page.keyboard.press('Control+A');
|
|
1329
|
+
}
|
|
1292
1330
|
}
|
|
1293
1331
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1294
1332
|
//# sourceMappingURL=ContentUiHelper.js.map
|