@umbraco/playwright-testhelpers 16.0.8 → 16.0.10
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 +11 -1
- package/dist/lib/helpers/ContentUiHelper.js +31 -3
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js +27 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/NotificationConstantHelper.d.ts +1 -0
- package/dist/lib/helpers/NotificationConstantHelper.js +2 -1
- package/dist/lib/helpers/NotificationConstantHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +2 -2
- package/dist/lib/helpers/UiBaseLocators.js +5 -5
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.d.ts +0 -2
- package/dist/lib/helpers/UserUiHelper.js +0 -7
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -159,10 +159,15 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
159
159
|
private readonly confirmToPublishBtn;
|
|
160
160
|
private readonly tiptapStatusbarWordCount;
|
|
161
161
|
private readonly tiptapStatusbarElementPath;
|
|
162
|
+
private readonly publishWithDescendantsBtn;
|
|
163
|
+
private readonly documentPublishWithDescendantsModal;
|
|
164
|
+
private readonly includeUnpublishedDescendantsToggle;
|
|
165
|
+
private readonly publishWithDescendantsModalBtn;
|
|
166
|
+
private readonly documentVariantLanguagePicker;
|
|
167
|
+
private readonly documentVariantLanguageItem;
|
|
162
168
|
constructor(page: Page);
|
|
163
169
|
enterContentName(name: string): Promise<void>;
|
|
164
170
|
clickSaveAndPublishButton(): Promise<void>;
|
|
165
|
-
clickActionsButton(): Promise<void>;
|
|
166
171
|
clickPublishButton(): Promise<void>;
|
|
167
172
|
clickUnpublishButton(): Promise<void>;
|
|
168
173
|
clickReloadChildrenThreeDotsButton(): Promise<void>;
|
|
@@ -386,4 +391,9 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
386
391
|
clickTiptapWordCountButton(): Promise<void>;
|
|
387
392
|
doesElementPathHaveText(text: string): Promise<void>;
|
|
388
393
|
clickConfirmToPublishButton(): Promise<void>;
|
|
394
|
+
clickPublishWithDescendantsButton(): Promise<void>;
|
|
395
|
+
clickIncludeUnpublishedDescendantsToggle(): Promise<void>;
|
|
396
|
+
clickPublishWithDescendantsModalButton(): Promise<void>;
|
|
397
|
+
doesDocumentVariantLanguageItemHaveCount(count: number): Promise<void>;
|
|
398
|
+
doesDocumentVariantLanguageItemHaveName(name: string): Promise<void>;
|
|
389
399
|
}
|
|
@@ -163,6 +163,12 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
163
163
|
confirmToPublishBtn;
|
|
164
164
|
tiptapStatusbarWordCount;
|
|
165
165
|
tiptapStatusbarElementPath;
|
|
166
|
+
publishWithDescendantsBtn;
|
|
167
|
+
documentPublishWithDescendantsModal;
|
|
168
|
+
includeUnpublishedDescendantsToggle;
|
|
169
|
+
publishWithDescendantsModalBtn;
|
|
170
|
+
documentVariantLanguagePicker;
|
|
171
|
+
documentVariantLanguageItem;
|
|
166
172
|
constructor(page) {
|
|
167
173
|
super(page);
|
|
168
174
|
this.saveContentBtn = page.locator('[data-mark="workspace-action:Umb.WorkspaceAction.Document.Save"]');
|
|
@@ -329,6 +335,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
329
335
|
this.removeAt = this.generalItem.filter({ hasText: 'Remove at' }).locator('umb-localize-date');
|
|
330
336
|
this.selectAllCheckbox = this.documentScheduleModal.locator('[label="Select all"]');
|
|
331
337
|
this.confirmToPublishBtn = page.locator('umb-document-publish-modal').getByLabel('Publish');
|
|
338
|
+
// Publish with descendants
|
|
339
|
+
this.documentPublishWithDescendantsModal = page.locator('umb-document-publish-with-descendants-modal');
|
|
340
|
+
this.publishWithDescendantsBtn = this.workspaceActionMenuItem.getByLabel('Publish with descendants', { exact: true });
|
|
341
|
+
this.includeUnpublishedDescendantsToggle = this.documentPublishWithDescendantsModal.locator('#includeUnpublishedDescendants');
|
|
342
|
+
this.publishWithDescendantsModalBtn = this.documentPublishWithDescendantsModal.getByLabel('Publish with descendants', { exact: true });
|
|
343
|
+
this.documentVariantLanguagePicker = page.locator('umb-document-variant-language-picker');
|
|
344
|
+
this.documentVariantLanguageItem = this.documentVariantLanguagePicker.locator('uui-menu-item');
|
|
332
345
|
}
|
|
333
346
|
async enterContentName(name) {
|
|
334
347
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -341,9 +354,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
341
354
|
await this.saveAndPublishBtn.click();
|
|
342
355
|
await this.page.waitForTimeout(500);
|
|
343
356
|
}
|
|
344
|
-
async clickActionsButton() {
|
|
345
|
-
await this.actionsBtn.click();
|
|
346
|
-
}
|
|
347
357
|
async clickPublishButton() {
|
|
348
358
|
await this.publishBtn.click();
|
|
349
359
|
await this.page.waitForTimeout(500);
|
|
@@ -1299,6 +1309,24 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1299
1309
|
async clickConfirmToPublishButton() {
|
|
1300
1310
|
await this.confirmToPublishBtn.click();
|
|
1301
1311
|
}
|
|
1312
|
+
async clickPublishWithDescendantsButton() {
|
|
1313
|
+
await (0, test_1.expect)(this.publishWithDescendantsBtn).toBeVisible();
|
|
1314
|
+
await this.publishWithDescendantsBtn.click();
|
|
1315
|
+
}
|
|
1316
|
+
async clickIncludeUnpublishedDescendantsToggle() {
|
|
1317
|
+
await (0, test_1.expect)(this.includeUnpublishedDescendantsToggle).toBeVisible();
|
|
1318
|
+
await this.includeUnpublishedDescendantsToggle.click();
|
|
1319
|
+
}
|
|
1320
|
+
async clickPublishWithDescendantsModalButton() {
|
|
1321
|
+
await (0, test_1.expect)(this.publishWithDescendantsModalBtn).toBeVisible();
|
|
1322
|
+
await this.publishWithDescendantsModalBtn.click();
|
|
1323
|
+
}
|
|
1324
|
+
async doesDocumentVariantLanguageItemHaveCount(count) {
|
|
1325
|
+
await (0, test_1.expect)(this.documentVariantLanguageItem).toHaveCount(count);
|
|
1326
|
+
}
|
|
1327
|
+
async doesDocumentVariantLanguageItemHaveName(name) {
|
|
1328
|
+
await (0, test_1.expect)(this.documentVariantLanguagePicker).toContainText(name);
|
|
1329
|
+
}
|
|
1302
1330
|
}
|
|
1303
1331
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1304
1332
|
//# sourceMappingURL=ContentUiHelper.js.map
|