@umbraco/playwright-testhelpers 17.0.0-beta.2 → 17.0.0-beta.3

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.
@@ -170,6 +170,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
170
170
  private readonly treePickerSearchTxt;
171
171
  private readonly mediaPickerSearchTxt;
172
172
  private readonly memberPickerSearchTxt;
173
+ private readonly documentCreateOptionsModal;
173
174
  constructor(page: Page);
174
175
  enterContentName(name: string): Promise<void>;
175
176
  clickSaveAndPublishButton(): Promise<void>;
@@ -430,4 +431,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
430
431
  enterSearchKeywordInMemberPickerModal(keyword: string): Promise<void>;
431
432
  isContentNameReadOnly(): Promise<void>;
432
433
  isContentWithNameVisibleInList(contentName: string, isVisible?: boolean): Promise<void>;
434
+ selectDocumentBlueprintWithName(blueprintName: string): Promise<void>;
435
+ doesDocumentModalHaveText(text: string): Promise<void>;
433
436
  }
@@ -174,6 +174,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
174
174
  treePickerSearchTxt;
175
175
  mediaPickerSearchTxt;
176
176
  memberPickerSearchTxt;
177
+ documentCreateOptionsModal;
177
178
  constructor(page) {
178
179
  super(page);
179
180
  this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
@@ -234,6 +235,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
234
235
  this.editDocumentTypeBtn = this.generalItem.filter({ hasText: 'Document Type' }).locator('#button');
235
236
  this.addTemplateBtn = this.generalItem.filter({ hasText: 'Template' }).locator('#button');
236
237
  this.id = this.generalItem.filter({ hasText: 'Id' }).locator('span');
238
+ this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
237
239
  // Culture and Hostname
238
240
  this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(…)?$/);
239
241
  this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
@@ -1459,6 +1461,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1459
1461
  async isContentWithNameVisibleInList(contentName, isVisible = true) {
1460
1462
  await (0, test_1.expect)(this.documentTableColumnName.filter({ hasText: contentName })).toBeVisible({ visible: isVisible });
1461
1463
  }
1464
+ async selectDocumentBlueprintWithName(blueprintName) {
1465
+ await (0, test_1.expect)(this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName })).toBeVisible();
1466
+ await this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName }).click();
1467
+ }
1468
+ async doesDocumentModalHaveText(text) {
1469
+ await (0, test_1.expect)(this.documentCreateOptionsModal).toContainText(text);
1470
+ }
1462
1471
  }
1463
1472
  exports.ContentUiHelper = ContentUiHelper;
1464
1473
  //# sourceMappingURL=ContentUiHelper.js.map