Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions lib/helpers/ContentUiHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export class ContentUiHelper extends UiBaseLocators {
private readonly listViewCustomRows: Locator;
private readonly collectionMenu: Locator;
private readonly entityPickerTree: Locator;
private readonly addNewHostnameBtn: Locator;
private readonly hostNameItem: Locator;

constructor(page: Page) {
super(page);
Expand Down Expand Up @@ -236,14 +238,16 @@ export class ContentUiHelper extends UiBaseLocators {
this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
// Culture and Hostname
this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(…)?$/);
this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
this.hostNameItem = page.locator('.hostname-item');
this.cultureLanguageDropdownBox = this.hostNameItem.locator('[label="Culture"]').getByLabel('combobox-input');
this.addNewDomainBtn = page.getByLabel('Add new domain');
this.domainTxt = page.getByLabel('Domain', {exact: true});
this.domainLanguageDropdownBox = page.locator('[headline="Domains"]').getByLabel('combobox-input');
this.domainLanguageDropdownBox = this.hostNameItem.locator('[label="Domains"]').getByLabel('combobox-input');
this.deleteDomainBtn = page.locator('[headline="Domains"] [name="icon-trash"] svg');
this.domainComboBox = page.locator('#domains uui-combobox');
this.saveModalBtn = this.sidebarModal.getByLabel('Save', {exact: true});
this.resetFocalPointBtn = page.getByLabel('Reset focal point');
this.addNewHostnameBtn = page.getByLabel('Add new hostname');
// List View
this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
this.listView = page.locator('umb-document-table-collection-view');
Expand Down Expand Up @@ -563,12 +567,17 @@ export class ContentUiHelper extends UiBaseLocators {
async clickCultureAndHostnamesButton() {
await this.cultureAndHostnamesBtn.click();
}

async clickAddNewHostnameButton(){
await expect(this.addNewHostnameBtn).toBeVisible();
await this.addNewHostnameBtn.click();
}

async selectCultureLanguageOption(option: string) {
await expect(this.cultureLanguageDropdownBox).toBeVisible();
await this.cultureLanguageDropdownBox.click();
await expect(this.page.getByText(option, {exact: true})).toBeVisible();
await this.page.getByText(option, {exact: true}).click();
await expect(this.hostNameItem.getByText(option, {exact: true})).toBeVisible();
await this.hostNameItem.getByText(option, {exact: true}).click();
}

async selectDomainLanguageOption(option: string, index: number = 0) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@umbraco/playwright-testhelpers",
"version": "17.0.11",
"version": "17.0.12",
"description": "Test helpers for making playwright tests for Umbraco solutions",
"main": "dist/lib/index.js",
"files": [
Expand Down