@umbraco/playwright-testhelpers 17.0.19 → 17.1.0-beta.1
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/BasePage.d.ts +447 -0
- package/dist/lib/helpers/BasePage.js +543 -0
- package/dist/lib/helpers/BasePage.js.map +1 -0
- package/dist/lib/helpers/ConstantHelper.d.ts +17 -0
- package/dist/lib/helpers/ConstantHelper.js +17 -0
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentRenderUiHelper.js +3 -3
- package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +0 -6
- package/dist/lib/helpers/ContentUiHelper.js +333 -495
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +4 -10
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +189 -328
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +16 -21
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +7 -8
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +1 -4
- package/dist/lib/helpers/DocumentTypeApiHelper.js +1 -121
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +18 -33
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ExamineManagementUiHelper.js +4 -4
- package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/FormsUiHelper.js +119 -158
- package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
- package/dist/lib/helpers/HealthCheckUiHelper.js +3 -3
- package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.js +15 -17
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LogViewerUiHelper.js +21 -30
- package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginUiHelper.js +5 -7
- package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeUiHelper.js +11 -17
- package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +34 -43
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +12 -15
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberTypeUiHelper.js +2 -3
- package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.js +24 -42
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/ModelsBuilderUiHelper.js +2 -3
- package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
- package/dist/lib/helpers/PackageUiHelper.js +29 -34
- package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +13 -15
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js +2 -4
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/lib/helpers/PublishedStatusUiHelper.js +6 -6
- package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementUiHelper.js +7 -12
- package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +12 -14
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +8 -11
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +8 -12
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/TelemetryDataUiHelper.js +2 -3
- package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateUiHelper.js +17 -22
- package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +230 -228
- package/dist/lib/helpers/UiBaseLocators.js +832 -869
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +27 -44
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.js +43 -46
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/lib/helpers/WebhookUiHelper.js +11 -27
- package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +4 -9
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +5 -10
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
- package/dist/lib/helpers/index.d.ts +1 -0
- package/dist/lib/helpers/index.js +3 -1
- package/dist/lib/helpers/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,586 +3,563 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UiBaseLocators = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const ConstantHelper_1 = require("./ConstantHelper");
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const BasePage_1 = require("./BasePage");
|
|
7
|
+
class UiBaseLocators extends BasePage_1.BasePage {
|
|
8
|
+
// Core Action Buttons
|
|
8
9
|
saveBtn;
|
|
9
|
-
chooseBtn;
|
|
10
10
|
submitBtn;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
confirmBtn;
|
|
12
|
+
chooseBtn;
|
|
13
|
+
chooseModalBtn;
|
|
14
|
+
createBtn;
|
|
15
|
+
addBtn;
|
|
16
|
+
updateBtn;
|
|
17
|
+
changeBtn;
|
|
18
|
+
deleteBtn;
|
|
14
19
|
deleteExactBtn;
|
|
15
|
-
|
|
20
|
+
removeExactBtn;
|
|
16
21
|
insertBtn;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
renameBtn;
|
|
23
|
+
reloadBtn;
|
|
24
|
+
reloadChildrenBtn;
|
|
25
|
+
restoreBtn;
|
|
26
|
+
disableBtn;
|
|
27
|
+
enableBtn;
|
|
28
|
+
actionBtn;
|
|
29
|
+
nextBtn;
|
|
30
|
+
// Confirmation Buttons
|
|
31
|
+
confirmToDeleteBtn;
|
|
32
|
+
confirmCreateFolderBtn;
|
|
33
|
+
confirmToRemoveBtn;
|
|
34
|
+
confirmToSubmitBtn;
|
|
35
|
+
confirmDisableBtn;
|
|
36
|
+
confirmEnableBtn;
|
|
37
|
+
confirmRenameBtn;
|
|
38
|
+
confirmTrashBtn;
|
|
39
|
+
// Folder Management
|
|
40
|
+
createFolderBtn;
|
|
21
41
|
folderNameTxt;
|
|
22
|
-
|
|
23
|
-
wherePropertyAliasBtn;
|
|
24
|
-
whereOperatorBtn;
|
|
25
|
-
whereConstrainValueTxt;
|
|
26
|
-
orderByPropertyAliasBtn;
|
|
27
|
-
ascendingBtn;
|
|
28
|
-
queryBuilderShowCode;
|
|
29
|
-
createThreeDotsBtn;
|
|
42
|
+
folderBtn;
|
|
30
43
|
newFolderThreeDotsBtn;
|
|
31
|
-
renameThreeDotsBtn;
|
|
32
|
-
newNameTxt;
|
|
33
|
-
renameModalBtn;
|
|
34
|
-
createBtn;
|
|
35
|
-
successState;
|
|
36
|
-
chooseModalBtn;
|
|
37
|
-
addBtn;
|
|
38
44
|
renameFolderThreeDotsBtn;
|
|
39
45
|
renameFolderBtn;
|
|
40
46
|
updateFolderBtn;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
deleteFolderThreeDotsBtn;
|
|
48
|
+
// Navigation & Menu
|
|
49
|
+
breadcrumbBtn;
|
|
50
|
+
leftArrowBtn;
|
|
51
|
+
caretBtn;
|
|
52
|
+
modalCaretBtn;
|
|
53
|
+
backOfficeHeader;
|
|
54
|
+
backOfficeMain;
|
|
55
|
+
sectionLinks;
|
|
56
|
+
sectionSidebar;
|
|
57
|
+
menuItem;
|
|
58
|
+
actionsMenuContainer;
|
|
59
|
+
treeItem;
|
|
60
|
+
// Three Dots Menu Buttons
|
|
61
|
+
createThreeDotsBtn;
|
|
62
|
+
renameThreeDotsBtn;
|
|
63
|
+
deleteThreeDotsBtn;
|
|
64
|
+
// Modal & Container
|
|
65
|
+
sidebarModal;
|
|
66
|
+
openedModal;
|
|
67
|
+
container;
|
|
68
|
+
containerChooseBtn;
|
|
69
|
+
containerSaveAndPublishBtn;
|
|
70
|
+
createModalBtn;
|
|
71
|
+
// Document Type & Property Editor
|
|
72
|
+
documentTypeNode;
|
|
44
73
|
propertyNameTxt;
|
|
45
74
|
selectPropertyEditorBtn;
|
|
75
|
+
editorSettingsBtn;
|
|
76
|
+
enterPropertyEditorDescriptionTxt;
|
|
77
|
+
property;
|
|
78
|
+
addPropertyBtn;
|
|
79
|
+
labelAboveBtn;
|
|
80
|
+
// Group & Tab Management
|
|
46
81
|
addGroupBtn;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
compositionsBtn;
|
|
82
|
+
groupLabel;
|
|
83
|
+
typeGroups;
|
|
50
84
|
addTabBtn;
|
|
51
|
-
|
|
52
|
-
|
|
85
|
+
unnamedTabTxt;
|
|
86
|
+
structureTabBtn;
|
|
87
|
+
// Validation & Mandatory
|
|
53
88
|
mandatoryToggle;
|
|
54
89
|
validation;
|
|
55
90
|
regexTxt;
|
|
56
91
|
regexMessageTxt;
|
|
57
|
-
|
|
92
|
+
validationMessage;
|
|
93
|
+
// Composition & Structure
|
|
94
|
+
compositionsBtn;
|
|
58
95
|
allowAtRootBtn;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
96
|
+
allowedChildNodesModal;
|
|
97
|
+
addCollectionBtn;
|
|
98
|
+
// Reorder
|
|
99
|
+
iAmDoneReorderingBtn;
|
|
100
|
+
reorderBtn;
|
|
101
|
+
// Query Builder
|
|
102
|
+
queryBuilderBtn;
|
|
103
|
+
queryBuilderOrderedBy;
|
|
104
|
+
queryBuilderCreateDate;
|
|
105
|
+
queryBuilderShowCode;
|
|
106
|
+
wherePropertyAliasBtn;
|
|
107
|
+
whereOperatorBtn;
|
|
108
|
+
whereConstrainValueTxt;
|
|
109
|
+
orderByPropertyAliasBtn;
|
|
110
|
+
ascendingBtn;
|
|
111
|
+
chooseRootContentBtn;
|
|
112
|
+
returnedItemsCount;
|
|
113
|
+
queryResults;
|
|
114
|
+
// Insert & Template
|
|
76
115
|
insertValueBtn;
|
|
77
116
|
insertPartialViewBtn;
|
|
78
117
|
insertDictionaryItemBtn;
|
|
79
118
|
chooseFieldDropDown;
|
|
80
119
|
systemFieldsOption;
|
|
81
120
|
chooseFieldValueDropDown;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
typeGroups;
|
|
90
|
-
allowedChildNodesModal;
|
|
91
|
-
addCollectionBtn;
|
|
92
|
-
errorNotification;
|
|
93
|
-
confirmRenameBtn;
|
|
94
|
-
successNotification;
|
|
95
|
-
leftArrowBtn;
|
|
96
|
-
clickToUploadBtn;
|
|
97
|
-
backOfficeHeader;
|
|
121
|
+
breadcrumbsTemplateModal;
|
|
122
|
+
// Rename
|
|
123
|
+
newNameTxt;
|
|
124
|
+
renameModalBtn;
|
|
125
|
+
// State & Notification
|
|
126
|
+
successState;
|
|
127
|
+
successStateIcon;
|
|
98
128
|
failedStateButton;
|
|
99
|
-
|
|
129
|
+
successNotification;
|
|
130
|
+
errorNotification;
|
|
131
|
+
// Search & Filter
|
|
132
|
+
typeToFilterSearchTxt;
|
|
133
|
+
filterChooseBtn;
|
|
134
|
+
// Text Input
|
|
135
|
+
textAreaInputArea;
|
|
100
136
|
enterAName;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
137
|
+
descriptionBtn;
|
|
138
|
+
enterDescriptionTxt;
|
|
139
|
+
aliasLockBtn;
|
|
140
|
+
aliasNameTxt;
|
|
141
|
+
// Icon
|
|
142
|
+
iconBtn;
|
|
143
|
+
// Create Link
|
|
144
|
+
createLink;
|
|
145
|
+
// Recycle Bin
|
|
109
146
|
recycleBinBtn;
|
|
110
|
-
recycleBinMenuItemCaretBtn;
|
|
111
147
|
recycleBinMenuItem;
|
|
148
|
+
recycleBinMenuItemCaretBtn;
|
|
149
|
+
// View Options
|
|
112
150
|
gridBtn;
|
|
113
151
|
listBtn;
|
|
114
152
|
viewBundleBtn;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
container;
|
|
118
|
-
createDocumentBlueprintBtn;
|
|
119
|
-
actionBtn;
|
|
153
|
+
// Media
|
|
154
|
+
mediaCardItems;
|
|
120
155
|
mediaPickerModalSubmitBtn;
|
|
121
|
-
deleteBtn;
|
|
122
|
-
createModalBtn;
|
|
123
156
|
mediaCaptionAltTextModalSubmitBtn;
|
|
157
|
+
clickToUploadBtn;
|
|
158
|
+
inputDropzone;
|
|
159
|
+
imageCropperField;
|
|
160
|
+
inputUploadField;
|
|
161
|
+
chooseMediaInputBtn;
|
|
162
|
+
// Embedded Media
|
|
124
163
|
embeddedMediaModal;
|
|
125
164
|
embeddedURLTxt;
|
|
126
165
|
embeddedRetrieveBtn;
|
|
127
166
|
embeddedMediaModalConfirmBtn;
|
|
128
167
|
embeddedPreview;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
168
|
+
// Document & Content
|
|
169
|
+
chooseDocumentInputBtn;
|
|
170
|
+
createDocumentBlueprintBtn;
|
|
171
|
+
createDocumentBlueprintModal;
|
|
172
|
+
createNewDocumentBlueprintBtn;
|
|
173
|
+
// User
|
|
133
174
|
currentUserAvatarBtn;
|
|
134
175
|
newPasswordTxt;
|
|
135
176
|
confirmPasswordTxt;
|
|
136
177
|
currentPasswordTxt;
|
|
137
|
-
|
|
178
|
+
// Collection & Table
|
|
179
|
+
collectionTreeItemTableRow;
|
|
138
180
|
createActionButtonCollection;
|
|
139
181
|
createActionBtn;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
reloadChildrenBtn;
|
|
182
|
+
createOptionActionListModal;
|
|
183
|
+
// Reference & Entity
|
|
143
184
|
confirmActionModalEntityReferences;
|
|
144
185
|
referenceHeadline;
|
|
145
186
|
entityItemRef;
|
|
146
|
-
|
|
147
|
-
|
|
187
|
+
entityItem;
|
|
188
|
+
// Workspace & Action
|
|
148
189
|
workspaceAction;
|
|
190
|
+
workspaceActionMenuBtn;
|
|
149
191
|
entityAction;
|
|
150
192
|
openEntityAction;
|
|
151
|
-
|
|
152
|
-
workspaceActionMenuBtn;
|
|
153
|
-
monacoEditor;
|
|
154
|
-
createNewDocumentBlueprintBtn;
|
|
155
|
-
openedModal;
|
|
156
|
-
uiLoader;
|
|
157
|
-
createDocumentBlueprintModal;
|
|
158
|
-
inputDropzone;
|
|
159
|
-
imageCropperField;
|
|
160
|
-
inputUploadField;
|
|
161
|
-
entityItem;
|
|
162
|
-
sectionLinks;
|
|
163
|
-
restoreBtn;
|
|
164
|
-
backOfficeMain;
|
|
193
|
+
// Pagination
|
|
165
194
|
firstPaginationBtn;
|
|
166
195
|
nextPaginationBtn;
|
|
167
|
-
|
|
196
|
+
// Editor
|
|
197
|
+
monacoEditor;
|
|
198
|
+
// Loader
|
|
199
|
+
uiLoader;
|
|
168
200
|
constructor(page) {
|
|
169
|
-
|
|
201
|
+
super(page);
|
|
202
|
+
// Core Action Buttons
|
|
170
203
|
this.saveBtn = page.getByLabel('Save', { exact: true });
|
|
171
204
|
this.submitBtn = page.getByLabel('Submit');
|
|
205
|
+
this.confirmBtn = page.getByLabel('Confirm');
|
|
206
|
+
this.chooseBtn = page.getByLabel('Choose', { exact: true });
|
|
207
|
+
this.chooseModalBtn = page.locator('uui-modal-sidebar').locator('[look="primary"]').getByLabel('Choose');
|
|
208
|
+
this.createBtn = page.getByRole('button', { name: /^Create(…)?$/ });
|
|
209
|
+
this.addBtn = page.getByRole('button', { name: 'Add', exact: true });
|
|
210
|
+
this.updateBtn = page.getByLabel('Update');
|
|
211
|
+
this.changeBtn = page.getByLabel('Change');
|
|
212
|
+
this.deleteBtn = page.getByRole('button', { name: /^Delete(…)?$/ });
|
|
172
213
|
this.deleteExactBtn = page.getByRole('button', { name: 'Delete', exact: true });
|
|
214
|
+
this.removeExactBtn = page.getByLabel('Remove', { exact: true });
|
|
215
|
+
this.insertBtn = page.locator('uui-box uui-button').filter({ hasText: 'Insert' });
|
|
216
|
+
this.renameBtn = page.getByRole('button', { name: /^Rename(…)?$/ });
|
|
217
|
+
this.reloadBtn = page.getByRole('button', { name: 'Reload', exact: true });
|
|
218
|
+
this.reloadChildrenBtn = page.getByRole('button', { name: 'Reload children' });
|
|
219
|
+
this.restoreBtn = page.getByLabel('Restore', { exact: true });
|
|
220
|
+
this.disableBtn = page.getByLabel('Disable', { exact: true });
|
|
221
|
+
this.enableBtn = page.getByLabel('Enable');
|
|
222
|
+
this.actionBtn = page.getByTestId('workspace:action-menu-button');
|
|
223
|
+
this.nextBtn = page.getByLabel('Next');
|
|
224
|
+
// Confirmation Buttons
|
|
173
225
|
this.confirmToDeleteBtn = page.locator('#confirm').getByLabel('Delete');
|
|
174
226
|
this.confirmCreateFolderBtn = page.locator('#confirm').getByLabel('Create Folder');
|
|
175
|
-
this.
|
|
227
|
+
this.confirmToRemoveBtn = page.locator('#confirm').getByLabel('Remove');
|
|
228
|
+
this.confirmToSubmitBtn = page.locator('#confirm').getByLabel('Submit');
|
|
229
|
+
this.confirmDisableBtn = page.locator('#confirm').getByLabel('Disable');
|
|
230
|
+
this.confirmEnableBtn = page.locator('#confirm').getByLabel('Enable');
|
|
231
|
+
this.confirmRenameBtn = page.locator('#confirm').getByLabel('Rename');
|
|
232
|
+
this.confirmTrashBtn = page.locator('#confirm').getByLabel('Trash');
|
|
233
|
+
// Folder Management
|
|
176
234
|
this.createFolderBtn = page.getByLabel('Create folder');
|
|
177
|
-
this.insertBtn = page.locator('uui-box uui-button').filter({ hasText: 'Insert' });
|
|
178
|
-
this.sidebarModal = page.locator('uui-modal-sidebar');
|
|
179
|
-
this.modalCaretBtn = this.sidebarModal.locator('#caret-button');
|
|
180
|
-
this.enterAName = page.getByLabel('Enter a name...', { exact: true });
|
|
181
|
-
this.queryBuilderBtn = page.locator('#query-builder-button');
|
|
182
|
-
this.queryBuilderOrderedBy = page.locator('#property-alias-dropdown').getByLabel('Property alias');
|
|
183
|
-
this.queryBuilderCreateDate = page.locator('#property-alias-dropdown').getByText('CreateDate').locator("..");
|
|
184
235
|
this.folderNameTxt = page.getByLabel('Enter a folder name');
|
|
185
|
-
this.
|
|
186
|
-
this.wherePropertyAliasBtn = page.locator('#property-alias-dropdown');
|
|
187
|
-
this.whereOperatorBtn = page.locator('#operator-dropdown');
|
|
188
|
-
this.whereConstrainValueTxt = page.getByLabel('constrain value');
|
|
189
|
-
this.orderByPropertyAliasBtn = page.locator('#sort-dropdown');
|
|
190
|
-
this.ascendingBtn = page.locator('[key="template_ascending"]');
|
|
191
|
-
this.queryBuilderShowCode = page.locator('umb-code-block');
|
|
192
|
-
this.createThreeDotsBtn = page.getByText('Create…', { exact: true });
|
|
193
|
-
this.chooseBtn = page.getByLabel('Choose', { exact: true });
|
|
194
|
-
this.containerChooseBtn = page.locator('#container').getByLabel('Choose');
|
|
195
|
-
this.containerSaveAndPublishBtn = page.locator('#container').getByLabel('Save and Publish');
|
|
236
|
+
this.folderBtn = page.locator('umb-entity-create-option-action-list-modal').locator('umb-ref-item', { hasText: 'Folder' });
|
|
196
237
|
this.newFolderThreeDotsBtn = page.getByLabel('New Folder…');
|
|
197
|
-
this.renameThreeDotsBtn = page.getByLabel('Rename…', { exact: true });
|
|
198
|
-
this.newNameTxt = page.getByRole('textbox', { name: 'Enter new name...' });
|
|
199
|
-
this.renameModalBtn = page.locator('umb-rename-modal').getByLabel('Rename');
|
|
200
|
-
this.createBtn = page.getByRole('button', { name: /^Create(…)?$/ });
|
|
201
|
-
this.actionsMenuContainer = page.locator('uui-scroll-container');
|
|
202
|
-
this.successState = page.locator('[state="success"]');
|
|
203
|
-
this.chooseModalBtn = this.sidebarModal.locator('[look="primary"]').getByLabel('Choose');
|
|
204
|
-
this.addBtn = page.getByRole('button', { name: 'Add', exact: true });
|
|
205
238
|
this.renameFolderThreeDotsBtn = page.getByRole('button', { name: 'Rename folder…' });
|
|
206
239
|
this.renameFolderBtn = page.getByLabel('Rename folder');
|
|
207
|
-
this.confirmRenameBtn = page.locator('#confirm').getByLabel('Rename');
|
|
208
240
|
this.updateFolderBtn = page.getByLabel('Update folder');
|
|
209
|
-
this.
|
|
210
|
-
|
|
211
|
-
this.
|
|
241
|
+
this.deleteFolderThreeDotsBtn = page.locator('#action-modal').getByLabel('Delete Folder...');
|
|
242
|
+
// Navigation & Menu
|
|
243
|
+
this.breadcrumbBtn = page.getByLabel('Breadcrumb');
|
|
244
|
+
this.leftArrowBtn = page.locator('[name="icon-arrow-left"] svg');
|
|
245
|
+
this.caretBtn = page.locator('#caret-button');
|
|
246
|
+
this.modalCaretBtn = page.locator('uui-modal-sidebar').locator('#caret-button');
|
|
247
|
+
this.backOfficeHeader = page.locator('umb-backoffice-header');
|
|
248
|
+
this.backOfficeMain = page.locator('umb-backoffice-main');
|
|
249
|
+
this.sectionLinks = page.getByTestId('section-links');
|
|
250
|
+
this.sectionSidebar = page.locator('umb-section-sidebar');
|
|
251
|
+
this.menuItem = page.locator('uui-menu-item');
|
|
252
|
+
this.actionsMenuContainer = page.locator('uui-scroll-container');
|
|
253
|
+
this.treeItem = page.locator('umb-tree-item');
|
|
254
|
+
// Three Dots Menu Buttons
|
|
255
|
+
this.createThreeDotsBtn = page.getByText('Create…', { exact: true });
|
|
256
|
+
this.renameThreeDotsBtn = page.getByLabel('Rename…', { exact: true });
|
|
257
|
+
this.deleteThreeDotsBtn = page.getByLabel('Delete…');
|
|
258
|
+
// Modal & Container
|
|
259
|
+
this.sidebarModal = page.locator('uui-modal-sidebar');
|
|
260
|
+
this.openedModal = page.locator('uui-modal-container[backdrop]');
|
|
261
|
+
this.container = page.locator('#container');
|
|
262
|
+
this.containerChooseBtn = page.locator('#container').getByLabel('Choose');
|
|
263
|
+
this.containerSaveAndPublishBtn = page.locator('#container').getByLabel('Save and Publish');
|
|
264
|
+
this.createModalBtn = page.locator('uui-modal-sidebar').getByLabel('Create', { exact: true });
|
|
265
|
+
// Document Type & Property Editor
|
|
266
|
+
this.documentTypeNode = page.locator('uui-ref-node-document-type');
|
|
212
267
|
this.propertyNameTxt = page.getByTestId('input:entity-name').locator('#input').first();
|
|
213
268
|
this.selectPropertyEditorBtn = page.getByLabel('Select Property Editor');
|
|
269
|
+
this.editorSettingsBtn = page.getByLabel('Editor settings');
|
|
270
|
+
this.enterPropertyEditorDescriptionTxt = page.locator('uui-modal-sidebar').getByTestId('input:entity-description').locator('#textarea');
|
|
271
|
+
this.property = page.locator('umb-property');
|
|
272
|
+
this.addPropertyBtn = page.getByLabel('Add property', { exact: true });
|
|
273
|
+
this.labelAboveBtn = page.locator('.appearance-option').filter({ hasText: 'Label above' });
|
|
274
|
+
// Group & Tab Management
|
|
214
275
|
this.addGroupBtn = page.getByLabel('Add group', { exact: true });
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
217
|
-
this.compositionsBtn = page.getByLabel('Compositions');
|
|
276
|
+
this.groupLabel = page.getByLabel('Group', { exact: true });
|
|
277
|
+
this.typeGroups = page.locator('umb-content-type-design-editor-group');
|
|
218
278
|
this.addTabBtn = page.getByLabel('Add tab');
|
|
219
|
-
this.
|
|
220
|
-
this.
|
|
279
|
+
this.unnamedTabTxt = page.getByTestId('tab:').getByTestId('tab:name-input').locator('#input');
|
|
280
|
+
this.structureTabBtn = page.locator('uui-tab').filter({ hasText: 'Structure' }).locator('svg');
|
|
281
|
+
// Validation & Mandatory
|
|
221
282
|
this.mandatoryToggle = page.locator('#mandatory #toggle');
|
|
222
283
|
this.validation = page.locator('#native');
|
|
223
284
|
this.regexTxt = page.locator('input[name="pattern"]');
|
|
224
285
|
this.regexMessageTxt = page.locator('textarea[name="pattern-message"]');
|
|
225
|
-
this.
|
|
286
|
+
this.validationMessage = page.locator('umb-form-validation-message').locator('#messages');
|
|
287
|
+
// Composition & Structure
|
|
288
|
+
this.compositionsBtn = page.getByLabel('Compositions');
|
|
226
289
|
this.allowAtRootBtn = page.locator('label').filter({ hasText: 'Allow at root' });
|
|
227
|
-
this.
|
|
228
|
-
this.
|
|
229
|
-
|
|
230
|
-
this.
|
|
231
|
-
this.
|
|
232
|
-
|
|
233
|
-
this.
|
|
234
|
-
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
237
|
-
this.
|
|
238
|
-
this.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
241
|
-
this.
|
|
242
|
-
this.
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
245
|
-
|
|
246
|
-
this.aliasNameTxt = page.locator('#name').getByLabel('alias');
|
|
247
|
-
this.deleteFolderThreeDotsBtn = page.locator('#action-modal').getByLabel('Delete Folder...');
|
|
248
|
-
this.createLink = page.getByRole('link', { name: 'Create', exact: true });
|
|
290
|
+
this.allowedChildNodesModal = page.locator('umb-tree-picker-modal');
|
|
291
|
+
this.addCollectionBtn = page.locator('umb-input-content-type-collection-configuration #create-button');
|
|
292
|
+
// Reorder
|
|
293
|
+
this.iAmDoneReorderingBtn = page.getByLabel('I am done reordering');
|
|
294
|
+
this.reorderBtn = page.getByLabel('Reorder');
|
|
295
|
+
// Query Builder
|
|
296
|
+
this.queryBuilderBtn = page.locator('#query-builder-button');
|
|
297
|
+
this.queryBuilderOrderedBy = page.locator('#property-alias-dropdown').getByLabel('Property alias');
|
|
298
|
+
this.queryBuilderCreateDate = page.locator('#property-alias-dropdown').getByText('CreateDate').locator("..");
|
|
299
|
+
this.queryBuilderShowCode = page.locator('umb-code-block');
|
|
300
|
+
this.wherePropertyAliasBtn = page.locator('#property-alias-dropdown');
|
|
301
|
+
this.whereOperatorBtn = page.locator('#operator-dropdown');
|
|
302
|
+
this.whereConstrainValueTxt = page.getByLabel('constrain value');
|
|
303
|
+
this.orderByPropertyAliasBtn = page.locator('#sort-dropdown');
|
|
304
|
+
this.ascendingBtn = page.locator('[key="template_ascending"]');
|
|
305
|
+
this.chooseRootContentBtn = page.getByLabel('Choose root document');
|
|
306
|
+
this.returnedItemsCount = page.locator('#results-count');
|
|
307
|
+
this.queryResults = page.locator('.query-results');
|
|
308
|
+
// Insert & Template
|
|
249
309
|
this.insertValueBtn = page.locator('uui-button').filter({ has: page.locator('[key="template_insertPageField"]') });
|
|
250
310
|
this.insertPartialViewBtn = page.locator('uui-button').filter({ has: page.locator('[key="template_insertPartialView"]') });
|
|
251
311
|
this.insertDictionaryItemBtn = page.locator('uui-button').filter({ has: page.locator('[key="template_insertDictionaryItem"]') });
|
|
252
312
|
this.chooseFieldDropDown = page.locator('#preview #expand-symbol-wrapper');
|
|
253
313
|
this.systemFieldsOption = page.getByText('System fields');
|
|
254
314
|
this.chooseFieldValueDropDown = page.locator('#value #expand-symbol-wrapper');
|
|
255
|
-
this.
|
|
256
|
-
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
259
|
-
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.allowedChildNodesModal = page.locator('umb-tree-picker-modal');
|
|
263
|
-
this.addCollectionBtn = page.locator('umb-input-content-type-collection-configuration #create-button');
|
|
264
|
-
this.errorNotification = page.locator('uui-toast-notification[open][color="danger"]');
|
|
265
|
-
this.successNotification = page.locator('uui-toast-notification[open][color="positive"]');
|
|
266
|
-
this.leftArrowBtn = page.locator('[name="icon-arrow-left"] svg');
|
|
267
|
-
this.clickToUploadBtn = page.locator('#splitViews').getByRole('button', { name: 'Click to upload' });
|
|
268
|
-
this.backOfficeHeader = page.locator('umb-backoffice-header');
|
|
315
|
+
this.breadcrumbsTemplateModal = page.locator('uui-modal-sidebar').locator('umb-template-workspace-editor uui-breadcrumbs');
|
|
316
|
+
// Rename
|
|
317
|
+
this.newNameTxt = page.getByRole('textbox', { name: 'Enter new name...' });
|
|
318
|
+
this.renameModalBtn = page.locator('umb-rename-modal').getByLabel('Rename');
|
|
319
|
+
// State & Notification
|
|
320
|
+
this.successState = page.locator('[state="success"]');
|
|
321
|
+
this.successStateIcon = page.locator('[state="success"]').locator('#state');
|
|
269
322
|
this.failedStateButton = page.locator('uui-button[state="failed"]');
|
|
270
|
-
this.
|
|
271
|
-
this.
|
|
272
|
-
|
|
273
|
-
this.
|
|
274
|
-
this.
|
|
275
|
-
|
|
323
|
+
this.successNotification = page.locator('uui-toast-notification[open][color="positive"]');
|
|
324
|
+
this.errorNotification = page.locator('uui-toast-notification[open][color="danger"]');
|
|
325
|
+
// Search & Filter
|
|
326
|
+
this.typeToFilterSearchTxt = page.locator('[type="search"] #input');
|
|
327
|
+
this.filterChooseBtn = page.locator('button').filter({ hasText: 'Choose' });
|
|
328
|
+
// Text Input
|
|
329
|
+
this.textAreaInputArea = page.locator('textarea.ime-text-area');
|
|
330
|
+
this.enterAName = page.getByLabel('Enter a name...', { exact: true });
|
|
331
|
+
this.descriptionBtn = page.getByLabel('Description');
|
|
332
|
+
this.enterDescriptionTxt = page.getByLabel('Enter a description...');
|
|
333
|
+
this.aliasLockBtn = page.locator('#name').getByLabel('Unlock input');
|
|
334
|
+
this.aliasNameTxt = page.locator('#name').getByLabel('alias');
|
|
335
|
+
// Icon
|
|
336
|
+
this.iconBtn = page.getByLabel('icon');
|
|
337
|
+
// Create Link
|
|
338
|
+
this.createLink = page.getByRole('link', { name: 'Create', exact: true });
|
|
339
|
+
// Recycle Bin
|
|
276
340
|
this.recycleBinBtn = page.getByLabel('Recycle Bin', { exact: true });
|
|
277
341
|
this.recycleBinMenuItem = page.locator('uui-menu-item[label="Recycle Bin"]');
|
|
278
|
-
this.recycleBinMenuItemCaretBtn =
|
|
342
|
+
this.recycleBinMenuItemCaretBtn = page.locator('uui-menu-item[label="Recycle Bin"]').locator('#caret-button');
|
|
343
|
+
// View Options
|
|
279
344
|
this.gridBtn = page.getByLabel('Grid');
|
|
280
345
|
this.listBtn = page.getByLabel('List');
|
|
281
346
|
this.viewBundleBtn = page.locator('umb-collection-view-bundle uui-button svg');
|
|
282
|
-
|
|
283
|
-
this.
|
|
284
|
-
this.createNewDocumentBlueprintBtn = this.createDocumentBlueprintModal.locator('umb-ref-item', { hasText: 'Document Blueprint for' });
|
|
285
|
-
this.chooseDocumentInputBtn = page.locator('umb-input-document').getByLabel('Choose');
|
|
286
|
-
this.chooseMediaInputBtn = page.locator('umb-input-media').getByLabel('Choose');
|
|
287
|
-
this.container = page.locator('#container');
|
|
288
|
-
this.actionBtn = page.getByTestId('workspace:action-menu-button');
|
|
347
|
+
// Media
|
|
348
|
+
this.mediaCardItems = page.locator('uui-card-media');
|
|
289
349
|
this.mediaPickerModalSubmitBtn = page.locator('umb-media-picker-modal').getByLabel('Submit');
|
|
290
|
-
this.deleteBtn = page.getByRole('button', { name: /^Delete(…)?$/ });
|
|
291
|
-
this.createModalBtn = this.sidebarModal.getByLabel('Create', { exact: true });
|
|
292
350
|
this.mediaCaptionAltTextModalSubmitBtn = page.locator('umb-media-caption-alt-text-modal').getByLabel('Submit');
|
|
351
|
+
this.clickToUploadBtn = page.locator('#splitViews').getByRole('button', { name: 'Click to upload' });
|
|
352
|
+
this.inputDropzone = page.locator('umb-input-dropzone');
|
|
353
|
+
this.imageCropperField = page.locator('umb-image-cropper-field');
|
|
354
|
+
this.inputUploadField = page.locator('umb-input-upload-field').locator('#wrapperInner');
|
|
355
|
+
this.chooseMediaInputBtn = page.locator('umb-input-media').getByLabel('Choose');
|
|
356
|
+
// Embedded Media
|
|
293
357
|
this.embeddedMediaModal = page.locator('umb-embedded-media-modal');
|
|
294
|
-
this.embeddedURLTxt =
|
|
295
|
-
this.embeddedRetrieveBtn =
|
|
296
|
-
this.embeddedMediaModalConfirmBtn =
|
|
297
|
-
this.embeddedPreview =
|
|
298
|
-
|
|
299
|
-
this.
|
|
300
|
-
this.
|
|
358
|
+
this.embeddedURLTxt = page.locator('umb-embedded-media-modal').locator('[label="URL"] #input');
|
|
359
|
+
this.embeddedRetrieveBtn = page.locator('umb-embedded-media-modal').locator('[label="Retrieve"]');
|
|
360
|
+
this.embeddedMediaModalConfirmBtn = page.locator('umb-embedded-media-modal').getByLabel('Confirm');
|
|
361
|
+
this.embeddedPreview = page.locator('umb-embedded-media-modal').locator('[label="Preview"]');
|
|
362
|
+
// Document & Content
|
|
363
|
+
this.chooseDocumentInputBtn = page.locator('umb-input-document').getByLabel('Choose');
|
|
364
|
+
this.createDocumentBlueprintBtn = page.getByLabel(/^Create Document Blueprint(…)?$/);
|
|
365
|
+
this.createDocumentBlueprintModal = page.locator('umb-document-blueprint-options-create-modal');
|
|
366
|
+
this.createNewDocumentBlueprintBtn = page.locator('umb-document-blueprint-options-create-modal').locator('umb-ref-item', { hasText: 'Document Blueprint for' });
|
|
367
|
+
// User
|
|
301
368
|
this.currentUserAvatarBtn = page.getByTestId('header-app:Umb.HeaderApp.CurrentUser').locator('uui-avatar');
|
|
302
369
|
this.currentPasswordTxt = page.locator('input[name="oldPassword"]');
|
|
303
370
|
this.newPasswordTxt = page.locator('input[name="newPassword"]');
|
|
304
371
|
this.confirmPasswordTxt = page.locator('input[name="confirmPassword"]');
|
|
305
|
-
|
|
306
|
-
this.createActionButtonCollection = page.locator('umb-collection-create-action-button');
|
|
307
|
-
this.createActionBtn = this.createActionButtonCollection.locator('[label="Create"]');
|
|
372
|
+
// Collection & Table
|
|
308
373
|
this.collectionTreeItemTableRow = page.locator('umb-collection-workspace-view umb-table uui-table-row');
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
374
|
+
this.createActionButtonCollection = page.locator('umb-collection-create-action-button');
|
|
375
|
+
this.createActionBtn = page.locator('umb-collection-create-action-button').locator('[label="Create"]');
|
|
376
|
+
this.createOptionActionListModal = page.locator('umb-entity-create-option-action-list-modal');
|
|
377
|
+
// Reference & Entity
|
|
311
378
|
this.confirmActionModalEntityReferences = page.locator('umb-confirm-action-modal-entity-references,umb-confirm-bulk-action-modal-entity-references');
|
|
312
|
-
this.referenceHeadline =
|
|
313
|
-
this.entityItemRef =
|
|
314
|
-
this.
|
|
315
|
-
|
|
379
|
+
this.referenceHeadline = page.locator('umb-confirm-action-modal-entity-references,umb-confirm-bulk-action-modal-entity-references').locator('#reference-headline').first();
|
|
380
|
+
this.entityItemRef = page.locator('umb-confirm-action-modal-entity-references,umb-confirm-bulk-action-modal-entity-references').locator('uui-ref-list').first().getByTestId('entity-item-ref');
|
|
381
|
+
this.entityItem = page.locator('umb-entity-item-ref');
|
|
382
|
+
// Workspace & Action
|
|
316
383
|
this.workspaceAction = page.locator('umb-workspace-action');
|
|
317
|
-
this.caretBtn = page.locator('#caret-button');
|
|
318
|
-
this.sectionLinks = page.getByTestId('section-links');
|
|
319
|
-
// Entity Action
|
|
320
|
-
this.entityAction = page.locator('umb-entity-action-list umb-entity-action');
|
|
321
|
-
this.openEntityAction = page.locator('#action-modal[open]').locator(this.entityAction);
|
|
322
|
-
// Workspace Entity Action
|
|
323
384
|
this.workspaceActionMenuBtn = page.getByTestId('workspace:action-menu-button');
|
|
385
|
+
this.entityAction = page.locator('umb-entity-action-list umb-entity-action');
|
|
386
|
+
this.openEntityAction = page.locator('#action-modal[open]').locator(page.locator('umb-entity-action-list umb-entity-action'));
|
|
387
|
+
// Pagination
|
|
388
|
+
this.firstPaginationBtn = page.locator('umb-collection-pagination').getByLabel('First');
|
|
389
|
+
this.nextPaginationBtn = page.locator('umb-collection-pagination').getByLabel('Next');
|
|
390
|
+
// Editor
|
|
324
391
|
this.monacoEditor = page.locator('.monaco-editor');
|
|
325
|
-
|
|
392
|
+
// Loader
|
|
326
393
|
this.uiLoader = page.locator('uui-loader');
|
|
327
|
-
this.inputDropzone = page.locator('umb-input-dropzone');
|
|
328
|
-
this.imageCropperField = page.locator('umb-image-cropper-field');
|
|
329
|
-
this.inputUploadField = page.locator('umb-input-upload-field').locator('#wrapperInner');
|
|
330
|
-
this.entityItem = page.locator('umb-entity-item-ref');
|
|
331
|
-
this.restoreBtn = page.getByLabel('Restore', { exact: true });
|
|
332
|
-
this.backOfficeMain = page.locator('umb-backoffice-main');
|
|
333
394
|
}
|
|
395
|
+
// Helper Methods
|
|
396
|
+
getMenuItemByLabel(name) {
|
|
397
|
+
return this.page.locator(`uui-menu-item[label="${name}"]`);
|
|
398
|
+
}
|
|
399
|
+
// Actions Menu Methods
|
|
334
400
|
async clickActionsMenuForNameInSectionSidebar(name) {
|
|
335
401
|
await this.sectionSidebar.locator('[label="' + name + '"]').hover();
|
|
336
|
-
await this.sectionSidebar.locator('[label="' + name + '"] >> [label="Open actions menu"]').first()
|
|
402
|
+
await this.click(this.sectionSidebar.locator('[label="' + name + '"] >> [label="Open actions menu"]').first());
|
|
337
403
|
}
|
|
338
404
|
async clickActionsMenuForName(name) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
await
|
|
342
|
-
await this.
|
|
343
|
-
await this.page.locator('uui-menu-item[label="' + name + '"] #action-modal').first().click({ force: true });
|
|
405
|
+
const menuItem = this.getMenuItemByLabel(name);
|
|
406
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.medium);
|
|
407
|
+
await menuItem.locator('#menu-item').first().hover({ force: true });
|
|
408
|
+
await this.click(menuItem.locator('#action-modal').first(), { force: true });
|
|
344
409
|
}
|
|
345
410
|
async isActionsMenuForNameVisible(name, isVisible = true) {
|
|
346
|
-
|
|
347
|
-
await
|
|
411
|
+
const menuItem = this.getMenuItemByLabel(name);
|
|
412
|
+
await this.click(menuItem);
|
|
413
|
+
await (0, test_1.expect)(menuItem.locator('#action-modal').first()).toBeVisible({ visible: isVisible });
|
|
348
414
|
}
|
|
415
|
+
// Caret Button Methods
|
|
349
416
|
async clickCaretButtonForName(name) {
|
|
350
417
|
await this.isCaretButtonWithNameVisible(name);
|
|
351
|
-
await this.
|
|
418
|
+
await this.click(this.getMenuItemByLabel(name).locator('#caret-button').first());
|
|
352
419
|
}
|
|
353
420
|
async isCaretButtonWithNameVisible(name, isVisible = true) {
|
|
354
|
-
await (0, test_1.expect)(this.
|
|
421
|
+
await (0, test_1.expect)(this.getMenuItemByLabel(name).locator('#caret-button').first()).toBeVisible({ visible: isVisible });
|
|
355
422
|
}
|
|
356
423
|
async clickCaretButton() {
|
|
357
|
-
await this.
|
|
424
|
+
await this.click(this.caretBtn);
|
|
358
425
|
}
|
|
359
426
|
async openCaretButtonForName(name, isInModal = false) {
|
|
360
427
|
let menuItem;
|
|
361
428
|
if (isInModal) {
|
|
362
|
-
menuItem = this.sidebarModal.locator(
|
|
429
|
+
menuItem = this.sidebarModal.locator(`uui-menu-item[label="${name}"]`);
|
|
363
430
|
}
|
|
364
431
|
else {
|
|
365
|
-
menuItem = this.
|
|
432
|
+
menuItem = this.getMenuItemByLabel(name);
|
|
366
433
|
}
|
|
367
434
|
const isCaretButtonOpen = await menuItem.getAttribute('show-children');
|
|
368
435
|
if (isCaretButtonOpen === null) {
|
|
369
436
|
await this.clickCaretButtonForName(name);
|
|
370
437
|
}
|
|
371
438
|
}
|
|
439
|
+
// Tree Methods
|
|
372
440
|
async reloadTree(treeName) {
|
|
373
|
-
|
|
374
|
-
await
|
|
375
|
-
await this.page.waitForTimeout(500);
|
|
441
|
+
await this.isVisible(this.page.getByLabel(treeName, { exact: true }));
|
|
442
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
376
443
|
await this.clickActionsMenuForName(treeName);
|
|
377
444
|
await this.clickReloadChildrenActionMenuOption();
|
|
378
445
|
await this.openCaretButtonForName(treeName);
|
|
379
446
|
}
|
|
447
|
+
async isTreeItemVisible(name, isVisible = true) {
|
|
448
|
+
await this.isVisible(this.treeItem.locator('[label="' + name + '"]'), isVisible);
|
|
449
|
+
}
|
|
450
|
+
async doesTreeItemHaveTheCorrectIcon(name, icon) {
|
|
451
|
+
return await this.isVisible(this.treeItem.filter({ hasText: name }).locator('umb-icon').locator('[name="' + icon + '"]'));
|
|
452
|
+
}
|
|
453
|
+
// Core Button Click Methods
|
|
380
454
|
async clickReloadButton() {
|
|
381
|
-
await
|
|
382
|
-
await this.reloadBtn.click();
|
|
455
|
+
await this.click(this.reloadBtn);
|
|
383
456
|
}
|
|
384
457
|
async clickReloadChildrenButton() {
|
|
385
|
-
await
|
|
386
|
-
await this.reloadChildrenBtn.click({ force: true });
|
|
387
|
-
}
|
|
388
|
-
async isSuccessStateVisibleForSaveButton(isVisible = true) {
|
|
389
|
-
const regex = new RegExp(`^workspace-action:.*Save$`);
|
|
390
|
-
const saveButtonLocator = this.page.getByTestId(regex);
|
|
391
|
-
const saveBtn = this.workspaceAction.filter({ has: saveButtonLocator });
|
|
392
|
-
await (0, test_1.expect)(saveBtn.locator(this.successState)).toBeVisible({ visible: isVisible, timeout: 10000 });
|
|
458
|
+
await this.click(this.reloadChildrenBtn, { force: true });
|
|
393
459
|
}
|
|
394
460
|
async clickSaveButton() {
|
|
395
|
-
await
|
|
396
|
-
await this.
|
|
397
|
-
await this.page.waitForTimeout(500);
|
|
461
|
+
await this.click(this.saveBtn);
|
|
462
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
398
463
|
}
|
|
399
464
|
async clickChooseButton() {
|
|
400
|
-
await
|
|
401
|
-
await this.chooseBtn.click();
|
|
465
|
+
await this.click(this.chooseBtn);
|
|
402
466
|
}
|
|
403
467
|
async clickChooseContainerButton() {
|
|
404
|
-
await this.
|
|
405
|
-
}
|
|
406
|
-
async clickFilterChooseButton() {
|
|
407
|
-
await this.filterChooseBtn.click();
|
|
468
|
+
await this.click(this.containerChooseBtn);
|
|
408
469
|
}
|
|
409
|
-
async
|
|
410
|
-
await this.
|
|
470
|
+
async clickSubmitButton() {
|
|
471
|
+
await this.click(this.submitBtn);
|
|
411
472
|
}
|
|
412
|
-
async
|
|
413
|
-
await this.
|
|
473
|
+
async clickConfirmButton() {
|
|
474
|
+
await this.click(this.confirmBtn);
|
|
414
475
|
}
|
|
415
|
-
async
|
|
416
|
-
await this.
|
|
476
|
+
async clickCreateButton() {
|
|
477
|
+
await this.click(this.createBtn);
|
|
417
478
|
}
|
|
418
|
-
async
|
|
419
|
-
await this.
|
|
479
|
+
async clickAddButton() {
|
|
480
|
+
await this.click(this.addBtn);
|
|
420
481
|
}
|
|
421
482
|
async clickUpdateButton() {
|
|
422
|
-
await this.
|
|
423
|
-
}
|
|
424
|
-
async clickSubmitButton() {
|
|
425
|
-
await (0, test_1.expect)(this.submitBtn).toBeVisible();
|
|
426
|
-
await this.submitBtn.click();
|
|
427
|
-
}
|
|
428
|
-
async clickConfirmToSubmitButton() {
|
|
429
|
-
await this.confirmToSubmitBtn.click();
|
|
483
|
+
await this.click(this.updateBtn);
|
|
430
484
|
}
|
|
431
485
|
async clickChangeButton() {
|
|
432
|
-
await this.
|
|
486
|
+
await this.click(this.changeBtn);
|
|
433
487
|
}
|
|
434
|
-
async
|
|
435
|
-
|
|
436
|
-
await (0, test_1.expect)(exactLinkWithNameLocator).toBeVisible();
|
|
437
|
-
await exactLinkWithNameLocator.click({ force: toForce });
|
|
488
|
+
async clickDeleteButton() {
|
|
489
|
+
await this.click(this.deleteBtn);
|
|
438
490
|
}
|
|
439
|
-
async
|
|
440
|
-
|
|
441
|
-
await this.page.waitForTimeout(500);
|
|
442
|
-
await (0, test_1.expect)(this.aliasLockBtn).toBeVisible();
|
|
443
|
-
await this.aliasLockBtn.click({ force: true });
|
|
444
|
-
await this.aliasNameTxt.clear();
|
|
445
|
-
await this.aliasNameTxt.fill(aliasName);
|
|
491
|
+
async clickDeleteExactButton() {
|
|
492
|
+
await this.click(this.deleteExactBtn);
|
|
446
493
|
}
|
|
447
|
-
async
|
|
448
|
-
await
|
|
449
|
-
// Force click is needed
|
|
450
|
-
await this.iconBtn.click({ force: true });
|
|
451
|
-
await this.searchForTypeToFilterValue(iconName);
|
|
452
|
-
await this.clickLabelWithName(iconName, true, true);
|
|
453
|
-
await this.clickSubmitButton();
|
|
494
|
+
async clickRemoveExactButton() {
|
|
495
|
+
await this.click(this.removeExactBtn);
|
|
454
496
|
}
|
|
455
|
-
async
|
|
456
|
-
await
|
|
457
|
-
await this.page.getByText(name, { exact: true }).click();
|
|
497
|
+
async clickInsertButton() {
|
|
498
|
+
await this.click(this.insertBtn);
|
|
458
499
|
}
|
|
459
|
-
async
|
|
460
|
-
await
|
|
461
|
-
await this.selectPropertyEditorBtn.click();
|
|
500
|
+
async clickRenameButton() {
|
|
501
|
+
await this.click(this.renameBtn);
|
|
462
502
|
}
|
|
463
|
-
async
|
|
464
|
-
await
|
|
465
|
-
await this.createFolderBtn.click();
|
|
466
|
-
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
503
|
+
async clickRestoreButton() {
|
|
504
|
+
await this.click(this.restoreBtn);
|
|
467
505
|
}
|
|
468
|
-
async
|
|
469
|
-
await
|
|
470
|
-
await this.propertyNameTxt.fill(name);
|
|
506
|
+
async clickDisableButton() {
|
|
507
|
+
await this.click(this.disableBtn);
|
|
471
508
|
}
|
|
472
|
-
async
|
|
473
|
-
await
|
|
474
|
-
await this.nextPaginationBtn.click();
|
|
509
|
+
async clickEnableButton() {
|
|
510
|
+
await this.click(this.enableBtn);
|
|
475
511
|
}
|
|
476
|
-
async
|
|
477
|
-
await
|
|
478
|
-
await this.nextBtn.click();
|
|
512
|
+
async clickActionButton() {
|
|
513
|
+
await this.click(this.actionBtn);
|
|
479
514
|
}
|
|
480
|
-
async
|
|
481
|
-
await
|
|
482
|
-
await this.confirmBtn.click();
|
|
515
|
+
async clickNextButton() {
|
|
516
|
+
await this.click(this.nextBtn);
|
|
483
517
|
}
|
|
484
518
|
async clickBreadcrumbButton() {
|
|
485
|
-
await
|
|
486
|
-
await this.breadcrumbBtn.click();
|
|
519
|
+
await this.click(this.breadcrumbBtn);
|
|
487
520
|
}
|
|
488
|
-
async
|
|
489
|
-
await
|
|
490
|
-
await this.insertBtn.click();
|
|
521
|
+
async clickLeftArrowButton() {
|
|
522
|
+
await this.click(this.leftArrowBtn);
|
|
491
523
|
}
|
|
524
|
+
// Confirmation Button Methods
|
|
492
525
|
async clickConfirmToDeleteButton() {
|
|
493
|
-
await
|
|
494
|
-
await this.
|
|
495
|
-
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
526
|
+
await this.click(this.confirmToDeleteBtn);
|
|
527
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
496
528
|
}
|
|
497
529
|
async clickConfirmCreateFolderButton() {
|
|
498
|
-
await
|
|
499
|
-
await this.
|
|
500
|
-
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
501
|
-
}
|
|
502
|
-
async clickRemoveExactButton() {
|
|
503
|
-
await (0, test_1.expect)(this.removeExactBtn).toBeVisible();
|
|
504
|
-
await this.removeExactBtn.click();
|
|
505
|
-
}
|
|
506
|
-
async clickRemoveButtonForName(name) {
|
|
507
|
-
const removeButtonWithNameLocator = this.page.locator('[name="' + name + '"] [label="Remove"]');
|
|
508
|
-
await (0, test_1.expect)(removeButtonWithNameLocator).toBeVisible();
|
|
509
|
-
await removeButtonWithNameLocator.click();
|
|
510
|
-
}
|
|
511
|
-
async clickTrashIconButtonForName(name) {
|
|
512
|
-
const trashIconButtonWithNameLocator = this.page.locator('[name="' + name + '"] [name="icon-trash"]');
|
|
513
|
-
await (0, test_1.expect)(trashIconButtonWithNameLocator).toBeVisible();
|
|
514
|
-
await trashIconButtonWithNameLocator.click();
|
|
530
|
+
await this.click(this.confirmCreateFolderBtn);
|
|
531
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
515
532
|
}
|
|
516
|
-
async
|
|
517
|
-
|
|
518
|
-
await (0, test_1.expect)(removeLabelWithNameLocator).toBeVisible();
|
|
519
|
-
await removeLabelWithNameLocator.click();
|
|
533
|
+
async clickConfirmRemoveButton() {
|
|
534
|
+
await this.click(this.confirmToRemoveBtn);
|
|
520
535
|
}
|
|
521
|
-
async
|
|
522
|
-
await
|
|
523
|
-
await this.disableBtn.click();
|
|
536
|
+
async clickConfirmToSubmitButton() {
|
|
537
|
+
await this.click(this.confirmToSubmitBtn);
|
|
524
538
|
}
|
|
525
539
|
async clickConfirmDisableButton() {
|
|
526
|
-
await
|
|
527
|
-
await this.confirmDisableBtn.click();
|
|
528
|
-
}
|
|
529
|
-
async clickConfirmRemoveButton() {
|
|
530
|
-
await (0, test_1.expect)(this.confirmToRemoveBtn).toBeVisible();
|
|
531
|
-
await this.confirmToRemoveBtn.click();
|
|
532
|
-
}
|
|
533
|
-
async clickEnableButton() {
|
|
534
|
-
await (0, test_1.expect)(this.enableBtn).toBeVisible();
|
|
535
|
-
await this.enableBtn.click();
|
|
540
|
+
await this.click(this.confirmDisableBtn);
|
|
536
541
|
}
|
|
537
542
|
async clickConfirmEnableButton() {
|
|
538
|
-
await
|
|
539
|
-
await this.confirmEnableBtn.click();
|
|
543
|
+
await this.click(this.confirmEnableBtn);
|
|
540
544
|
}
|
|
541
|
-
async
|
|
542
|
-
await this.
|
|
543
|
-
await (0, test_1.expect)(this.insertDictionaryItemBtn).toBeVisible();
|
|
544
|
-
await this.insertDictionaryItemBtn.click();
|
|
545
|
-
await (0, test_1.expect)(this.page.getByLabel(dictionaryName)).toBeVisible();
|
|
546
|
-
await this.page.getByLabel(dictionaryName).click();
|
|
547
|
-
await (0, test_1.expect)(this.chooseBtn).toBeVisible();
|
|
548
|
-
await this.chooseBtn.click();
|
|
545
|
+
async clickConfirmRenameButton() {
|
|
546
|
+
await this.click(this.confirmRenameBtn);
|
|
549
547
|
}
|
|
550
|
-
async
|
|
551
|
-
await
|
|
552
|
-
await this.
|
|
553
|
-
await (0, test_1.expect)(this.orderByPropertyAliasBtn).toBeVisible();
|
|
554
|
-
await this.orderByPropertyAliasBtn.click();
|
|
555
|
-
// Wait and choose property alias option
|
|
556
|
-
await this.waitAndSelectQueryBuilderDropDownList(propertyAlias);
|
|
557
|
-
await (0, test_1.expect)(this.orderByPropertyAliasBtn).toBeVisible();
|
|
558
|
-
await this.orderByPropertyAliasBtn.click();
|
|
559
|
-
// Click to ascending button if isAscending is false
|
|
560
|
-
if (!isAscending) {
|
|
561
|
-
await (0, test_1.expect)(this.ascendingBtn).toBeVisible();
|
|
562
|
-
await this.ascendingBtn.click();
|
|
563
|
-
}
|
|
548
|
+
async clickConfirmTrashButton() {
|
|
549
|
+
await this.click(this.confirmTrashBtn);
|
|
550
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
564
551
|
}
|
|
565
|
-
async
|
|
566
|
-
await
|
|
567
|
-
await this.
|
|
568
|
-
// Wait and choose property alias
|
|
569
|
-
await (0, test_1.expect)(this.wherePropertyAliasBtn).toBeVisible();
|
|
570
|
-
await this.wherePropertyAliasBtn.click();
|
|
571
|
-
await this.waitAndSelectQueryBuilderDropDownList(propertyAlias);
|
|
572
|
-
// Wait and choose operator
|
|
573
|
-
await (0, test_1.expect)(this.whereOperatorBtn).toBeVisible();
|
|
574
|
-
await this.whereOperatorBtn.click();
|
|
575
|
-
await this.waitAndSelectQueryBuilderDropDownList(operator);
|
|
576
|
-
// Wait and choose constrain value and press Enter
|
|
577
|
-
await (0, test_1.expect)(this.whereConstrainValueTxt).toBeVisible();
|
|
578
|
-
await this.whereConstrainValueTxt.clear();
|
|
579
|
-
await this.whereConstrainValueTxt.fill(constrainValue);
|
|
580
|
-
await this.whereConstrainValueTxt.press('Enter');
|
|
552
|
+
async clickDeleteAndConfirmButton() {
|
|
553
|
+
await this.clickDeleteActionMenuOption();
|
|
554
|
+
await this.clickConfirmToDeleteButton();
|
|
581
555
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
await
|
|
585
|
-
await
|
|
556
|
+
// Folder Methods
|
|
557
|
+
async clickCreateFolderButton() {
|
|
558
|
+
await this.click(this.createFolderBtn);
|
|
559
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
560
|
+
}
|
|
561
|
+
async enterFolderName(folderName) {
|
|
562
|
+
await this.enterText(this.folderNameTxt, folderName, { verify: true });
|
|
586
563
|
}
|
|
587
564
|
async createFolder(folderName) {
|
|
588
565
|
await this.clickCreateActionMenuOption();
|
|
@@ -590,585 +567,577 @@ class UiBaseLocators {
|
|
|
590
567
|
await this.enterFolderName(folderName);
|
|
591
568
|
await this.clickConfirmCreateFolderButton();
|
|
592
569
|
}
|
|
593
|
-
async
|
|
594
|
-
|
|
595
|
-
await this.
|
|
596
|
-
await this.deleteBtn.click();
|
|
570
|
+
async deleteFolder() {
|
|
571
|
+
await this.clickDeleteActionMenuOption();
|
|
572
|
+
await this.clickConfirmToDeleteButton();
|
|
597
573
|
}
|
|
598
|
-
async
|
|
599
|
-
await
|
|
600
|
-
await this.folderNameTxt.clear();
|
|
601
|
-
await this.folderNameTxt.fill(folderName);
|
|
602
|
-
await (0, test_1.expect)(this.folderNameTxt).toHaveValue(folderName);
|
|
574
|
+
async clickFolderButton() {
|
|
575
|
+
await this.click(this.folderBtn);
|
|
603
576
|
}
|
|
604
|
-
async
|
|
605
|
-
|
|
577
|
+
async clickNewFolderThreeDotsButton() {
|
|
578
|
+
await this.click(this.newFolderThreeDotsBtn);
|
|
606
579
|
}
|
|
607
|
-
async
|
|
608
|
-
await
|
|
609
|
-
await this.queryBuilderShowCode.click();
|
|
610
|
-
await (0, test_1.expect)(this.queryBuilderShowCode).toContainText(code, { timeout: 10000 });
|
|
580
|
+
async clickRenameFolderThreeDotsButton() {
|
|
581
|
+
await this.click(this.renameFolderThreeDotsBtn);
|
|
611
582
|
}
|
|
612
|
-
async
|
|
613
|
-
await this.
|
|
614
|
-
await this.clickConfirmToDeleteButton();
|
|
583
|
+
async clickRenameFolderButton() {
|
|
584
|
+
await this.clickRenameButton();
|
|
615
585
|
}
|
|
616
|
-
async
|
|
617
|
-
await
|
|
618
|
-
await this.deleteExactBtn.click();
|
|
586
|
+
async clickUpdateFolderButton() {
|
|
587
|
+
await this.click(this.updateFolderBtn);
|
|
619
588
|
}
|
|
620
|
-
|
|
621
|
-
|
|
589
|
+
// Three Dots Menu Methods
|
|
590
|
+
async clickCreateThreeDotsButton() {
|
|
591
|
+
await this.click(this.createThreeDotsBtn);
|
|
622
592
|
}
|
|
623
|
-
async
|
|
624
|
-
|
|
593
|
+
async clickFilterChooseButton() {
|
|
594
|
+
await this.click(this.filterChooseBtn);
|
|
595
|
+
}
|
|
596
|
+
// Success State Methods
|
|
597
|
+
async isSuccessStateVisibleForSaveButton(isVisible = true) {
|
|
598
|
+
const regex = new RegExp(`^workspace-action:.*Save$`);
|
|
599
|
+
const saveButtonLocator = this.page.getByTestId(regex);
|
|
600
|
+
const saveBtn = this.workspaceAction.filter({ has: saveButtonLocator });
|
|
601
|
+
await (0, test_1.expect)(saveBtn.locator(this.successState)).toBeVisible({ visible: isVisible, timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
602
|
+
}
|
|
603
|
+
async isSuccessButtonWithTextVisible(text) {
|
|
604
|
+
return await this.isVisible(this.successState.filter({ hasText: text }));
|
|
605
|
+
}
|
|
606
|
+
async isSuccessStateIconVisible() {
|
|
607
|
+
await this.isVisible(this.successStateIcon);
|
|
608
|
+
}
|
|
609
|
+
async isFailedStateButtonVisible() {
|
|
610
|
+
await this.isVisible(this.failedStateButton);
|
|
611
|
+
}
|
|
612
|
+
// Notification Methods
|
|
613
|
+
async isSuccessNotificationVisible(isVisible = true) {
|
|
614
|
+
return await (0, test_1.expect)(this.successNotification.first()).toBeVisible({ visible: isVisible, timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
615
|
+
}
|
|
616
|
+
async doesSuccessNotificationsHaveCount(count) {
|
|
617
|
+
await this.hasCount(this.successNotification, count);
|
|
618
|
+
}
|
|
619
|
+
async doesSuccessNotificationHaveText(text, isVisible = true, deleteNotification = false, timeout = 5000) {
|
|
620
|
+
const response = await (0, test_1.expect)(this.successNotification.filter({ hasText: text })).toBeVisible({
|
|
621
|
+
visible: isVisible,
|
|
622
|
+
timeout: timeout
|
|
623
|
+
});
|
|
624
|
+
if (deleteNotification) {
|
|
625
|
+
await this.click(this.successNotification.filter({ hasText: text }).getByLabel('close'), { force: true });
|
|
626
|
+
}
|
|
627
|
+
return response;
|
|
628
|
+
}
|
|
629
|
+
async isErrorNotificationVisible(isVisible = true) {
|
|
630
|
+
return await (0, test_1.expect)(this.errorNotification.first()).toBeVisible({ visible: isVisible });
|
|
631
|
+
}
|
|
632
|
+
async doesErrorNotificationHaveText(text, isVisible = true, deleteNotification = false) {
|
|
633
|
+
const response = await (0, test_1.expect)(this.errorNotification.filter({ hasText: text })).toBeVisible({ visible: isVisible });
|
|
634
|
+
if (deleteNotification) {
|
|
635
|
+
await this.click(this.errorNotification.filter({ hasText: text }).locator('svg'));
|
|
636
|
+
}
|
|
637
|
+
return response;
|
|
638
|
+
}
|
|
639
|
+
// Modal Methods
|
|
640
|
+
async clickChooseModalButton() {
|
|
641
|
+
await this.click(this.chooseModalBtn);
|
|
625
642
|
}
|
|
643
|
+
async clickCreateModalButton() {
|
|
644
|
+
await this.click(this.createModalBtn);
|
|
645
|
+
}
|
|
646
|
+
async clickModalMenuItemWithName(name) {
|
|
647
|
+
await this.click(this.openedModal.locator(`uui-menu-item[label="${name}"]`));
|
|
648
|
+
}
|
|
649
|
+
async isModalMenuItemWithNameDisabled(name) {
|
|
650
|
+
await this.hasAttribute(this.sidebarModal.locator(`uui-menu-item[label="${name}"]`), 'disabled', '');
|
|
651
|
+
}
|
|
652
|
+
async isModalMenuItemWithNameVisible(name, isVisible = true) {
|
|
653
|
+
await this.isVisible(this.sidebarModal.locator(`uui-menu-item[label="${name}"]`), isVisible);
|
|
654
|
+
}
|
|
655
|
+
// Container Methods
|
|
656
|
+
async clickContainerSaveAndPublishButton() {
|
|
657
|
+
await this.click(this.containerSaveAndPublishBtn);
|
|
658
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
659
|
+
}
|
|
660
|
+
// Navigation Methods
|
|
626
661
|
async goToSection(sectionName, checkSections = true, skipReload = false) {
|
|
627
662
|
if (checkSections) {
|
|
628
663
|
for (let section in ConstantHelper_1.ConstantHelper.sections) {
|
|
629
|
-
await (0, test_1.expect)(this.sectionLinks.getByRole('tab', { name: ConstantHelper_1.ConstantHelper.sections[section] })).toBeVisible({ timeout:
|
|
664
|
+
await (0, test_1.expect)(this.sectionLinks.getByRole('tab', { name: ConstantHelper_1.ConstantHelper.sections[section] })).toBeVisible({ timeout: ConstantHelper_1.ConstantHelper.timeout.navigation });
|
|
630
665
|
}
|
|
631
666
|
}
|
|
632
|
-
// We need to check if we are on the section tab already, if we are, then we need to reload the page instead of clicking again
|
|
633
667
|
const alreadySelected = await this.sectionLinks.locator('[active]').getByText(sectionName).isVisible();
|
|
634
668
|
if (alreadySelected && !skipReload) {
|
|
635
669
|
await this.page.reload();
|
|
636
670
|
}
|
|
637
671
|
else {
|
|
638
|
-
await this.backOfficeHeader.getByRole('tab', { name: sectionName })
|
|
672
|
+
await this.click(this.backOfficeHeader.getByRole('tab', { name: sectionName }));
|
|
639
673
|
}
|
|
640
674
|
}
|
|
641
675
|
async goToSettingsTreeItem(settingsTreeItemName) {
|
|
642
676
|
await this.goToSection(ConstantHelper_1.ConstantHelper.sections.settings);
|
|
643
|
-
await
|
|
644
|
-
await this.page.getByLabel(settingsTreeItemName, { exact: true }).click();
|
|
677
|
+
await this.click(this.page.getByLabel(settingsTreeItemName, { exact: true }));
|
|
645
678
|
}
|
|
646
|
-
async
|
|
647
|
-
await this.page.
|
|
679
|
+
async isSectionWithNameVisible(sectionName, isVisible = true) {
|
|
680
|
+
await this.isVisible(this.page.getByRole('tab', { name: sectionName }), isVisible);
|
|
648
681
|
}
|
|
649
|
-
async
|
|
650
|
-
|
|
682
|
+
async isBackOfficeMainVisible(isVisible = true) {
|
|
683
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.timeout.medium);
|
|
684
|
+
await this.isVisible(this.backOfficeMain, isVisible);
|
|
651
685
|
}
|
|
652
|
-
|
|
653
|
-
|
|
686
|
+
// Link & Button Click by Name Methods
|
|
687
|
+
async clickExactLinkWithName(name, toForce = false) {
|
|
688
|
+
const exactLinkWithNameLocator = this.page.getByRole('link', { name: name, exact: true });
|
|
689
|
+
await this.click(exactLinkWithNameLocator, { force: toForce });
|
|
690
|
+
}
|
|
691
|
+
async clickLinkWithName(name, isExact = false) {
|
|
692
|
+
await this.click(this.page.getByRole('link', { name: name, exact: isExact }));
|
|
654
693
|
}
|
|
655
694
|
async clickLabelWithName(name, isExact = true, toForce = false) {
|
|
656
|
-
await
|
|
657
|
-
await this.page.getByLabel(name, { exact: isExact }).click({ force: toForce });
|
|
695
|
+
await this.click(this.page.getByLabel(name, { exact: isExact }), { force: toForce });
|
|
658
696
|
}
|
|
659
697
|
async clickButtonWithName(name, isExact = false) {
|
|
660
698
|
const exactButtonWithNameLocator = this.page.getByRole('button', { name: name, exact: isExact });
|
|
661
|
-
await (
|
|
662
|
-
// Force click is needed
|
|
663
|
-
await exactButtonWithNameLocator.click({ force: true });
|
|
699
|
+
await this.click(exactButtonWithNameLocator, { force: true });
|
|
664
700
|
}
|
|
665
|
-
async
|
|
666
|
-
|
|
667
|
-
}
|
|
668
|
-
async doesSuccessNotificationsHaveCount(count) {
|
|
669
|
-
return await (0, test_1.expect)(this.successNotification).toHaveCount(count);
|
|
701
|
+
async clickTextButtonWithName(name) {
|
|
702
|
+
await this.click(this.page.getByText(name, { exact: true }));
|
|
670
703
|
}
|
|
671
|
-
async
|
|
672
|
-
|
|
704
|
+
async isButtonWithNameVisible(name) {
|
|
705
|
+
await this.isVisible(this.page.getByRole('button', { name: name }));
|
|
673
706
|
}
|
|
674
|
-
async
|
|
675
|
-
|
|
707
|
+
async getButtonWithName(name) {
|
|
708
|
+
await this.waitForVisible(this.page.getByRole('button', { name: name }));
|
|
709
|
+
return this.page.getByRole('button', { name: name });
|
|
676
710
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
711
|
+
// Remove Button Methods
|
|
712
|
+
async clickRemoveButtonForName(name) {
|
|
713
|
+
const removeButtonWithNameLocator = this.page.locator('[name="' + name + '"] [label="Remove"]');
|
|
714
|
+
await this.click(removeButtonWithNameLocator);
|
|
680
715
|
}
|
|
681
|
-
async
|
|
682
|
-
|
|
683
|
-
await this.
|
|
716
|
+
async clickTrashIconButtonForName(name) {
|
|
717
|
+
const trashIconButtonWithNameLocator = this.page.locator('[name="' + name + '"] [name="icon-trash"]');
|
|
718
|
+
await this.click(trashIconButtonWithNameLocator);
|
|
684
719
|
}
|
|
685
|
-
async
|
|
686
|
-
|
|
687
|
-
await this.
|
|
720
|
+
async clickRemoveWithName(name) {
|
|
721
|
+
const removeLabelWithNameLocator = this.page.locator('[label="Remove ' + name + '"]');
|
|
722
|
+
await this.click(removeLabelWithNameLocator);
|
|
688
723
|
}
|
|
689
|
-
|
|
690
|
-
async
|
|
691
|
-
await
|
|
692
|
-
await this.
|
|
724
|
+
// Alias & Icon Methods
|
|
725
|
+
async enterAliasName(aliasName) {
|
|
726
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
727
|
+
await this.click(this.aliasLockBtn, { force: true });
|
|
728
|
+
await this.enterText(this.aliasNameTxt, aliasName);
|
|
693
729
|
}
|
|
694
|
-
async
|
|
695
|
-
await
|
|
696
|
-
|
|
730
|
+
async updateIcon(iconName) {
|
|
731
|
+
await this.click(this.iconBtn, { force: true });
|
|
732
|
+
await this.searchForTypeToFilterValue(iconName);
|
|
733
|
+
await this.clickLabelWithName(iconName, true, true);
|
|
734
|
+
await this.clickSubmitButton();
|
|
697
735
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
await this.
|
|
701
|
-
await this.enterDescriptionTxt.fill(description);
|
|
736
|
+
// Property Editor Methods
|
|
737
|
+
async clickSelectPropertyEditorButton() {
|
|
738
|
+
await this.click(this.selectPropertyEditorBtn);
|
|
702
739
|
}
|
|
703
|
-
async
|
|
704
|
-
|
|
740
|
+
async enterAPropertyName(name) {
|
|
741
|
+
await this.enterText(this.propertyNameTxt, name, { clearFirst: false });
|
|
705
742
|
}
|
|
706
|
-
async
|
|
707
|
-
await this.
|
|
708
|
-
await (0, test_1.expect)(this.structureTabBtn).toBeVisible();
|
|
709
|
-
await this.structureTabBtn.click();
|
|
743
|
+
async clickEditorSettingsButton(index = 0) {
|
|
744
|
+
await this.click(this.editorSettingsBtn.nth(index));
|
|
710
745
|
}
|
|
711
|
-
async
|
|
712
|
-
await
|
|
713
|
-
await this.
|
|
746
|
+
async addPropertyEditor(propertyEditorName, index = 0) {
|
|
747
|
+
await this.click(this.addPropertyBtn.nth(index));
|
|
748
|
+
await this.enterAPropertyName(propertyEditorName);
|
|
749
|
+
await this.hasValue(this.propertyNameTxt, propertyEditorName);
|
|
750
|
+
await this.clickSelectPropertyEditorButton();
|
|
751
|
+
await this.searchForTypeToFilterValue(propertyEditorName);
|
|
752
|
+
await this.click(this.page.getByText(propertyEditorName, { exact: true }));
|
|
753
|
+
await this.clickSubmitButton();
|
|
714
754
|
}
|
|
715
|
-
async
|
|
716
|
-
await
|
|
717
|
-
await this.
|
|
755
|
+
async updatePropertyEditor(propertyEditorName) {
|
|
756
|
+
await this.clickEditorSettingsButton();
|
|
757
|
+
await this.clickChangeButton();
|
|
758
|
+
await this.searchForTypeToFilterValue(propertyEditorName);
|
|
759
|
+
await this.click(this.page.getByText(propertyEditorName, { exact: true }));
|
|
760
|
+
await this.enterAPropertyName(propertyEditorName);
|
|
761
|
+
await this.clickSubmitButton();
|
|
718
762
|
}
|
|
719
|
-
async
|
|
720
|
-
await (
|
|
721
|
-
await this.
|
|
763
|
+
async deletePropertyEditor(propertyEditorName) {
|
|
764
|
+
await this.page.locator('uui-button').filter({ hasText: propertyEditorName }).getByLabel('Editor settings').hover();
|
|
765
|
+
await this.click(this.deleteBtn);
|
|
722
766
|
}
|
|
723
|
-
async
|
|
724
|
-
|
|
725
|
-
await this.
|
|
767
|
+
async deletePropertyEditorWithName(name) {
|
|
768
|
+
const propertyEditor = this.page.locator('umb-content-type-design-editor-property', { hasText: name });
|
|
769
|
+
await this.hoverAndClick(propertyEditor, propertyEditor.getByLabel('Delete'), { force: true });
|
|
770
|
+
await this.clickConfirmToDeleteButton();
|
|
726
771
|
}
|
|
727
|
-
async
|
|
728
|
-
await
|
|
729
|
-
await this.mandatoryToggle.click();
|
|
772
|
+
async enterPropertyEditorDescription(description) {
|
|
773
|
+
await this.enterText(this.enterPropertyEditorDescriptionTxt, description);
|
|
730
774
|
}
|
|
731
|
-
async
|
|
732
|
-
|
|
733
|
-
await this.
|
|
775
|
+
async isPropertyEditorUiWithNameReadOnly(name) {
|
|
776
|
+
const propertyEditorUiLocator = this.page.locator('umb-property-editor-ui-' + name);
|
|
777
|
+
await this.hasAttribute(propertyEditorUiLocator, 'readonly', '');
|
|
734
778
|
}
|
|
735
|
-
async
|
|
736
|
-
|
|
737
|
-
await this.
|
|
779
|
+
async isPropertyEditorUiWithNameVisible(name, isVisible = true) {
|
|
780
|
+
const propertyEditorUiLocator = this.page.locator('umb-property-editor-ui-' + name);
|
|
781
|
+
await this.isVisible(propertyEditorUiLocator, isVisible);
|
|
738
782
|
}
|
|
739
|
-
async
|
|
740
|
-
await
|
|
741
|
-
await this.regexMessageTxt.fill(regExMessage);
|
|
783
|
+
async doesPropertyHaveInvalidBadge(propertyName) {
|
|
784
|
+
await this.isVisible(this.page.locator('umb-property-layout').filter({ hasText: propertyName }).locator('#invalid-badge uui-badge'));
|
|
742
785
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
await this.
|
|
786
|
+
// Group Methods
|
|
787
|
+
async clickAddGroupButton() {
|
|
788
|
+
await this.click(this.addGroupBtn);
|
|
746
789
|
}
|
|
747
|
-
async
|
|
748
|
-
|
|
749
|
-
await this.
|
|
790
|
+
async enterGroupName(groupName, index = 0) {
|
|
791
|
+
const groupNameTxt = this.groupLabel.nth(index);
|
|
792
|
+
await this.enterText(groupNameTxt, groupName);
|
|
750
793
|
}
|
|
751
|
-
async
|
|
752
|
-
await
|
|
753
|
-
await this.page.waitForTimeout(400);
|
|
754
|
-
await this.unnamedTabTxt.clear();
|
|
755
|
-
await this.unnamedTabTxt.fill(tabName);
|
|
756
|
-
// We use this to make sure the test id is updated
|
|
757
|
-
await this.page.getByRole('tab', { name: 'Design' }).click();
|
|
758
|
-
// We click again to make sure the tab is focused
|
|
759
|
-
await this.page.getByTestId('tab:' + tabName).click();
|
|
794
|
+
async isGroupVisible(groupName, isVisible = true) {
|
|
795
|
+
await this.isVisible(this.groupLabel.filter({ hasText: groupName }), isVisible);
|
|
760
796
|
}
|
|
761
|
-
async
|
|
762
|
-
await
|
|
763
|
-
await this.
|
|
797
|
+
async doesGroupHaveValue(value) {
|
|
798
|
+
await this.waitForVisible(this.groupLabel);
|
|
799
|
+
return await this.hasValue(this.groupLabel, value);
|
|
764
800
|
}
|
|
765
|
-
async
|
|
766
|
-
await
|
|
767
|
-
|
|
768
|
-
await
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
801
|
+
async deleteGroup(groupName) {
|
|
802
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.medium);
|
|
803
|
+
const groups = this.page.locator('umb-content-type-design-editor-group').all();
|
|
804
|
+
for (const group of await groups) {
|
|
805
|
+
if (await group.getByLabel('Group', { exact: true }).inputValue() === groupName) {
|
|
806
|
+
const headerActionsDeleteLocator = group.locator('[slot="header-actions"]').getByLabel('Delete');
|
|
807
|
+
await this.click(headerActionsDeleteLocator, { force: true });
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
774
811
|
}
|
|
775
|
-
async
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
await
|
|
779
|
-
await
|
|
780
|
-
|
|
781
|
-
|
|
812
|
+
async reorderTwoGroups(firstGroupName, secondGroupName) {
|
|
813
|
+
const firstGroup = this.page.getByTestId('group:' + firstGroupName);
|
|
814
|
+
const secondGroup = this.page.getByTestId('group:' + secondGroupName);
|
|
815
|
+
const firstGroupValue = await firstGroup.getByLabel('Group').inputValue();
|
|
816
|
+
const secondGroupValue = await secondGroup.getByLabel('Group').inputValue();
|
|
817
|
+
const dragToLocator = firstGroup.locator('[slot="header"]').first();
|
|
818
|
+
const dragFromLocator = secondGroup.locator('[slot="header"]').first();
|
|
819
|
+
await this.dragAndDrop(dragFromLocator, dragToLocator, 0, 0, 20);
|
|
820
|
+
return { firstGroupValue, secondGroupValue };
|
|
782
821
|
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
await this.
|
|
786
|
-
await this.enterPropertyEditorDescriptionTxt.fill(description);
|
|
822
|
+
// Tab Methods
|
|
823
|
+
async clickAddTabButton() {
|
|
824
|
+
await this.click(this.addTabBtn);
|
|
787
825
|
}
|
|
788
|
-
async
|
|
789
|
-
await
|
|
790
|
-
await this.
|
|
826
|
+
async enterTabName(tabName) {
|
|
827
|
+
await this.waitForVisible(this.unnamedTabTxt);
|
|
828
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
829
|
+
await this.enterText(this.unnamedTabTxt, tabName);
|
|
830
|
+
await this.click(this.page.getByRole('tab', { name: 'Design' }));
|
|
831
|
+
await this.click(this.page.getByTestId('tab:' + tabName));
|
|
791
832
|
}
|
|
792
|
-
async
|
|
793
|
-
|
|
794
|
-
await this.
|
|
833
|
+
async clickRemoveTabWithName(name) {
|
|
834
|
+
const tab = this.page.locator('uui-tab').filter({ hasText: name });
|
|
835
|
+
await this.hoverAndClick(tab, tab.locator('[label="Remove"]'));
|
|
795
836
|
}
|
|
796
|
-
async
|
|
797
|
-
|
|
798
|
-
await
|
|
799
|
-
await groupNameTxt.clear();
|
|
800
|
-
await groupNameTxt.fill(groupName);
|
|
837
|
+
async clickStructureTab() {
|
|
838
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.medium);
|
|
839
|
+
await this.click(this.structureTabBtn);
|
|
801
840
|
}
|
|
802
|
-
|
|
803
|
-
|
|
841
|
+
getTabLocatorWithName(name) {
|
|
842
|
+
return this.page.getByRole('tab', { name: name });
|
|
804
843
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
844
|
+
// Validation Methods
|
|
845
|
+
async clickMandatoryToggle() {
|
|
846
|
+
await this.click(this.mandatoryToggle);
|
|
808
847
|
}
|
|
809
|
-
async
|
|
810
|
-
await this.
|
|
811
|
-
await (0, test_1.expect)(this.newNameTxt).toBeVisible();
|
|
812
|
-
await this.newNameTxt.click();
|
|
813
|
-
await this.newNameTxt.clear();
|
|
814
|
-
await this.newNameTxt.fill(newName);
|
|
815
|
-
await this.renameModalBtn.click();
|
|
816
|
-
await this.page.waitForTimeout(500);
|
|
848
|
+
async selectValidationOption(option) {
|
|
849
|
+
await this.selectByValue(this.validation, option);
|
|
817
850
|
}
|
|
818
|
-
async
|
|
819
|
-
|
|
851
|
+
async enterRegEx(regEx) {
|
|
852
|
+
await this.enterText(this.regexTxt, regEx, { clearFirst: false });
|
|
820
853
|
}
|
|
821
|
-
async
|
|
822
|
-
await (
|
|
823
|
-
await (0, test_1.expect)(dragToSelector).toBeVisible();
|
|
824
|
-
const targetLocation = await dragToSelector.boundingBox();
|
|
825
|
-
const elementCenterX = targetLocation.x + targetLocation.width / 2;
|
|
826
|
-
const elementCenterY = targetLocation.y + targetLocation.height / 2;
|
|
827
|
-
await dragFromSelector.hover();
|
|
828
|
-
await this.page.mouse.move(10, 10);
|
|
829
|
-
await dragFromSelector.hover();
|
|
830
|
-
await this.page.mouse.down();
|
|
831
|
-
await this.page.waitForTimeout(400);
|
|
832
|
-
await this.page.mouse.move(elementCenterX + horizontalOffset, elementCenterY + verticalOffset, { steps: steps });
|
|
833
|
-
await this.page.waitForTimeout(400);
|
|
834
|
-
await this.page.mouse.up();
|
|
854
|
+
async enterRegExMessage(regExMessage) {
|
|
855
|
+
await this.enterText(this.regexMessageTxt, regExMessage, { clearFirst: false });
|
|
835
856
|
}
|
|
836
|
-
async
|
|
837
|
-
await
|
|
838
|
-
return this.page.getByRole('button', { name: name });
|
|
857
|
+
async isValidationMessageVisible(message, isVisible = true) {
|
|
858
|
+
await this.isVisible(this.validationMessage.filter({ hasText: message }), isVisible);
|
|
839
859
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
await this.
|
|
860
|
+
// Composition & Structure Methods
|
|
861
|
+
async clickCompositionsButton() {
|
|
862
|
+
await this.click(this.compositionsBtn);
|
|
843
863
|
}
|
|
844
|
-
async
|
|
845
|
-
await this.
|
|
846
|
-
await (0, test_1.expect)(this.insertValueBtn).toBeVisible();
|
|
847
|
-
await this.insertValueBtn.click();
|
|
848
|
-
await (0, test_1.expect)(this.chooseFieldDropDown).toBeVisible();
|
|
849
|
-
await this.chooseFieldDropDown.click();
|
|
850
|
-
await (0, test_1.expect)(this.systemFieldsOption).toBeVisible();
|
|
851
|
-
await this.systemFieldsOption.click();
|
|
852
|
-
await (0, test_1.expect)(this.chooseFieldValueDropDown).toBeVisible();
|
|
853
|
-
await this.chooseFieldValueDropDown.click();
|
|
854
|
-
await (0, test_1.expect)(this.page.getByText(fieldValue)).toBeVisible();
|
|
855
|
-
await this.page.getByText(fieldValue).click();
|
|
856
|
-
await this.clickSubmitButton();
|
|
864
|
+
async clickAllowAtRootButton() {
|
|
865
|
+
await this.click(this.allowAtRootBtn);
|
|
857
866
|
}
|
|
858
|
-
async
|
|
859
|
-
await this.
|
|
860
|
-
await (0, test_1.expect)(this.insertPartialViewBtn).toBeVisible();
|
|
861
|
-
await this.insertPartialViewBtn.click();
|
|
862
|
-
await (0, test_1.expect)(this.page.getByLabel(partialViewName)).toBeVisible();
|
|
863
|
-
await this.page.getByLabel(partialViewName).click();
|
|
864
|
-
await this.clickChooseButton();
|
|
867
|
+
async clickAllowedChildNodesButton() {
|
|
868
|
+
await this.click(this.allowedChildNodesModal.locator(this.chooseBtn));
|
|
865
869
|
}
|
|
866
|
-
async
|
|
867
|
-
|
|
868
|
-
const propertyEditor = this.page.locator('umb-content-type-design-editor-property', { hasText: name });
|
|
869
|
-
await (0, test_1.expect)(propertyEditor).toBeVisible();
|
|
870
|
-
await propertyEditor.hover();
|
|
871
|
-
await (0, test_1.expect)(propertyEditor.getByLabel('Delete')).toBeVisible();
|
|
872
|
-
// Force click is needed
|
|
873
|
-
await propertyEditor.getByLabel('Delete').click({ force: true });
|
|
874
|
-
await this.clickConfirmToDeleteButton();
|
|
870
|
+
async clickAddCollectionButton() {
|
|
871
|
+
await this.click(this.addCollectionBtn);
|
|
875
872
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
await this.
|
|
873
|
+
// Reorder Methods
|
|
874
|
+
async clickIAmDoneReorderingButton() {
|
|
875
|
+
await this.click(this.iAmDoneReorderingBtn);
|
|
879
876
|
}
|
|
880
|
-
async
|
|
881
|
-
await this.
|
|
882
|
-
await this.clickConfirmToDeleteButton();
|
|
877
|
+
async clickReorderButton() {
|
|
878
|
+
await this.click(this.reorderBtn);
|
|
883
879
|
}
|
|
884
|
-
async
|
|
885
|
-
await
|
|
886
|
-
await this.deleteBtn.click();
|
|
880
|
+
async clickLabelAboveButton() {
|
|
881
|
+
await this.click(this.labelAboveBtn);
|
|
887
882
|
}
|
|
883
|
+
// Query Builder Methods
|
|
888
884
|
async clickQueryBuilderButton() {
|
|
889
|
-
await
|
|
890
|
-
await this.
|
|
891
|
-
|
|
885
|
+
await this.click(this.queryBuilderBtn);
|
|
886
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
887
|
+
}
|
|
888
|
+
async addQueryBuilderWithOrderByStatement(propertyAlias, isAscending) {
|
|
889
|
+
await this.click(this.queryBuilderBtn, { timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
890
|
+
await this.click(this.orderByPropertyAliasBtn);
|
|
891
|
+
await this.waitAndSelectQueryBuilderDropDownList(propertyAlias);
|
|
892
|
+
await this.click(this.orderByPropertyAliasBtn);
|
|
893
|
+
if (!isAscending) {
|
|
894
|
+
await this.click(this.ascendingBtn);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
async addQueryBuilderWithWhereStatement(propertyAlias, operator, constrainValue) {
|
|
898
|
+
await this.click(this.queryBuilderBtn, { timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
899
|
+
await this.click(this.wherePropertyAliasBtn);
|
|
900
|
+
await this.waitAndSelectQueryBuilderDropDownList(propertyAlias);
|
|
901
|
+
await this.click(this.whereOperatorBtn);
|
|
902
|
+
await this.waitAndSelectQueryBuilderDropDownList(operator);
|
|
903
|
+
await this.enterText(this.whereConstrainValueTxt, constrainValue);
|
|
904
|
+
await this.pressKey(this.whereConstrainValueTxt, 'Enter');
|
|
905
|
+
}
|
|
906
|
+
async waitAndSelectQueryBuilderDropDownList(option) {
|
|
907
|
+
const ddlOption = this.page.locator('[open]').locator('uui-combobox-list-option').filter({ hasText: option }).first();
|
|
908
|
+
await this.click(ddlOption, { timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
892
909
|
}
|
|
893
910
|
async chooseRootContentInQueryBuilder(contentName) {
|
|
894
|
-
await
|
|
895
|
-
await this.chooseRootContentBtn.click();
|
|
911
|
+
await this.click(this.chooseRootContentBtn);
|
|
896
912
|
await this.clickModalMenuItemWithName(contentName);
|
|
897
913
|
await this.clickChooseButton();
|
|
898
914
|
}
|
|
899
|
-
async
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
const firstGroupValue = await firstGroup.getByLabel('Group').inputValue();
|
|
903
|
-
const secondGroupValue = await secondGroup.getByLabel('Group').inputValue();
|
|
904
|
-
const dragToLocator = firstGroup.locator('[slot="header"]').first();
|
|
905
|
-
const dragFromLocator = secondGroup.locator('[slot="header"]').first();
|
|
906
|
-
await this.dragAndDrop(dragFromLocator, dragToLocator, 0, 0, 20);
|
|
907
|
-
return { firstGroupValue, secondGroupValue };
|
|
908
|
-
}
|
|
909
|
-
async clickAllowedChildNodesButton() {
|
|
910
|
-
await (0, test_1.expect)(this.allowedChildNodesModal.locator(this.chooseBtn)).toBeVisible();
|
|
911
|
-
await this.allowedChildNodesModal.locator(this.chooseBtn).click();
|
|
912
|
-
}
|
|
913
|
-
async clickAddCollectionButton() {
|
|
914
|
-
await (0, test_1.expect)(this.addCollectionBtn).toBeVisible();
|
|
915
|
-
await this.addCollectionBtn.click();
|
|
915
|
+
async isQueryBuilderCodeShown(code) {
|
|
916
|
+
await this.click(this.queryBuilderShowCode);
|
|
917
|
+
await this.containsText(this.queryBuilderShowCode, code, ConstantHelper_1.ConstantHelper.timeout.long);
|
|
916
918
|
}
|
|
917
919
|
async doesReturnedItemsHaveCount(itemCount) {
|
|
918
|
-
await
|
|
920
|
+
await this.containsText(this.returnedItemsCount, itemCount.toString() + ' published items returned');
|
|
919
921
|
}
|
|
920
922
|
async doesQueryResultHaveContentName(contentName) {
|
|
921
|
-
await
|
|
922
|
-
}
|
|
923
|
-
async deleteGroup(groupName) {
|
|
924
|
-
await this.page.waitForTimeout(1000);
|
|
925
|
-
const groups = this.page.locator('umb-content-type-design-editor-group').all();
|
|
926
|
-
for (const group of await groups) {
|
|
927
|
-
if (await group.getByLabel('Group', { exact: true }).inputValue() === groupName) {
|
|
928
|
-
const headerActionsDeleteLocator = group.locator('[slot="header-actions"]').getByLabel('Delete');
|
|
929
|
-
await (0, test_1.expect)(headerActionsDeleteLocator).toBeVisible();
|
|
930
|
-
// Force click is needed
|
|
931
|
-
await headerActionsDeleteLocator.click({ force: true });
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
923
|
+
await this.containsText(this.queryResults, contentName);
|
|
935
924
|
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
await this.
|
|
939
|
-
|
|
940
|
-
await
|
|
941
|
-
await
|
|
925
|
+
// Insert Methods
|
|
926
|
+
async insertDictionaryItem(dictionaryName) {
|
|
927
|
+
await this.clickInsertButton();
|
|
928
|
+
await this.click(this.insertDictionaryItemBtn);
|
|
929
|
+
await this.click(this.page.getByLabel(dictionaryName));
|
|
930
|
+
await this.click(this.chooseBtn);
|
|
942
931
|
}
|
|
943
|
-
async
|
|
944
|
-
await
|
|
945
|
-
await this.
|
|
932
|
+
async insertSystemFieldValue(fieldValue) {
|
|
933
|
+
await this.clickInsertButton();
|
|
934
|
+
await this.click(this.insertValueBtn);
|
|
935
|
+
await this.click(this.chooseFieldDropDown);
|
|
936
|
+
await this.click(this.systemFieldsOption);
|
|
937
|
+
await this.click(this.chooseFieldValueDropDown);
|
|
938
|
+
await this.click(this.page.getByText(fieldValue));
|
|
939
|
+
await this.clickSubmitButton();
|
|
946
940
|
}
|
|
947
|
-
async
|
|
948
|
-
await
|
|
949
|
-
await this.
|
|
941
|
+
async insertPartialView(partialViewName) {
|
|
942
|
+
await this.clickInsertButton();
|
|
943
|
+
await this.click(this.insertPartialViewBtn);
|
|
944
|
+
await this.click(this.page.getByLabel(partialViewName));
|
|
945
|
+
await this.clickChooseButton();
|
|
950
946
|
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
await
|
|
947
|
+
// Rename Methods
|
|
948
|
+
async rename(newName) {
|
|
949
|
+
await this.clickRenameActionMenuOption();
|
|
950
|
+
await this.click(this.newNameTxt);
|
|
951
|
+
await this.enterText(this.newNameTxt, newName);
|
|
952
|
+
await this.click(this.renameModalBtn);
|
|
953
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
957
954
|
}
|
|
958
|
-
|
|
959
|
-
|
|
955
|
+
// Search & Filter Methods
|
|
956
|
+
async searchForTypeToFilterValue(searchValue) {
|
|
957
|
+
await this.enterText(this.typeToFilterSearchTxt, searchValue, { clearFirst: false });
|
|
960
958
|
}
|
|
961
|
-
|
|
962
|
-
|
|
959
|
+
// Description Methods
|
|
960
|
+
async enterDescription(description) {
|
|
961
|
+
await this.enterText(this.enterDescriptionTxt, description);
|
|
963
962
|
}
|
|
964
|
-
|
|
965
|
-
return this.
|
|
963
|
+
async doesDescriptionHaveValue(value, index = 0) {
|
|
964
|
+
return await this.hasValue(this.descriptionBtn.nth(index), value);
|
|
966
965
|
}
|
|
967
|
-
|
|
968
|
-
async
|
|
969
|
-
await
|
|
966
|
+
// Drag and Drop Methods
|
|
967
|
+
async dragAndDrop(dragFromSelector, dragToSelector, verticalOffset = 0, horizontalOffset = 0, steps = 5) {
|
|
968
|
+
await this.waitForVisible(dragFromSelector);
|
|
969
|
+
await this.waitForVisible(dragToSelector);
|
|
970
|
+
const targetLocation = await dragToSelector.boundingBox();
|
|
971
|
+
const elementCenterX = targetLocation.x + targetLocation.width / 2;
|
|
972
|
+
const elementCenterY = targetLocation.y + targetLocation.height / 2;
|
|
973
|
+
await this.hover(dragFromSelector);
|
|
974
|
+
await this.page.mouse.move(10, 10);
|
|
975
|
+
await this.hover(dragFromSelector);
|
|
976
|
+
await this.page.mouse.down();
|
|
977
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
978
|
+
await this.page.mouse.move(elementCenterX + horizontalOffset, elementCenterY + verticalOffset, { steps: steps });
|
|
979
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
980
|
+
await this.page.mouse.up();
|
|
970
981
|
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
await this.
|
|
974
|
-
await this.page.waitForTimeout(500);
|
|
982
|
+
// Create Link Methods
|
|
983
|
+
async clickCreateLink() {
|
|
984
|
+
await this.click(this.createLink);
|
|
975
985
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
await this.
|
|
979
|
-
await this.page.waitForTimeout(500);
|
|
986
|
+
// Recycle Bin Methods
|
|
987
|
+
async clickRecycleBinButton() {
|
|
988
|
+
await this.click(this.recycleBinBtn);
|
|
980
989
|
}
|
|
981
990
|
async reloadRecycleBin(containsItems = true) {
|
|
982
|
-
await
|
|
983
|
-
// If the Recycle Bin does not contain any items,0 the caret button should not be visible. and we should not try to click it
|
|
991
|
+
await this.waitForVisible(this.recycleBinMenuItem);
|
|
984
992
|
if (!containsItems) {
|
|
985
993
|
await this.clickReloadChildrenActionMenuOption();
|
|
986
|
-
await
|
|
994
|
+
await this.isVisible(this.recycleBinMenuItemCaretBtn, false);
|
|
987
995
|
return;
|
|
988
996
|
}
|
|
989
997
|
await this.clickActionsMenuForName('Recycle Bin');
|
|
990
998
|
await this.clickReloadChildrenActionMenuOption();
|
|
991
999
|
await this.openCaretButtonForName('Recycle Bin');
|
|
992
1000
|
}
|
|
993
|
-
async clickRecycleBinButton() {
|
|
994
|
-
await (0, test_1.expect)(this.recycleBinBtn).toBeVisible();
|
|
995
|
-
await this.recycleBinBtn.click();
|
|
996
|
-
}
|
|
997
1001
|
async isItemVisibleInRecycleBin(item, isVisible = true, isReload = true) {
|
|
998
1002
|
if (isReload) {
|
|
999
1003
|
await this.reloadRecycleBin(isVisible);
|
|
1000
1004
|
}
|
|
1001
|
-
return await
|
|
1005
|
+
return await this.isVisible(this.page.locator('[label="Recycle Bin"] [label="' + item + '"]'), isVisible);
|
|
1002
1006
|
}
|
|
1007
|
+
// View Methods
|
|
1003
1008
|
async changeToGridView() {
|
|
1004
|
-
await
|
|
1005
|
-
await this.
|
|
1006
|
-
await this.gridBtn.click();
|
|
1009
|
+
await this.click(this.viewBundleBtn);
|
|
1010
|
+
await this.click(this.gridBtn);
|
|
1007
1011
|
}
|
|
1008
1012
|
async changeToListView() {
|
|
1009
|
-
await
|
|
1010
|
-
await this.
|
|
1011
|
-
await this.listBtn.click();
|
|
1013
|
+
await this.click(this.viewBundleBtn);
|
|
1014
|
+
await this.click(this.listBtn);
|
|
1012
1015
|
}
|
|
1013
1016
|
async isViewBundleButtonVisible(isVisible = true) {
|
|
1014
|
-
return
|
|
1015
|
-
}
|
|
1016
|
-
async doesSuccessNotificationHaveText(text, isVisible = true, deleteNotification = false, timeout = 5000) {
|
|
1017
|
-
const response = await (0, test_1.expect)(this.successNotification.filter({ hasText: text })).toBeVisible({
|
|
1018
|
-
visible: isVisible,
|
|
1019
|
-
timeout: timeout
|
|
1020
|
-
});
|
|
1021
|
-
if (deleteNotification) {
|
|
1022
|
-
await this.successNotification.filter({ hasText: text }).getByLabel('close').click({ force: true });
|
|
1023
|
-
}
|
|
1024
|
-
return response;
|
|
1025
|
-
}
|
|
1026
|
-
async doesErrorNotificationHaveText(text, isVisible = true, deleteNotification = false) {
|
|
1027
|
-
const response = await (0, test_1.expect)(this.errorNotification.filter({ hasText: text })).toBeVisible({ visible: isVisible });
|
|
1028
|
-
if (deleteNotification) {
|
|
1029
|
-
await this.errorNotification.filter({ hasText: text }).locator('svg').click();
|
|
1030
|
-
}
|
|
1031
|
-
return response;
|
|
1032
|
-
}
|
|
1033
|
-
async isSectionWithNameVisible(sectionName, isVisible = true) {
|
|
1034
|
-
await (0, test_1.expect)(this.page.getByRole('tab', { name: sectionName })).toBeVisible({ visible: isVisible });
|
|
1017
|
+
return this.isVisible(this.viewBundleBtn, isVisible);
|
|
1035
1018
|
}
|
|
1019
|
+
// Media Methods
|
|
1036
1020
|
async clickMediaWithName(name) {
|
|
1037
|
-
await
|
|
1038
|
-
await this.mediaCardItems.filter({ hasText: name }).click();
|
|
1039
|
-
}
|
|
1040
|
-
async clickChooseContentStartNodeButton() {
|
|
1041
|
-
await (0, test_1.expect)(this.chooseDocumentInputBtn).toBeVisible();
|
|
1042
|
-
await this.chooseDocumentInputBtn.click();
|
|
1043
|
-
}
|
|
1044
|
-
async clickChooseMediaStartNodeButton() {
|
|
1045
|
-
await (0, test_1.expect)(this.chooseMediaInputBtn).toBeVisible();
|
|
1046
|
-
await this.chooseMediaInputBtn.click();
|
|
1047
|
-
}
|
|
1048
|
-
async clickActionButton() {
|
|
1049
|
-
await (0, test_1.expect)(this.actionBtn).toBeVisible();
|
|
1050
|
-
await this.actionBtn.click();
|
|
1051
|
-
}
|
|
1052
|
-
async clickReferenceNodeLinkWithName(name) {
|
|
1053
|
-
await (0, test_1.expect)(this.page.locator('[name="' + name + '"] a#open-part')).toBeVisible();
|
|
1054
|
-
await this.page.locator('[name="' + name + '"] a#open-part').click();
|
|
1055
|
-
}
|
|
1056
|
-
async clickLinkWithName(name, isExact = false) {
|
|
1057
|
-
await (0, test_1.expect)(this.page.getByRole('link', { name: name, exact: isExact })).toBeVisible();
|
|
1058
|
-
await this.page.getByRole('link', { name: name, exact: isExact }).click();
|
|
1059
|
-
}
|
|
1060
|
-
async clickMediaPickerModalSubmitButton() {
|
|
1061
|
-
await (0, test_1.expect)(this.mediaPickerModalSubmitBtn).toBeVisible();
|
|
1062
|
-
await this.mediaPickerModalSubmitBtn.click();
|
|
1021
|
+
await this.click(this.mediaCardItems.filter({ hasText: name }));
|
|
1063
1022
|
}
|
|
1064
1023
|
async selectMediaWithName(mediaName, isForce = false) {
|
|
1065
1024
|
const mediaLocator = this.mediaCardItems.filter({ hasText: mediaName });
|
|
1066
|
-
await
|
|
1025
|
+
await this.waitForVisible(mediaLocator);
|
|
1026
|
+
// Using direct click with position option (not supported by BasePage.click)
|
|
1067
1027
|
await mediaLocator.click({ position: { x: 0.5, y: 0.5 }, force: isForce });
|
|
1068
1028
|
}
|
|
1069
1029
|
async selectMediaWithTestId(mediaKey) {
|
|
1070
1030
|
const locator = this.page.getByTestId('media:' + mediaKey);
|
|
1071
|
-
await
|
|
1031
|
+
await this.waitForVisible(locator);
|
|
1032
|
+
// Using direct click with position option (not supported by BasePage.click)
|
|
1072
1033
|
await locator.click({ position: { x: 0.5, y: 0.5 } });
|
|
1073
1034
|
}
|
|
1074
|
-
async
|
|
1075
|
-
await
|
|
1076
|
-
await this.createModalBtn.click();
|
|
1035
|
+
async clickMediaPickerModalSubmitButton() {
|
|
1036
|
+
await this.click(this.mediaPickerModalSubmitBtn);
|
|
1077
1037
|
}
|
|
1078
1038
|
async clickMediaCaptionAltTextModalSubmitButton() {
|
|
1079
|
-
await
|
|
1080
|
-
await this.mediaCaptionAltTextModalSubmitBtn.click();
|
|
1081
|
-
}
|
|
1082
|
-
// Embed Modal
|
|
1083
|
-
async enterEmbeddedURL(value) {
|
|
1084
|
-
await (0, test_1.expect)(this.embeddedURLTxt).toBeVisible();
|
|
1085
|
-
await this.embeddedURLTxt.clear();
|
|
1086
|
-
await this.embeddedURLTxt.fill(value);
|
|
1039
|
+
await this.click(this.mediaCaptionAltTextModalSubmitBtn);
|
|
1087
1040
|
}
|
|
1088
|
-
async
|
|
1089
|
-
await
|
|
1090
|
-
await this.embeddedRetrieveBtn.click();
|
|
1091
|
-
}
|
|
1092
|
-
async clickEmbeddedMediaModalConfirmButton() {
|
|
1093
|
-
await (0, test_1.expect)(this.embeddedMediaModalConfirmBtn).toBeVisible();
|
|
1094
|
-
await this.embeddedMediaModalConfirmBtn.click();
|
|
1041
|
+
async clickChooseMediaStartNodeButton() {
|
|
1042
|
+
await this.click(this.chooseMediaInputBtn);
|
|
1095
1043
|
}
|
|
1096
|
-
async
|
|
1097
|
-
await
|
|
1044
|
+
async isMediaCardItemWithNameDisabled(itemName) {
|
|
1045
|
+
await this.hasAttribute(this.mediaCardItems.filter({ hasText: itemName }), 'class', 'not-allowed');
|
|
1098
1046
|
}
|
|
1099
|
-
async
|
|
1100
|
-
await
|
|
1101
|
-
await (0, test_1.expect)(this.submitBtn).toHaveAttribute('disabled');
|
|
1047
|
+
async isMediaCardItemWithNameVisible(itemName, isVisible = true) {
|
|
1048
|
+
await this.isVisible(this.mediaCardItems.filter({ hasText: itemName }), isVisible);
|
|
1102
1049
|
}
|
|
1103
1050
|
async doesMediaHaveThumbnail(mediaId, thumbnailIconName, thumbnailImage) {
|
|
1104
1051
|
const mediaThumbnailLocator = this.page.getByTestId('media:' + mediaId);
|
|
1105
1052
|
if (thumbnailIconName === 'image') {
|
|
1106
1053
|
const regexImageSrc = new RegExp(`^${thumbnailImage}.*`);
|
|
1107
|
-
await
|
|
1054
|
+
await this.hasAttribute(mediaThumbnailLocator.locator('umb-imaging-thumbnail img'), 'src', regexImageSrc.toString());
|
|
1108
1055
|
}
|
|
1109
1056
|
else {
|
|
1110
|
-
await
|
|
1057
|
+
await this.hasAttribute(mediaThumbnailLocator.locator('umb-imaging-thumbnail umb-icon'), 'name', thumbnailIconName);
|
|
1111
1058
|
}
|
|
1112
1059
|
}
|
|
1060
|
+
async isInputDropzoneVisible(isVisible = true) {
|
|
1061
|
+
await this.isVisible(this.inputDropzone, isVisible);
|
|
1062
|
+
}
|
|
1063
|
+
async isImageCropperFieldVisible(isVisible = true) {
|
|
1064
|
+
await this.isVisible(this.imageCropperField, isVisible);
|
|
1065
|
+
}
|
|
1066
|
+
async isInputUploadFieldVisible(isVisible = true) {
|
|
1067
|
+
await this.isVisible(this.inputUploadField, isVisible);
|
|
1068
|
+
}
|
|
1069
|
+
// Upload Methods
|
|
1070
|
+
async clickToUploadButton() {
|
|
1071
|
+
await this.click(this.clickToUploadBtn);
|
|
1072
|
+
}
|
|
1073
|
+
async uploadFile(filePath) {
|
|
1074
|
+
const [fileChooser] = await Promise.all([
|
|
1075
|
+
this.page.waitForEvent('filechooser'),
|
|
1076
|
+
await this.clickToUploadButton(),
|
|
1077
|
+
]);
|
|
1078
|
+
await fileChooser.setFiles(filePath);
|
|
1079
|
+
}
|
|
1080
|
+
// Embedded Media Methods
|
|
1081
|
+
async enterEmbeddedURL(value) {
|
|
1082
|
+
await this.enterText(this.embeddedURLTxt, value);
|
|
1083
|
+
}
|
|
1084
|
+
async clickEmbeddedRetrieveButton() {
|
|
1085
|
+
await this.click(this.embeddedRetrieveBtn);
|
|
1086
|
+
}
|
|
1087
|
+
async clickEmbeddedMediaModalConfirmButton() {
|
|
1088
|
+
await this.click(this.embeddedMediaModalConfirmBtn);
|
|
1089
|
+
}
|
|
1090
|
+
async waitForEmbeddedPreviewVisible() {
|
|
1091
|
+
await this.waitForVisible(this.embeddedPreview);
|
|
1092
|
+
}
|
|
1093
|
+
// Document Methods
|
|
1094
|
+
async clickChooseContentStartNodeButton() {
|
|
1095
|
+
await this.click(this.chooseDocumentInputBtn);
|
|
1096
|
+
}
|
|
1097
|
+
// User Methods
|
|
1113
1098
|
async clickCurrentUserAvatarButton() {
|
|
1114
|
-
await
|
|
1115
|
-
await this.currentUserAvatarBtn.click({ force: true });
|
|
1099
|
+
await this.click(this.currentUserAvatarBtn, { force: true });
|
|
1116
1100
|
}
|
|
1101
|
+
// Collection Methods
|
|
1117
1102
|
async clickCreateActionButton() {
|
|
1118
|
-
await
|
|
1119
|
-
await this.createActionBtn.click();
|
|
1103
|
+
await this.click(this.createActionBtn);
|
|
1120
1104
|
}
|
|
1121
1105
|
async clickCreateActionWithOptionName(optionName) {
|
|
1122
1106
|
await this.clickCreateActionButton();
|
|
1123
1107
|
const createOptionLocator = this.createActionButtonCollection.locator('[label="' + optionName + '"]');
|
|
1124
|
-
await
|
|
1125
|
-
await createOptionLocator.click();
|
|
1108
|
+
await this.click(createOptionLocator);
|
|
1126
1109
|
}
|
|
1127
1110
|
async doesCollectionTreeItemTableRowHaveName(name) {
|
|
1128
|
-
await
|
|
1129
|
-
await
|
|
1111
|
+
await this.waitForVisible(this.collectionTreeItemTableRow.first());
|
|
1112
|
+
await this.isVisible(this.collectionTreeItemTableRow.locator('[label="' + name + '"]'));
|
|
1130
1113
|
}
|
|
1131
1114
|
async doesCollectionTreeItemTableRowHaveIcon(name, icon) {
|
|
1132
|
-
await
|
|
1133
|
-
await
|
|
1115
|
+
await this.waitForVisible(this.collectionTreeItemTableRow.first());
|
|
1116
|
+
await this.isVisible(this.collectionTreeItemTableRow.filter({ hasText: name }).locator('umb-icon').locator('[name="' + icon + '"]'));
|
|
1134
1117
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
await this.
|
|
1118
|
+
// Reference Methods
|
|
1119
|
+
async clickReferenceNodeLinkWithName(name) {
|
|
1120
|
+
await this.click(this.page.locator('[name="' + name + '"] a#open-part'));
|
|
1138
1121
|
}
|
|
1139
1122
|
async doesReferenceHeadlineHaveText(text) {
|
|
1140
|
-
await
|
|
1123
|
+
await this.containsText(this.referenceHeadline, text);
|
|
1141
1124
|
}
|
|
1142
1125
|
async isReferenceHeadlineVisible(isVisible) {
|
|
1143
|
-
await
|
|
1126
|
+
await this.isVisible(this.referenceHeadline, isVisible);
|
|
1144
1127
|
}
|
|
1145
1128
|
async doesReferenceItemsHaveCount(count) {
|
|
1146
|
-
await
|
|
1129
|
+
await this.hasCount(this.entityItemRef, count);
|
|
1147
1130
|
}
|
|
1148
1131
|
async isReferenceItemNameVisible(itemName) {
|
|
1149
|
-
await
|
|
1132
|
+
await this.isVisible(this.entityItemRef.locator('uui-ref-node[name="' + itemName + '"]'));
|
|
1150
1133
|
}
|
|
1151
1134
|
async doesReferencesContainText(text) {
|
|
1152
|
-
await
|
|
1153
|
-
}
|
|
1154
|
-
async isValidationMessageVisible(message, isVisible = true) {
|
|
1155
|
-
await (0, test_1.expect)(this.validationMessage.filter({ hasText: message })).toBeVisible({ visible: isVisible });
|
|
1156
|
-
}
|
|
1157
|
-
async isSuccessStateIconVisible() {
|
|
1158
|
-
await (0, test_1.expect)(this.successStateIcon).toBeVisible();
|
|
1159
|
-
}
|
|
1160
|
-
async isPropertyEditorUiWithNameReadOnly(name) {
|
|
1161
|
-
const propertyEditorUiLocator = this.page.locator('umb-property-editor-ui-' + name);
|
|
1162
|
-
await (0, test_1.expect)(propertyEditorUiLocator).toHaveAttribute('readonly');
|
|
1163
|
-
}
|
|
1164
|
-
async isPropertyEditorUiWithNameVisible(name, isVisible = true) {
|
|
1165
|
-
const propertyEditorUiLocator = this.page.locator('umb-property-editor-ui-' + name);
|
|
1166
|
-
await (0, test_1.expect)(propertyEditorUiLocator).toBeVisible({ visible: isVisible });
|
|
1135
|
+
await this.containsText(this.confirmActionModalEntityReferences, text);
|
|
1167
1136
|
}
|
|
1168
|
-
// Entity Action
|
|
1137
|
+
// Entity Action Methods
|
|
1169
1138
|
async clickEntityActionWithName(name) {
|
|
1170
1139
|
const regex = new RegExp(`^entity-action:.*${name}$`);
|
|
1171
|
-
await this.openEntityAction.getByTestId(regex).filter({ has: this.page.locator(':visible') })
|
|
1140
|
+
await this.click(this.openEntityAction.getByTestId(regex).filter({ has: this.page.locator(':visible') }));
|
|
1172
1141
|
}
|
|
1173
1142
|
async clickCreateActionMenuOption() {
|
|
1174
1143
|
await this.clickEntityActionWithName('Create');
|
|
@@ -1230,69 +1199,63 @@ class UiBaseLocators {
|
|
|
1230
1199
|
async clickUpdateActionMenuOption() {
|
|
1231
1200
|
await this.clickEntityActionWithName('Update');
|
|
1232
1201
|
}
|
|
1233
|
-
async
|
|
1234
|
-
await
|
|
1235
|
-
await this.openedModal.locator('uui-menu-item[label="' + name + '"]').click();
|
|
1236
|
-
}
|
|
1237
|
-
async isModalMenuItemWithNameDisabled(name) {
|
|
1238
|
-
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toHaveAttribute('disabled');
|
|
1239
|
-
}
|
|
1240
|
-
async doesPropertyHaveInvalidBadge(propertyName) {
|
|
1241
|
-
await (0, test_1.expect)(this.page.locator('umb-property-layout').filter({ hasText: propertyName }).locator('#invalid-badge uui-badge')).toBeVisible();
|
|
1242
|
-
}
|
|
1243
|
-
async isModalMenuItemWithNameVisible(name, isVisible = true) {
|
|
1244
|
-
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toBeVisible({ visible: isVisible });
|
|
1202
|
+
async clickLockActionMenuOption() {
|
|
1203
|
+
await this.clickEntityActionWithName('Lock');
|
|
1245
1204
|
}
|
|
1205
|
+
// Entity Item Methods
|
|
1246
1206
|
async clickEntityItemByName(itemName) {
|
|
1247
|
-
await
|
|
1248
|
-
await this.page.locator('uui-ref-node,umb-ref-item[name="' + itemName + '"]').click();
|
|
1249
|
-
}
|
|
1250
|
-
async isMediaCardItemWithNameDisabled(itemName) {
|
|
1251
|
-
await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: itemName })).toHaveAttribute('class', 'not-allowed');
|
|
1252
|
-
}
|
|
1253
|
-
async isMediaCardItemWithNameVisible(itemName, isVisible = true) {
|
|
1254
|
-
await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: itemName })).toBeVisible({ visible: isVisible });
|
|
1207
|
+
await this.click(this.page.locator('uui-ref-node,umb-ref-item[name="' + itemName + '"]'));
|
|
1255
1208
|
}
|
|
1209
|
+
// Workspace Action Methods
|
|
1256
1210
|
async clickWorkspaceActionMenuButton() {
|
|
1257
|
-
await
|
|
1258
|
-
await this.workspaceActionMenuBtn.click();
|
|
1259
|
-
}
|
|
1260
|
-
async clickLockActionMenuOption() {
|
|
1261
|
-
await this.clickEntityActionWithName('Lock');
|
|
1211
|
+
await this.click(this.workspaceActionMenuBtn);
|
|
1262
1212
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1213
|
+
// Pagination Methods
|
|
1214
|
+
async clickNextPaginationButton() {
|
|
1215
|
+
await this.click(this.nextPaginationBtn);
|
|
1265
1216
|
}
|
|
1217
|
+
// Editor Methods
|
|
1266
1218
|
async enterMonacoEditorValue(value) {
|
|
1267
|
-
await
|
|
1268
|
-
await this.monacoEditor
|
|
1269
|
-
await this.
|
|
1270
|
-
await this.page.keyboard.press('Backspace');
|
|
1219
|
+
await this.click(this.monacoEditor);
|
|
1220
|
+
await this.pressKey(this.monacoEditor, 'Control+A');
|
|
1221
|
+
await this.pressKey(this.monacoEditor, 'Backspace');
|
|
1271
1222
|
await this.page.keyboard.insertText(value);
|
|
1272
1223
|
}
|
|
1224
|
+
// Loader Methods
|
|
1273
1225
|
async waitUntilUiLoaderIsNoLongerVisible() {
|
|
1274
|
-
await
|
|
1226
|
+
await this.waitForHidden(this.uiLoader, 10000);
|
|
1227
|
+
}
|
|
1228
|
+
// Dashboard Methods
|
|
1229
|
+
async isDashboardTabWithNameVisible(name, isVisible = true) {
|
|
1230
|
+
await this.isVisible(this.page.locator('uui-tab[label="' + name + '"]'), isVisible);
|
|
1275
1231
|
}
|
|
1276
1232
|
async isWorkspaceViewTabWithAliasVisible(alias, isVisible = true) {
|
|
1277
|
-
await
|
|
1233
|
+
await this.isVisible(this.page.getByTestId('workspace:view-link:' + alias), isVisible);
|
|
1278
1234
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
await this.
|
|
1235
|
+
// Submit Button Methods
|
|
1236
|
+
async isSubmitButtonDisabled() {
|
|
1237
|
+
await this.isVisible(this.submitBtn);
|
|
1238
|
+
await this.isDisabled(this.submitBtn);
|
|
1282
1239
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1240
|
+
// Data Element Methods
|
|
1241
|
+
async clickDataElement(elementName, options = null) {
|
|
1242
|
+
await this.click(this.page.locator(`[data-element="${elementName}"]`), options);
|
|
1285
1243
|
}
|
|
1286
|
-
async
|
|
1287
|
-
|
|
1244
|
+
async getDataElement(elementName) {
|
|
1245
|
+
return this.page.locator(`[data-element="${elementName}"]`);
|
|
1288
1246
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1247
|
+
getLocatorWithDataMark(dataMark) {
|
|
1248
|
+
return this.page.getByTestId(dataMark);
|
|
1291
1249
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1250
|
+
// Text Visibility Methods
|
|
1251
|
+
async isTextWithExactNameVisible(name, isVisible = true) {
|
|
1252
|
+
return (0, test_1.expect)(this.page.getByText(name, { exact: true })).toBeVisible({ visible: isVisible });
|
|
1253
|
+
}
|
|
1254
|
+
async isTextWithMessageVisible(message, isVisible = true) {
|
|
1255
|
+
return await (0, test_1.expect)(this.page.getByText(message)).toBeVisible({ visible: isVisible });
|
|
1256
|
+
}
|
|
1257
|
+
getTextLocatorWithName(name) {
|
|
1258
|
+
return this.page.getByText(name, { exact: true });
|
|
1296
1259
|
}
|
|
1297
1260
|
}
|
|
1298
1261
|
exports.UiBaseLocators = UiBaseLocators;
|