@umbraco/playwright-testhelpers 17.0.12 → 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.
|
@@ -175,6 +175,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
175
175
|
private readonly entityPickerTree;
|
|
176
176
|
private readonly addNewHostnameBtn;
|
|
177
177
|
private readonly hostNameItem;
|
|
178
|
+
private readonly languageToggle;
|
|
179
|
+
private readonly contentVariantDropdown;
|
|
178
180
|
constructor(page: Page);
|
|
179
181
|
enterContentName(name: string): Promise<void>;
|
|
180
182
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -449,4 +451,5 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
449
451
|
chooseTreeMenuItemWithName(name: string, parentNames?: string[]): Promise<void>;
|
|
450
452
|
isChooseButtonVisible(isVisible?: boolean): Promise<void>;
|
|
451
453
|
clickDocumentNotificationOptionWithName(name: string): Promise<void>;
|
|
454
|
+
switchLanguage(languageName: string): Promise<void>;
|
|
452
455
|
}
|
|
@@ -179,6 +179,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
179
179
|
entityPickerTree;
|
|
180
180
|
addNewHostnameBtn;
|
|
181
181
|
hostNameItem;
|
|
182
|
+
languageToggle;
|
|
183
|
+
contentVariantDropdown;
|
|
182
184
|
constructor(page) {
|
|
183
185
|
super(page);
|
|
184
186
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -366,6 +368,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
366
368
|
// Entity Data Picker
|
|
367
369
|
this.collectionMenu = page.locator('umb-collection-menu');
|
|
368
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');
|
|
369
373
|
}
|
|
370
374
|
async enterContentName(name) {
|
|
371
375
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -1537,6 +1541,14 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1537
1541
|
await (0, test_1.expect)(notificationOptionLocator).toBeVisible();
|
|
1538
1542
|
await notificationOptionLocator.click();
|
|
1539
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
|
+
}
|
|
1540
1552
|
}
|
|
1541
1553
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1542
1554
|
//# sourceMappingURL=ContentUiHelper.js.map
|