@umbraco/playwright-testhelpers 15.0.48 → 15.0.50
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 +26 -2
- 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/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>;
|
|
@@ -384,4 +386,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
384
386
|
doesTiptapHaveCharacterCount(count: number): Promise<void>;
|
|
385
387
|
clickTiptapWordCountButton(): Promise<void>;
|
|
386
388
|
doesElementPathHaveText(text: string): Promise<void>;
|
|
389
|
+
clickStyleSelectButton(): Promise<void>;
|
|
390
|
+
clickCascadingMenuItemWithName(name: string): Promise<void>;
|
|
391
|
+
hoverCascadingMenuItemWithName(name: string): Promise<void>;
|
|
392
|
+
selectAllRTETipTapEditorText(): Promise<void>;
|
|
387
393
|
}
|
|
@@ -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();
|
|
@@ -1277,10 +1282,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1277
1282
|
await caretButtonLocator.click();
|
|
1278
1283
|
}
|
|
1279
1284
|
async doesTiptapHaveWordCount(count) {
|
|
1280
|
-
await (0, test_1.expect)(this.tiptapStatusbarWordCount).toHaveText(count.toString() + 'words');
|
|
1285
|
+
await (0, test_1.expect)(this.tiptapStatusbarWordCount).toHaveText(count.toString() + ' words');
|
|
1281
1286
|
}
|
|
1282
1287
|
async doesTiptapHaveCharacterCount(count) {
|
|
1283
|
-
await (0, test_1.expect)(this.tiptapStatusbarWordCount).toHaveText(count.toString() + 'characters');
|
|
1288
|
+
await (0, test_1.expect)(this.tiptapStatusbarWordCount).toHaveText(count.toString() + ' characters');
|
|
1284
1289
|
}
|
|
1285
1290
|
async clickTiptapWordCountButton() {
|
|
1286
1291
|
await (0, test_1.expect)(this.tiptapStatusbarWordCount).toBeVisible();
|
|
@@ -1289,6 +1294,25 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1289
1294
|
async doesElementPathHaveText(text) {
|
|
1290
1295
|
await (0, test_1.expect)(this.tiptapStatusbarElementPath).toHaveText(text);
|
|
1291
1296
|
}
|
|
1297
|
+
async clickStyleSelectButton() {
|
|
1298
|
+
await (0, test_1.expect)(this.styleSelectBtn).toBeVisible();
|
|
1299
|
+
await this.styleSelectBtn.click();
|
|
1300
|
+
}
|
|
1301
|
+
async clickCascadingMenuItemWithName(name) {
|
|
1302
|
+
const menuItemLocator = this.cascadingMenuContainer.locator('uui-menu-item[label="' + name + '"]');
|
|
1303
|
+
await (0, test_1.expect)(menuItemLocator).toBeVisible();
|
|
1304
|
+
await menuItemLocator.click();
|
|
1305
|
+
}
|
|
1306
|
+
async hoverCascadingMenuItemWithName(name) {
|
|
1307
|
+
const menuItemLocator = this.cascadingMenuContainer.locator('uui-menu-item[label="' + name + '"]');
|
|
1308
|
+
await (0, test_1.expect)(menuItemLocator).toBeVisible();
|
|
1309
|
+
await menuItemLocator.hover();
|
|
1310
|
+
}
|
|
1311
|
+
async selectAllRTETipTapEditorText() {
|
|
1312
|
+
await (0, test_1.expect)(this.tipTapEditor).toBeVisible();
|
|
1313
|
+
await this.tipTapEditor.click();
|
|
1314
|
+
await this.page.keyboard.press('Control+A');
|
|
1315
|
+
}
|
|
1292
1316
|
}
|
|
1293
1317
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1294
1318
|
//# sourceMappingURL=ContentUiHelper.js.map
|