Skip to content

Commit 2aae4c7

Browse files
authored
Merge pull request #335 from umbraco/v17/update/to-match-frontend-changes-for-domain
V17 updated to match frontend changes for domain
1 parent e6231a8 commit 2aae4c7

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

lib/helpers/ContentUiHelper.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ export class ContentUiHelper extends UiBaseLocators {
175175
private readonly listViewCustomRows: Locator;
176176
private readonly collectionMenu: Locator;
177177
private readonly entityPickerTree: Locator;
178+
private readonly addNewHostnameBtn: Locator;
179+
private readonly hostNameItem: Locator;
178180

179181
constructor(page: Page) {
180182
super(page);
@@ -236,14 +238,16 @@ export class ContentUiHelper extends UiBaseLocators {
236238
this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
237239
// Culture and Hostname
238240
this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames()?$/);
239-
this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
241+
this.hostNameItem = page.locator('.hostname-item');
242+
this.cultureLanguageDropdownBox = this.hostNameItem.locator('[label="Culture"]').getByLabel('combobox-input');
240243
this.addNewDomainBtn = page.getByLabel('Add new domain');
241244
this.domainTxt = page.getByLabel('Domain', {exact: true});
242-
this.domainLanguageDropdownBox = page.locator('[headline="Domains"]').getByLabel('combobox-input');
245+
this.domainLanguageDropdownBox = this.hostNameItem.locator('[label="Domains"]').getByLabel('combobox-input');
243246
this.deleteDomainBtn = page.locator('[headline="Domains"] [name="icon-trash"] svg');
244247
this.domainComboBox = page.locator('#domains uui-combobox');
245248
this.saveModalBtn = this.sidebarModal.getByLabel('Save', {exact: true});
246249
this.resetFocalPointBtn = page.getByLabel('Reset focal point');
250+
this.addNewHostnameBtn = page.getByLabel('Add new hostname');
247251
// List View
248252
this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
249253
this.listView = page.locator('umb-document-table-collection-view');
@@ -563,12 +567,17 @@ export class ContentUiHelper extends UiBaseLocators {
563567
async clickCultureAndHostnamesButton() {
564568
await this.cultureAndHostnamesBtn.click();
565569
}
570+
571+
async clickAddNewHostnameButton(){
572+
await expect(this.addNewHostnameBtn).toBeVisible();
573+
await this.addNewHostnameBtn.click();
574+
}
566575

567576
async selectCultureLanguageOption(option: string) {
568577
await expect(this.cultureLanguageDropdownBox).toBeVisible();
569578
await this.cultureLanguageDropdownBox.click();
570-
await expect(this.page.getByText(option, {exact: true})).toBeVisible();
571-
await this.page.getByText(option, {exact: true}).click();
579+
await expect(this.hostNameItem.getByText(option, {exact: true})).toBeVisible();
580+
await this.hostNameItem.getByText(option, {exact: true}).click();
572581
}
573582

574583
async selectDomainLanguageOption(option: string, index: number = 0) {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@umbraco/playwright-testhelpers",
3-
"version": "17.0.11",
3+
"version": "17.0.12",
44
"description": "Test helpers for making playwright tests for Umbraco solutions",
55
"main": "dist/lib/index.js",
66
"files": [

0 commit comments

Comments
 (0)