@umbraco/playwright-testhelpers 16.0.38 → 16.0.40

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.
@@ -167,6 +167,9 @@ export declare class ContentUiHelper extends UiBaseLocators {
167
167
  private readonly styleSelectBtn;
168
168
  private readonly cascadingMenuContainer;
169
169
  private readonly modalFormValidationMessage;
170
+ private readonly treePickerSearchTxt;
171
+ private readonly mediaPickerSearchTxt;
172
+ private readonly memberPickerSearchTxt;
170
173
  constructor(page: Page);
171
174
  enterContentName(name: string): Promise<void>;
172
175
  clickSaveAndPublishButton(): Promise<void>;
@@ -420,5 +423,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
420
423
  waitForRecycleBinToBeEmptied(): Promise<void>;
421
424
  clickBlockElementInRTEWithName(elementTypeName: string): Promise<void>;
422
425
  doesModalFormValidationMessageContainText(text: string): Promise<void>;
426
+ enterSearchKeywordInTreePickerModal(keyword: string): Promise<void>;
427
+ enterSearchKeywordInMediaPickerModal(keyword: string): Promise<void>;
428
+ enterSearchKeywordInMemberPickerModal(keyword: string): Promise<void>;
423
429
  isContentNameReadOnly(): Promise<void>;
424
430
  }
@@ -171,6 +171,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
171
171
  styleSelectBtn;
172
172
  cascadingMenuContainer;
173
173
  modalFormValidationMessage;
174
+ treePickerSearchTxt;
175
+ mediaPickerSearchTxt;
176
+ memberPickerSearchTxt;
174
177
  constructor(page) {
175
178
  super(page);
176
179
  this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
@@ -214,7 +217,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
214
217
  this.tabItems = page.locator('uui-tab');
215
218
  this.documentWorkspace = page.locator('umb-document-workspace-editor');
216
219
  this.searchTxt = this.documentWorkspace.getByLabel('Search', { exact: true });
217
- this.selectAVariantBtn = page.getByRole('button', { name: 'Select a variant' });
220
+ this.selectAVariantBtn = page.getByRole('button', { name: 'Open version selector' });
218
221
  this.variantAddModeBtn = page.locator('.switch-button.add-mode').locator('.variant-name');
219
222
  this.saveAndCloseBtn = page.getByLabel('Save and close');
220
223
  this.documentTreeItem = page.locator('umb-document-tree-item');
@@ -347,6 +350,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
347
350
  this.styleSelectBtn = page.locator('uui-button[label="Style Select"]');
348
351
  this.cascadingMenuContainer = page.locator('umb-cascading-menu-popover uui-scroll-container');
349
352
  this.modalFormValidationMessage = this.sidebarModal.locator('umb-form-validation-message #messages');
353
+ this.treePickerSearchTxt = this.page.locator('umb-tree-picker-modal #input');
354
+ this.mediaPickerSearchTxt = this.page.locator('umb-media-picker-modal #search #input');
355
+ this.memberPickerSearchTxt = this.page.locator('umb-member-picker-modal #input');
350
356
  }
351
357
  async enterContentName(name) {
352
358
  await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
@@ -844,7 +850,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
844
850
  }
845
851
  async changeDocumentSectionLanguage(newLanguageName) {
846
852
  await this.documentLanguageSelect.click();
847
- const documentSectionLanguageLocator = this.documentLanguageSelectPopover.getByLabel(newLanguageName);
853
+ const documentSectionLanguageLocator = this.documentLanguageSelectPopover.getByText(newLanguageName);
848
854
  await (0, test_1.expect)(documentSectionLanguageLocator).toBeVisible();
849
855
  // Force click is needed
850
856
  await documentSectionLanguageLocator.click({ force: true });
@@ -1421,6 +1427,21 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1421
1427
  async doesModalFormValidationMessageContainText(text) {
1422
1428
  await (0, test_1.expect)(this.modalFormValidationMessage).toContainText(text);
1423
1429
  }
1430
+ async enterSearchKeywordInTreePickerModal(keyword) {
1431
+ await (0, test_1.expect)(this.treePickerSearchTxt).toBeVisible();
1432
+ await this.treePickerSearchTxt.fill(keyword);
1433
+ await this.page.keyboard.press('Enter');
1434
+ }
1435
+ async enterSearchKeywordInMediaPickerModal(keyword) {
1436
+ await (0, test_1.expect)(this.mediaPickerSearchTxt).toBeVisible();
1437
+ await this.mediaPickerSearchTxt.fill(keyword);
1438
+ await this.page.keyboard.press('Enter');
1439
+ }
1440
+ async enterSearchKeywordInMemberPickerModal(keyword) {
1441
+ await (0, test_1.expect)(this.memberPickerSearchTxt).toBeVisible();
1442
+ await this.memberPickerSearchTxt.fill(keyword);
1443
+ await this.page.keyboard.press('Enter');
1444
+ }
1424
1445
  async isContentNameReadOnly() {
1425
1446
  await (0, test_1.expect)(this.contentNameTxt).toHaveAttribute('readonly');
1426
1447
  }