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