@umbraco/playwright-testhelpers 16.0.14 → 16.0.16
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 +1 -0
- package/dist/lib/helpers/ContentUiHelper.js +8 -5
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +4 -4
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.d.ts +0 -1
- package/dist/lib/helpers/LanguageUiHelper.js +2 -3
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +3 -3
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.d.ts +0 -2
- package/dist/lib/helpers/MemberUiHelper.js +0 -6
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +2 -2
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +2 -2
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +5 -24
- package/dist/lib/helpers/UiBaseLocators.js +28 -90
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -73,6 +73,7 @@ class UiBaseLocators {
|
|
|
73
73
|
aliasNameTxt;
|
|
74
74
|
deleteFolderThreeDotsBtn;
|
|
75
75
|
createLink;
|
|
76
|
+
actionMenucreateBtn;
|
|
76
77
|
insertValueBtn;
|
|
77
78
|
insertPartialViewBtn;
|
|
78
79
|
insertDictionaryItemBtn;
|
|
@@ -145,8 +146,7 @@ class UiBaseLocators {
|
|
|
145
146
|
entityItemRef;
|
|
146
147
|
validationMessage;
|
|
147
148
|
successStateIcon;
|
|
148
|
-
|
|
149
|
-
openEntityAction;
|
|
149
|
+
workspaceAction;
|
|
150
150
|
constructor(page) {
|
|
151
151
|
this.page = page;
|
|
152
152
|
this.saveBtn = page.getByLabel('Save', { exact: true });
|
|
@@ -181,6 +181,7 @@ class UiBaseLocators {
|
|
|
181
181
|
this.renameModalBtn = page.locator('umb-rename-modal').getByLabel('Rename');
|
|
182
182
|
this.createBtn = page.getByRole('button', { name: /^Create(…)?$/ });
|
|
183
183
|
this.actionsMenuContainer = page.locator('uui-scroll-container');
|
|
184
|
+
this.actionMenucreateBtn = this.actionsMenuContainer.getByRole('button', { name: /^Create(…)?$/ });
|
|
184
185
|
this.successState = page.locator('[state="success"]');
|
|
185
186
|
this.chooseModalBtn = this.sidebarModal.locator('[look="primary"]').getByLabel('Choose');
|
|
186
187
|
this.addBtn = page.getByRole('button', { name: 'Add', exact: true });
|
|
@@ -289,18 +290,20 @@ class UiBaseLocators {
|
|
|
289
290
|
this.entityItemRef = this.confirmActionModalEntityReferences.locator('umb-entity-item-ref');
|
|
290
291
|
this.validationMessage = page.locator('umb-form-validation-message').locator('#messages');
|
|
291
292
|
this.successStateIcon = this.successState.locator('#state');
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
this.workspaceAction = page.locator('umb-workspace-action');
|
|
294
|
+
}
|
|
295
|
+
async clickActionsMenuForNameInSectionSidebar(name) {
|
|
296
|
+
await this.sectionSidebar.locator('[label="' + name + '"]').hover();
|
|
297
|
+
await this.sectionSidebar.locator('[label="' + name + '"] >> [label="Open actions menu"]').first().click();
|
|
295
298
|
}
|
|
296
299
|
async clickActionsMenuForName(name) {
|
|
297
|
-
await (0, test_1.expect)(this.page.locator('
|
|
298
|
-
await this.page.locator('
|
|
299
|
-
await this.page.locator('
|
|
300
|
+
await (0, test_1.expect)(this.page.locator('[label="' + name + '"]')).toBeVisible();
|
|
301
|
+
await this.page.locator('[label="' + name + '"]').hover();
|
|
302
|
+
await this.page.locator('[label="' + name + '"] >> [label="Open actions menu"]').first().click();
|
|
300
303
|
}
|
|
301
304
|
async isActionsMenuForNameVisible(name, isVisible = true) {
|
|
302
|
-
await this.page.locator('
|
|
303
|
-
await (0, test_1.expect)(this.page.locator('
|
|
305
|
+
await this.page.locator('[label="' + name + '"]').click();
|
|
306
|
+
await (0, test_1.expect)(this.page.locator('[label="' + name + '"] >> [label="Open actions menu"]')).toBeVisible({ visible: isVisible });
|
|
304
307
|
}
|
|
305
308
|
async clickCaretButtonForName(name) {
|
|
306
309
|
await this.isCaretButtonWithNameVisible(name);
|
|
@@ -317,7 +320,7 @@ class UiBaseLocators {
|
|
|
317
320
|
await (0, test_1.expect)(this.page.getByLabel(treeName, { exact: true })).toBeVisible();
|
|
318
321
|
await this.page.waitForTimeout(500);
|
|
319
322
|
await this.clickActionsMenuForName(treeName);
|
|
320
|
-
await this.
|
|
323
|
+
await this.clickReloadChildrenButton();
|
|
321
324
|
const menuItem = this.page.locator('uui-menu-item[label="' + treeName + '"]');
|
|
322
325
|
const isCaretButtonOpen = await menuItem.getAttribute('show-children');
|
|
323
326
|
if (isCaretButtonOpen === null) {
|
|
@@ -333,12 +336,15 @@ class UiBaseLocators {
|
|
|
333
336
|
await (0, test_1.expect)(this.reloadChildrenBtn).toBeVisible();
|
|
334
337
|
await this.reloadChildrenBtn.click();
|
|
335
338
|
}
|
|
339
|
+
async isSuccessStateVisibleForSaveButton(isVisible = true) {
|
|
340
|
+
const regex = new RegExp(`^workspace-action:.*Save$`);
|
|
341
|
+
const saveButtonLocator = this.page.getByTestId(regex);
|
|
342
|
+
const saveBtn = this.workspaceAction.filter({ has: saveButtonLocator });
|
|
343
|
+
await (0, test_1.expect)(saveBtn.locator(this.successState)).toBeVisible({ visible: isVisible, timeout: 10000 });
|
|
344
|
+
}
|
|
336
345
|
async clickSaveButton() {
|
|
337
|
-
// This wait is necessary to avoid the save button is ignored
|
|
338
|
-
await this.page.waitForTimeout(500);
|
|
339
346
|
await (0, test_1.expect)(this.saveBtn).toBeVisible();
|
|
340
347
|
await this.saveBtn.click();
|
|
341
|
-
await this.page.waitForTimeout(500);
|
|
342
348
|
}
|
|
343
349
|
async clickChooseButton() {
|
|
344
350
|
await (0, test_1.expect)(this.chooseBtn).toBeVisible();
|
|
@@ -501,7 +507,7 @@ class UiBaseLocators {
|
|
|
501
507
|
await ddlOption.click();
|
|
502
508
|
}
|
|
503
509
|
async createFolder(folderName) {
|
|
504
|
-
await this.
|
|
510
|
+
await this.clickActionsMenuCreateButton();
|
|
505
511
|
await this.clickNewFolderThreeDotsButton();
|
|
506
512
|
await this.enterFolderName(folderName);
|
|
507
513
|
await this.clickConfirmCreateFolderButton();
|
|
@@ -526,7 +532,7 @@ class UiBaseLocators {
|
|
|
526
532
|
await (0, test_1.expect)(this.queryBuilderShowCode).toContainText(code, { timeout: 10000 });
|
|
527
533
|
}
|
|
528
534
|
async deleteFolder() {
|
|
529
|
-
await this.
|
|
535
|
+
await this.clickDeleteButton();
|
|
530
536
|
await this.clickConfirmToDeleteButton();
|
|
531
537
|
}
|
|
532
538
|
async clickDeleteExactButton() {
|
|
@@ -589,6 +595,10 @@ class UiBaseLocators {
|
|
|
589
595
|
await (0, test_1.expect)(this.createBtn).toBeVisible();
|
|
590
596
|
await this.createBtn.click();
|
|
591
597
|
}
|
|
598
|
+
async clickActionsMenuCreateButton() {
|
|
599
|
+
await (0, test_1.expect)(this.actionMenucreateBtn).toBeVisible();
|
|
600
|
+
await this.actionMenucreateBtn.click();
|
|
601
|
+
}
|
|
592
602
|
async clickAddButton() {
|
|
593
603
|
await (0, test_1.expect)(this.addBtn).toBeVisible();
|
|
594
604
|
await this.addBtn.click();
|
|
@@ -700,13 +710,12 @@ class UiBaseLocators {
|
|
|
700
710
|
return await (0, test_1.expect)(this.groupLabel).toHaveValue(value);
|
|
701
711
|
}
|
|
702
712
|
async rename(newName) {
|
|
703
|
-
await this.
|
|
713
|
+
await this.clickRenameButton();
|
|
704
714
|
await (0, test_1.expect)(this.newNameTxt).toBeVisible();
|
|
705
715
|
await this.newNameTxt.click();
|
|
706
716
|
await this.newNameTxt.clear();
|
|
707
717
|
await this.newNameTxt.fill(newName);
|
|
708
718
|
await this.renameModalBtn.click();
|
|
709
|
-
await this.page.waitForTimeout(500);
|
|
710
719
|
}
|
|
711
720
|
async isSuccessButtonWithTextVisible(text) {
|
|
712
721
|
return await (0, test_1.expect)(this.successState.filter({ hasText: text })).toBeVisible();
|
|
@@ -768,7 +777,7 @@ class UiBaseLocators {
|
|
|
768
777
|
await this.renameBtn.click();
|
|
769
778
|
}
|
|
770
779
|
async clickDeleteAndConfirmButton() {
|
|
771
|
-
await this.
|
|
780
|
+
await this.clickDeleteButton();
|
|
772
781
|
await this.clickConfirmToDeleteButton();
|
|
773
782
|
}
|
|
774
783
|
async clickDeleteButton() {
|
|
@@ -1039,77 +1048,6 @@ class UiBaseLocators {
|
|
|
1039
1048
|
async isSuccessStateIconVisible() {
|
|
1040
1049
|
await (0, test_1.expect)(this.successStateIcon).toBeVisible();
|
|
1041
1050
|
}
|
|
1042
|
-
// Entity Action
|
|
1043
|
-
async clickEntityActionWithName(name) {
|
|
1044
|
-
const regex = new RegExp(`^entity-action:.*${name}$`);
|
|
1045
|
-
const entityActionLocator = this.openEntityAction.getByTestId(regex).first();
|
|
1046
|
-
await (0, test_1.expect)(entityActionLocator).toBeVisible();
|
|
1047
|
-
await entityActionLocator.click();
|
|
1048
|
-
}
|
|
1049
|
-
async clickCreateActionMenuOption() {
|
|
1050
|
-
await this.clickEntityActionWithName('Create');
|
|
1051
|
-
}
|
|
1052
|
-
async clickTrashActionMenuOption() {
|
|
1053
|
-
await this.clickEntityActionWithName('Trash');
|
|
1054
|
-
}
|
|
1055
|
-
async clickMoveToActionMenuOption() {
|
|
1056
|
-
await this.clickEntityActionWithName('MoveTo');
|
|
1057
|
-
}
|
|
1058
|
-
async clickCreateBlueprintActionMenuOption() {
|
|
1059
|
-
await this.clickEntityActionWithName('CreateBlueprint');
|
|
1060
|
-
}
|
|
1061
|
-
async clickDuplicateToActionMenuOption() {
|
|
1062
|
-
await this.clickEntityActionWithName('DuplicateTo');
|
|
1063
|
-
}
|
|
1064
|
-
async clickPublishActionMenuOption() {
|
|
1065
|
-
await this.clickEntityActionWithName('Publish');
|
|
1066
|
-
}
|
|
1067
|
-
async clickUnpublishActionMenuOption() {
|
|
1068
|
-
await this.clickEntityActionWithName('Unpublish');
|
|
1069
|
-
}
|
|
1070
|
-
async clickRollbackActionMenuOption() {
|
|
1071
|
-
await this.clickEntityActionWithName('Rollback');
|
|
1072
|
-
}
|
|
1073
|
-
async clickCultureAndHostnamesActionMenuOption() {
|
|
1074
|
-
await this.clickEntityActionWithName('CultureAndHostnames');
|
|
1075
|
-
}
|
|
1076
|
-
async clickPublicAccessActionMenuOption() {
|
|
1077
|
-
await this.clickEntityActionWithName('PublicAccess');
|
|
1078
|
-
}
|
|
1079
|
-
async clickSortChildrenActionMenuOption() {
|
|
1080
|
-
await this.clickEntityActionWithName('SortChildrenOf');
|
|
1081
|
-
}
|
|
1082
|
-
async clickNotificationsActionMenuOption() {
|
|
1083
|
-
await this.clickEntityActionWithName('Notifications');
|
|
1084
|
-
}
|
|
1085
|
-
async clickReloadChildrenActionMenuOption() {
|
|
1086
|
-
await this.clickEntityActionWithName('ReloadChildrenOf');
|
|
1087
|
-
}
|
|
1088
|
-
async clickDeleteActionMenuOption() {
|
|
1089
|
-
await this.clickEntityActionWithName('Delete');
|
|
1090
|
-
}
|
|
1091
|
-
async clickRestoreActionMenuOption() {
|
|
1092
|
-
await this.clickEntityActionWithName('Restore');
|
|
1093
|
-
}
|
|
1094
|
-
async clickRenameActionMenuOption() {
|
|
1095
|
-
await this.clickEntityActionWithName('Rename');
|
|
1096
|
-
}
|
|
1097
|
-
async clickCreateOptionsActionMenuOption() {
|
|
1098
|
-
await this.clickEntityActionWithName('CreateOptions');
|
|
1099
|
-
}
|
|
1100
|
-
async clickExportActionMenuOption() {
|
|
1101
|
-
await this.clickEntityActionWithName('Export');
|
|
1102
|
-
}
|
|
1103
|
-
async clickImportActionMenuOption() {
|
|
1104
|
-
await this.clickEntityActionWithName('Import');
|
|
1105
|
-
}
|
|
1106
|
-
async clickUpdateActionMenuOption() {
|
|
1107
|
-
await this.clickEntityActionWithName('Update');
|
|
1108
|
-
}
|
|
1109
|
-
async clickModalMenuItemWithName(name) {
|
|
1110
|
-
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toBeVisible();
|
|
1111
|
-
await this.sidebarModal.locator('uui-menu-item[label="' + name + '"]').click();
|
|
1112
|
-
}
|
|
1113
1051
|
}
|
|
1114
1052
|
exports.UiBaseLocators = UiBaseLocators;
|
|
1115
1053
|
//# sourceMappingURL=UiBaseLocators.js.map
|