@umbraco/playwright-testhelpers 17.0.0-beta.5 → 17.0.0-beta.6
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.
- package/dist/lib/helpers/ContentUiHelper.d.ts +0 -3
- package/dist/lib/helpers/ContentUiHelper.js +3 -11
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +1 -0
- package/dist/lib/helpers/UiBaseLocators.js +7 -5
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -148,6 +148,7 @@ export declare class UiBaseLocators {
|
|
|
148
148
|
readonly workspaceActionMenuBtn: Locator;
|
|
149
149
|
readonly monacoEditor: Locator;
|
|
150
150
|
readonly createNewDocumentBlueprintBtn: Locator;
|
|
151
|
+
readonly openedModal: Locator;
|
|
151
152
|
constructor(page: Page);
|
|
152
153
|
clickActionsMenuForNameInSectionSidebar(name: string): Promise<void>;
|
|
153
154
|
clickActionsMenuForName(name: string): Promise<void>;
|
|
@@ -152,6 +152,7 @@ class UiBaseLocators {
|
|
|
152
152
|
workspaceActionMenuBtn;
|
|
153
153
|
monacoEditor;
|
|
154
154
|
createNewDocumentBlueprintBtn;
|
|
155
|
+
openedModal;
|
|
155
156
|
constructor(page) {
|
|
156
157
|
this.page = page;
|
|
157
158
|
this.saveBtn = page.getByLabel('Save', { exact: true });
|
|
@@ -292,8 +293,8 @@ class UiBaseLocators {
|
|
|
292
293
|
this.folderBtn = this.createOptionActionListModal.locator('[name="Folder"]');
|
|
293
294
|
this.reloadChildrenBtn = page.getByRole('button', { name: 'Reload children' });
|
|
294
295
|
this.confirmActionModalEntityReferences = page.locator('umb-confirm-action-modal-entity-references,umb-confirm-bulk-action-modal-entity-references');
|
|
295
|
-
this.referenceHeadline = this.confirmActionModalEntityReferences.locator('#reference-headline');
|
|
296
|
-
this.entityItemRef = this.confirmActionModalEntityReferences.locator('
|
|
296
|
+
this.referenceHeadline = this.confirmActionModalEntityReferences.locator('#reference-headline').first();
|
|
297
|
+
this.entityItemRef = this.confirmActionModalEntityReferences.locator('uui-ref-list').first().getByTestId('entity-item-ref');
|
|
297
298
|
this.validationMessage = page.locator('umb-form-validation-message').locator('#messages');
|
|
298
299
|
this.successStateIcon = this.successState.locator('#state');
|
|
299
300
|
this.workspaceAction = page.locator('umb-workspace-action');
|
|
@@ -304,6 +305,7 @@ class UiBaseLocators {
|
|
|
304
305
|
// Workspace Entity Action
|
|
305
306
|
this.workspaceActionMenuBtn = page.getByTestId('workspace:action-menu-button');
|
|
306
307
|
this.monacoEditor = page.locator('.monaco-editor');
|
|
308
|
+
this.openedModal = page.locator('uui-modal-container[backdrop]');
|
|
307
309
|
}
|
|
308
310
|
async clickActionsMenuForNameInSectionSidebar(name) {
|
|
309
311
|
await this.sectionSidebar.locator('[label="' + name + '"]').hover();
|
|
@@ -1082,7 +1084,7 @@ class UiBaseLocators {
|
|
|
1082
1084
|
await this.folderBtn.click();
|
|
1083
1085
|
}
|
|
1084
1086
|
async doesReferenceHeadlineHaveText(text) {
|
|
1085
|
-
await (0, test_1.expect)(this.referenceHeadline).
|
|
1087
|
+
await (0, test_1.expect)(this.referenceHeadline).toContainText(text);
|
|
1086
1088
|
}
|
|
1087
1089
|
async isReferenceHeadlineVisible(isVisible) {
|
|
1088
1090
|
await (0, test_1.expect)(this.referenceHeadline).toBeVisible({ visible: isVisible });
|
|
@@ -1176,8 +1178,8 @@ class UiBaseLocators {
|
|
|
1176
1178
|
await this.clickEntityActionWithName('Update');
|
|
1177
1179
|
}
|
|
1178
1180
|
async clickModalMenuItemWithName(name) {
|
|
1179
|
-
await (0, test_1.expect)(this.
|
|
1180
|
-
await this.
|
|
1181
|
+
await (0, test_1.expect)(this.openedModal.locator('uui-menu-item[label="' + name + '"]')).toBeVisible();
|
|
1182
|
+
await this.openedModal.locator('uui-menu-item[label="' + name + '"]').click();
|
|
1181
1183
|
}
|
|
1182
1184
|
async isModalMenuItemWithNameDisabled(name) {
|
|
1183
1185
|
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toHaveAttribute('disabled');
|