@umbraco/playwright-testhelpers 17.0.11 → 17.0.13
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,10 @@ 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;
|
|
178
|
+
private readonly languageToggle;
|
|
179
|
+
private readonly contentVariantDropdown;
|
|
176
180
|
constructor(page: Page);
|
|
177
181
|
enterContentName(name: string): Promise<void>;
|
|
178
182
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -217,6 +221,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
217
221
|
changeTemplate(oldTemplate: string, newTemplate: string): Promise<void>;
|
|
218
222
|
isTemplateNameDisabled(templateName: string): Promise<void>;
|
|
219
223
|
clickCultureAndHostnamesButton(): Promise<void>;
|
|
224
|
+
clickAddNewHostnameButton(): Promise<void>;
|
|
220
225
|
selectCultureLanguageOption(option: string): Promise<void>;
|
|
221
226
|
selectDomainLanguageOption(option: string, index?: number): Promise<void>;
|
|
222
227
|
clickAddNewDomainButton(): Promise<void>;
|
|
@@ -446,4 +451,5 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
446
451
|
chooseTreeMenuItemWithName(name: string, parentNames?: string[]): Promise<void>;
|
|
447
452
|
isChooseButtonVisible(isVisible?: boolean): Promise<void>;
|
|
448
453
|
clickDocumentNotificationOptionWithName(name: string): Promise<void>;
|
|
454
|
+
switchLanguage(languageName: string): Promise<void>;
|
|
449
455
|
}
|
|
@@ -177,6 +177,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
177
177
|
listViewCustomRows;
|
|
178
178
|
collectionMenu;
|
|
179
179
|
entityPickerTree;
|
|
180
|
+
addNewHostnameBtn;
|
|
181
|
+
hostNameItem;
|
|
182
|
+
languageToggle;
|
|
183
|
+
contentVariantDropdown;
|
|
180
184
|
constructor(page) {
|
|
181
185
|
super(page);
|
|
182
186
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -237,14 +241,16 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
237
241
|
this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
|
|
238
242
|
// Culture and Hostname
|
|
239
243
|
this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(…)?$/);
|
|
240
|
-
this.
|
|
244
|
+
this.hostNameItem = page.locator('.hostname-item');
|
|
245
|
+
this.cultureLanguageDropdownBox = this.hostNameItem.locator('[label="Culture"]').getByLabel('combobox-input');
|
|
241
246
|
this.addNewDomainBtn = page.getByLabel('Add new domain');
|
|
242
247
|
this.domainTxt = page.getByLabel('Domain', { exact: true });
|
|
243
|
-
this.domainLanguageDropdownBox =
|
|
248
|
+
this.domainLanguageDropdownBox = this.hostNameItem.locator('[label="Domains"]').getByLabel('combobox-input');
|
|
244
249
|
this.deleteDomainBtn = page.locator('[headline="Domains"] [name="icon-trash"] svg');
|
|
245
250
|
this.domainComboBox = page.locator('#domains uui-combobox');
|
|
246
251
|
this.saveModalBtn = this.sidebarModal.getByLabel('Save', { exact: true });
|
|
247
252
|
this.resetFocalPointBtn = page.getByLabel('Reset focal point');
|
|
253
|
+
this.addNewHostnameBtn = page.getByLabel('Add new hostname');
|
|
248
254
|
// List View
|
|
249
255
|
this.enterNameInContainerTxt = this.container.getByTestId('input:entity-name').locator('#input');
|
|
250
256
|
this.listView = page.locator('umb-document-table-collection-view');
|
|
@@ -362,6 +368,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
362
368
|
// Entity Data Picker
|
|
363
369
|
this.collectionMenu = page.locator('umb-collection-menu');
|
|
364
370
|
this.entityPickerTree = page.locator('umb-tree[alias="Umb.Tree.EntityDataPicker"]');
|
|
371
|
+
this.languageToggle = page.getByTestId('input:entity-name').locator('#toggle');
|
|
372
|
+
this.contentVariantDropdown = page.locator('umb-document-workspace-split-view-variant-selector uui-popover-container #dropdown');
|
|
365
373
|
}
|
|
366
374
|
async enterContentName(name) {
|
|
367
375
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -520,11 +528,15 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
520
528
|
async clickCultureAndHostnamesButton() {
|
|
521
529
|
await this.cultureAndHostnamesBtn.click();
|
|
522
530
|
}
|
|
531
|
+
async clickAddNewHostnameButton() {
|
|
532
|
+
await (0, test_1.expect)(this.addNewHostnameBtn).toBeVisible();
|
|
533
|
+
await this.addNewHostnameBtn.click();
|
|
534
|
+
}
|
|
523
535
|
async selectCultureLanguageOption(option) {
|
|
524
536
|
await (0, test_1.expect)(this.cultureLanguageDropdownBox).toBeVisible();
|
|
525
537
|
await this.cultureLanguageDropdownBox.click();
|
|
526
|
-
await (0, test_1.expect)(this.
|
|
527
|
-
await this.
|
|
538
|
+
await (0, test_1.expect)(this.hostNameItem.getByText(option, { exact: true })).toBeVisible();
|
|
539
|
+
await this.hostNameItem.getByText(option, { exact: true }).click();
|
|
528
540
|
}
|
|
529
541
|
async selectDomainLanguageOption(option, index = 0) {
|
|
530
542
|
await this.domainLanguageDropdownBox.nth(index).click();
|
|
@@ -1529,6 +1541,14 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1529
1541
|
await (0, test_1.expect)(notificationOptionLocator).toBeVisible();
|
|
1530
1542
|
await notificationOptionLocator.click();
|
|
1531
1543
|
}
|
|
1544
|
+
async switchLanguage(languageName) {
|
|
1545
|
+
await (0, test_1.expect)(this.languageToggle).toBeVisible();
|
|
1546
|
+
await this.languageToggle.click();
|
|
1547
|
+
const languageOptionLocator = this.contentVariantDropdown.locator('.culture-variant').filter({ hasText: languageName });
|
|
1548
|
+
await (0, test_1.expect)(languageOptionLocator).toBeVisible();
|
|
1549
|
+
await languageOptionLocator.click();
|
|
1550
|
+
await (0, test_1.expect)(this.languageToggle).toHaveAttribute('selected');
|
|
1551
|
+
}
|
|
1532
1552
|
}
|
|
1533
1553
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1534
1554
|
//# sourceMappingURL=ContentUiHelper.js.map
|