@umbraco/playwright-testhelpers 16.0.9 → 16.0.11

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.
@@ -159,6 +159,12 @@ 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>;
@@ -385,4 +391,9 @@ export declare class ContentUiHelper extends UiBaseLocators {
385
391
  clickTiptapWordCountButton(): Promise<void>;
386
392
  doesElementPathHaveText(text: string): Promise<void>;
387
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>;
388
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();
@@ -1296,6 +1309,24 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1296
1309
  async clickConfirmToPublishButton() {
1297
1310
  await this.confirmToPublishBtn.click();
1298
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
+ }
1299
1330
  }
1300
1331
  exports.ContentUiHelper = ContentUiHelper;
1301
1332
  //# sourceMappingURL=ContentUiHelper.js.map