@umbraco/playwright-testhelpers 17.0.11 → 17.0.12

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.
@@ -173,6 +173,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
173
173
  private readonly listViewCustomRows;
174
174
  private readonly collectionMenu;
175
175
  private readonly entityPickerTree;
176
+ private readonly addNewHostnameBtn;
177
+ private readonly hostNameItem;
176
178
  constructor(page: Page);
177
179
  enterContentName(name: string): Promise<void>;
178
180
  clickSaveAndPublishButton(): Promise<void>;
@@ -217,6 +219,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
217
219
  changeTemplate(oldTemplate: string, newTemplate: string): Promise<void>;
218
220
  isTemplateNameDisabled(templateName: string): Promise<void>;
219
221
  clickCultureAndHostnamesButton(): Promise<void>;
222
+ clickAddNewHostnameButton(): Promise<void>;
220
223
  selectCultureLanguageOption(option: string): Promise<void>;
221
224
  selectDomainLanguageOption(option: string, index?: number): Promise<void>;
222
225
  clickAddNewDomainButton(): Promise<void>;
@@ -177,6 +177,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
177
177
  listViewCustomRows;
178
178
  collectionMenu;
179
179
  entityPickerTree;
180
+ addNewHostnameBtn;
181
+ hostNameItem;
180
182
  constructor(page) {
181
183
  super(page);
182
184
  this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
@@ -237,14 +239,16 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
237
239
  this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
238
240
  // Culture and Hostname
239
241
  this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(…)?$/);
240
- this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
242
+ this.hostNameItem = page.locator('.hostname-item');
243
+ this.cultureLanguageDropdownBox = this.hostNameItem.locator('[label="Culture"]').getByLabel('combobox-input');
241
244
  this.addNewDomainBtn = page.getByLabel('Add new domain');
242
245
  this.domainTxt = page.getByLabel('Domain', { exact: true });
243
- this.domainLanguageDropdownBox = page.locator('[headline="Domains"]').getByLabel('combobox-input');
246
+ this.domainLanguageDropdownBox = this.hostNameItem.locator('[label="Domains"]').getByLabel('combobox-input');
244
247
  this.deleteDomainBtn = page.locator('[headline="Domains"] [name="icon-trash"] svg');
245
248
  this.domainComboBox = page.locator('#domains uui-combobox');
246
249
  this.saveModalBtn = this.sidebarModal.getByLabel('Save', { exact: true });
247
250
  this.resetFocalPointBtn = page.getByLabel('Reset focal point');
251
+ this.addNewHostnameBtn = page.getByLabel('Add new hostname');
248
252
  // List View
249
253
  this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
250
254
  this.listView = page.locator('umb-document-table-collection-view');
@@ -520,11 +524,15 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
520
524
  async clickCultureAndHostnamesButton() {
521
525
  await this.cultureAndHostnamesBtn.click();
522
526
  }
527
+ async clickAddNewHostnameButton() {
528
+ await (0, test_1.expect)(this.addNewHostnameBtn).toBeVisible();
529
+ await this.addNewHostnameBtn.click();
530
+ }
523
531
  async selectCultureLanguageOption(option) {
524
532
  await (0, test_1.expect)(this.cultureLanguageDropdownBox).toBeVisible();
525
533
  await this.cultureLanguageDropdownBox.click();
526
- await (0, test_1.expect)(this.page.getByText(option, { exact: true })).toBeVisible();
527
- await this.page.getByText(option, { exact: true }).click();
534
+ await (0, test_1.expect)(this.hostNameItem.getByText(option, { exact: true })).toBeVisible();
535
+ await this.hostNameItem.getByText(option, { exact: true }).click();
528
536
  }
529
537
  async selectDomainLanguageOption(option, index = 0) {
530
538
  await this.domainLanguageDropdownBox.nth(index).click();