@umbraco/playwright-testhelpers 17.1.0-beta.6 → 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 -834
- 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,567 +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
|
-
|
|
409
|
-
await this.
|
|
410
|
-
await this.click(actionModalLocator, { force: true });
|
|
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 });
|
|
411
344
|
}
|
|
412
345
|
async isActionsMenuForNameVisible(name, isVisible = true) {
|
|
413
|
-
|
|
414
|
-
await this.
|
|
415
|
-
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 });
|
|
416
348
|
}
|
|
417
|
-
// Caret Button Methods
|
|
418
349
|
async clickCaretButtonForName(name) {
|
|
419
350
|
await this.isCaretButtonWithNameVisible(name);
|
|
420
|
-
await this.
|
|
351
|
+
await this.page.locator('uui-menu-item[label="' + name + '"]').locator('#caret-button').first().click();
|
|
421
352
|
}
|
|
422
353
|
async isCaretButtonWithNameVisible(name, isVisible = true) {
|
|
423
|
-
|
|
424
|
-
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 });
|
|
425
355
|
}
|
|
426
356
|
async clickCaretButton() {
|
|
427
|
-
await this.click(
|
|
357
|
+
await this.page.locator('#caret-button').click();
|
|
428
358
|
}
|
|
429
359
|
async openCaretButtonForName(name, isInModal = false) {
|
|
430
360
|
let menuItem;
|
|
431
361
|
if (isInModal) {
|
|
432
|
-
menuItem = this.sidebarModal.locator(
|
|
362
|
+
menuItem = this.sidebarModal.locator('uui-menu-item[label="' + name + '"]');
|
|
433
363
|
}
|
|
434
364
|
else {
|
|
435
|
-
menuItem = this.
|
|
365
|
+
menuItem = this.page.locator('uui-menu-item[label="' + name + '"]');
|
|
436
366
|
}
|
|
437
|
-
await this.waitForVisible(menuItem, ConstantHelper_1.ConstantHelper.timeout.long);
|
|
438
367
|
const isCaretButtonOpen = await menuItem.getAttribute('show-children');
|
|
439
368
|
if (isCaretButtonOpen === null) {
|
|
440
369
|
await this.clickCaretButtonForName(name);
|
|
441
370
|
}
|
|
442
371
|
}
|
|
443
|
-
// Tree Methods
|
|
444
372
|
async reloadTree(treeName) {
|
|
445
|
-
|
|
446
|
-
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);
|
|
447
376
|
await this.clickActionsMenuForName(treeName);
|
|
448
377
|
await this.clickReloadChildrenActionMenuOption();
|
|
449
378
|
await this.openCaretButtonForName(treeName);
|
|
450
379
|
}
|
|
451
|
-
async isTreeItemVisible(name, isVisible = true) {
|
|
452
|
-
await this.isVisible(this.treeItem.locator('[label="' + name + '"]'), isVisible);
|
|
453
|
-
}
|
|
454
|
-
async doesTreeItemHaveTheCorrectIcon(name, icon) {
|
|
455
|
-
return await this.isVisible(this.treeItem.filter({ hasText: name }).locator('umb-icon').locator('[name="' + icon + '"]'));
|
|
456
|
-
}
|
|
457
|
-
// Core Button Click Methods
|
|
458
380
|
async clickReloadButton() {
|
|
459
|
-
await
|
|
381
|
+
await (0, test_1.expect)(this.reloadBtn).toBeVisible();
|
|
382
|
+
await this.reloadBtn.click();
|
|
460
383
|
}
|
|
461
384
|
async clickReloadChildrenButton() {
|
|
462
|
-
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 });
|
|
463
393
|
}
|
|
464
394
|
async clickSaveButton() {
|
|
465
|
-
await
|
|
466
|
-
await this.
|
|
395
|
+
await (0, test_1.expect)(this.saveBtn).toBeVisible();
|
|
396
|
+
await this.saveBtn.click();
|
|
397
|
+
await this.page.waitForTimeout(500);
|
|
467
398
|
}
|
|
468
399
|
async clickChooseButton() {
|
|
469
|
-
await
|
|
400
|
+
await (0, test_1.expect)(this.chooseBtn).toBeVisible();
|
|
401
|
+
await this.chooseBtn.click();
|
|
470
402
|
}
|
|
471
403
|
async clickChooseContainerButton() {
|
|
472
|
-
await this.click(
|
|
404
|
+
await this.containerChooseBtn.click();
|
|
473
405
|
}
|
|
474
|
-
async
|
|
475
|
-
await this.click(
|
|
406
|
+
async clickFilterChooseButton() {
|
|
407
|
+
await this.filterChooseBtn.click();
|
|
476
408
|
}
|
|
477
|
-
async
|
|
478
|
-
await this.click(
|
|
409
|
+
async clickRenameFolderThreeDotsButton() {
|
|
410
|
+
await this.renameFolderThreeDotsBtn.click();
|
|
479
411
|
}
|
|
480
|
-
async
|
|
481
|
-
await this.
|
|
412
|
+
async clickRenameFolderButton() {
|
|
413
|
+
await this.clickRenameButton();
|
|
482
414
|
}
|
|
483
|
-
async
|
|
484
|
-
await this.click(
|
|
415
|
+
async clickConfirmRenameButton() {
|
|
416
|
+
await this.confirmRenameBtn.click();
|
|
417
|
+
}
|
|
418
|
+
async clickUpdateFolderButton() {
|
|
419
|
+
await this.updateFolderBtn.click();
|
|
485
420
|
}
|
|
486
421
|
async clickUpdateButton() {
|
|
487
|
-
await this.click(
|
|
422
|
+
await this.updateBtn.click();
|
|
488
423
|
}
|
|
489
|
-
async
|
|
490
|
-
await
|
|
424
|
+
async clickSubmitButton() {
|
|
425
|
+
await (0, test_1.expect)(this.submitBtn).toBeVisible();
|
|
426
|
+
await this.submitBtn.click();
|
|
491
427
|
}
|
|
492
|
-
async
|
|
493
|
-
await this.click(
|
|
428
|
+
async clickConfirmToSubmitButton() {
|
|
429
|
+
await this.confirmToSubmitBtn.click();
|
|
494
430
|
}
|
|
495
|
-
async
|
|
496
|
-
await this.click(
|
|
431
|
+
async clickChangeButton() {
|
|
432
|
+
await this.changeBtn.click();
|
|
497
433
|
}
|
|
498
|
-
async
|
|
499
|
-
|
|
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 });
|
|
500
438
|
}
|
|
501
|
-
async
|
|
502
|
-
|
|
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);
|
|
503
446
|
}
|
|
504
|
-
async
|
|
505
|
-
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();
|
|
506
454
|
}
|
|
507
|
-
async
|
|
508
|
-
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();
|
|
509
458
|
}
|
|
510
|
-
async
|
|
511
|
-
await
|
|
459
|
+
async clickSelectPropertyEditorButton() {
|
|
460
|
+
await (0, test_1.expect)(this.selectPropertyEditorBtn).toBeVisible();
|
|
461
|
+
await this.selectPropertyEditorBtn.click();
|
|
512
462
|
}
|
|
513
|
-
async
|
|
514
|
-
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
|
|
515
467
|
}
|
|
516
|
-
async
|
|
517
|
-
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();
|
|
518
475
|
}
|
|
519
476
|
async clickNextButton() {
|
|
520
|
-
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();
|
|
521
483
|
}
|
|
522
484
|
async clickBreadcrumbButton() {
|
|
523
|
-
await
|
|
485
|
+
await (0, test_1.expect)(this.breadcrumbBtn).toBeVisible();
|
|
486
|
+
await this.breadcrumbBtn.click();
|
|
524
487
|
}
|
|
525
|
-
async
|
|
526
|
-
await
|
|
488
|
+
async clickInsertButton() {
|
|
489
|
+
await (0, test_1.expect)(this.insertBtn).toBeVisible();
|
|
490
|
+
await this.insertBtn.click();
|
|
527
491
|
}
|
|
528
|
-
// Confirmation Button Methods
|
|
529
492
|
async clickConfirmToDeleteButton() {
|
|
530
|
-
await
|
|
531
|
-
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
|
|
532
496
|
}
|
|
533
497
|
async clickConfirmCreateFolderButton() {
|
|
534
|
-
await
|
|
535
|
-
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
|
|
536
501
|
}
|
|
537
|
-
async
|
|
538
|
-
await
|
|
502
|
+
async clickRemoveExactButton() {
|
|
503
|
+
await (0, test_1.expect)(this.removeExactBtn).toBeVisible();
|
|
504
|
+
await this.removeExactBtn.click();
|
|
539
505
|
}
|
|
540
|
-
async
|
|
541
|
-
|
|
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();
|
|
542
524
|
}
|
|
543
525
|
async clickConfirmDisableButton() {
|
|
544
|
-
await
|
|
526
|
+
await (0, test_1.expect)(this.confirmDisableBtn).toBeVisible();
|
|
527
|
+
await this.confirmDisableBtn.click();
|
|
545
528
|
}
|
|
546
|
-
async
|
|
547
|
-
await
|
|
529
|
+
async clickConfirmRemoveButton() {
|
|
530
|
+
await (0, test_1.expect)(this.confirmToRemoveBtn).toBeVisible();
|
|
531
|
+
await this.confirmToRemoveBtn.click();
|
|
548
532
|
}
|
|
549
|
-
async
|
|
550
|
-
await
|
|
533
|
+
async clickEnableButton() {
|
|
534
|
+
await (0, test_1.expect)(this.enableBtn).toBeVisible();
|
|
535
|
+
await this.enableBtn.click();
|
|
551
536
|
}
|
|
552
|
-
async
|
|
553
|
-
await
|
|
554
|
-
await this.
|
|
537
|
+
async clickConfirmEnableButton() {
|
|
538
|
+
await (0, test_1.expect)(this.confirmEnableBtn).toBeVisible();
|
|
539
|
+
await this.confirmEnableBtn.click();
|
|
555
540
|
}
|
|
556
|
-
async
|
|
557
|
-
await this.
|
|
558
|
-
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();
|
|
559
549
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
await this.click(
|
|
563
|
-
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
|
+
}
|
|
564
564
|
}
|
|
565
|
-
async
|
|
566
|
-
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();
|
|
567
586
|
}
|
|
568
587
|
async createFolder(folderName) {
|
|
569
588
|
await this.clickCreateActionMenuOption();
|
|
@@ -571,574 +590,586 @@ class UiBaseLocators extends BasePage_1.BasePage {
|
|
|
571
590
|
await this.enterFolderName(folderName);
|
|
572
591
|
await this.clickConfirmCreateFolderButton();
|
|
573
592
|
}
|
|
574
|
-
async
|
|
575
|
-
|
|
576
|
-
await this.
|
|
577
|
-
|
|
578
|
-
async clickFolderButton() {
|
|
579
|
-
await this.click(this.folderBtn);
|
|
580
|
-
}
|
|
581
|
-
async clickNewFolderThreeDotsButton() {
|
|
582
|
-
await this.click(this.newFolderThreeDotsBtn);
|
|
583
|
-
}
|
|
584
|
-
async clickRenameFolderThreeDotsButton() {
|
|
585
|
-
await this.click(this.renameFolderThreeDotsBtn);
|
|
586
|
-
}
|
|
587
|
-
async clickRenameFolderButton() {
|
|
588
|
-
await this.clickRenameButton();
|
|
589
|
-
}
|
|
590
|
-
async clickUpdateFolderButton() {
|
|
591
|
-
await this.click(this.updateFolderBtn);
|
|
592
|
-
}
|
|
593
|
-
// Three Dots Menu Methods
|
|
594
|
-
async clickCreateThreeDotsButton() {
|
|
595
|
-
await this.click(this.createThreeDotsBtn);
|
|
596
|
-
}
|
|
597
|
-
async clickFilterChooseButton() {
|
|
598
|
-
await this.click(this.filterChooseBtn);
|
|
599
|
-
}
|
|
600
|
-
// Success State Methods
|
|
601
|
-
async isSuccessStateVisibleForSaveButton(isVisible = true) {
|
|
602
|
-
const regex = new RegExp(`^workspace-action:.*Save$`);
|
|
603
|
-
const saveButtonLocator = this.page.getByTestId(regex);
|
|
604
|
-
const saveBtn = this.workspaceAction.filter({ has: saveButtonLocator });
|
|
605
|
-
await this.isVisible(saveBtn.locator(this.successState), isVisible, ConstantHelper_1.ConstantHelper.timeout.long);
|
|
606
|
-
}
|
|
607
|
-
async isSuccessButtonWithTextVisible(text) {
|
|
608
|
-
return await this.isVisible(this.successState.filter({ hasText: text }));
|
|
609
|
-
}
|
|
610
|
-
async isSuccessStateIconVisible() {
|
|
611
|
-
await this.isVisible(this.successStateIcon);
|
|
612
|
-
}
|
|
613
|
-
async isFailedStateButtonVisible() {
|
|
614
|
-
await this.isVisible(this.failedStateButton);
|
|
615
|
-
}
|
|
616
|
-
// Notification Methods
|
|
617
|
-
async isSuccessNotificationVisible(isVisible = true) {
|
|
618
|
-
return await this.isVisible(this.successNotification.first(), isVisible, ConstantHelper_1.ConstantHelper.timeout.long);
|
|
619
|
-
}
|
|
620
|
-
async doesSuccessNotificationsHaveCount(count) {
|
|
621
|
-
await this.hasCount(this.successNotification, count);
|
|
622
|
-
}
|
|
623
|
-
async doesSuccessNotificationHaveText(text, isVisible = true, deleteNotification = false, timeout = 5000) {
|
|
624
|
-
const response = await this.isVisible(this.successNotification.filter({ hasText: text }), isVisible, timeout);
|
|
625
|
-
if (deleteNotification) {
|
|
626
|
-
await this.click(this.successNotification.filter({ hasText: text }).getByLabel('close'), { force: true });
|
|
627
|
-
}
|
|
628
|
-
return response;
|
|
629
|
-
}
|
|
630
|
-
async isErrorNotificationVisible(isVisible = true) {
|
|
631
|
-
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();
|
|
632
597
|
}
|
|
633
|
-
async
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
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);
|
|
639
603
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
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 });
|
|
643
606
|
}
|
|
644
|
-
async
|
|
645
|
-
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 });
|
|
646
611
|
}
|
|
647
|
-
async
|
|
648
|
-
await this.
|
|
612
|
+
async deleteFolder() {
|
|
613
|
+
await this.clickDeleteActionMenuOption();
|
|
614
|
+
await this.clickConfirmToDeleteButton();
|
|
649
615
|
}
|
|
650
|
-
async
|
|
651
|
-
await
|
|
616
|
+
async clickDeleteExactButton() {
|
|
617
|
+
await (0, test_1.expect)(this.deleteExactBtn).toBeVisible();
|
|
618
|
+
await this.deleteExactBtn.click();
|
|
652
619
|
}
|
|
653
|
-
async
|
|
654
|
-
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 });
|
|
655
622
|
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
await this.click(this.containerSaveAndPublishBtn);
|
|
659
|
-
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();
|
|
660
625
|
}
|
|
661
|
-
// Navigation Methods
|
|
662
626
|
async goToSection(sectionName, checkSections = true, skipReload = false) {
|
|
663
627
|
if (checkSections) {
|
|
664
628
|
for (let section in ConstantHelper_1.ConstantHelper.sections) {
|
|
665
|
-
await
|
|
629
|
+
await (0, test_1.expect)(this.sectionLinks.getByRole('tab', { name: ConstantHelper_1.ConstantHelper.sections[section] })).toBeVisible({ timeout: 30000 });
|
|
666
630
|
}
|
|
667
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
|
|
668
633
|
const alreadySelected = await this.sectionLinks.locator('[active]').getByText(sectionName).isVisible();
|
|
669
634
|
if (alreadySelected && !skipReload) {
|
|
670
635
|
await this.page.reload();
|
|
671
636
|
}
|
|
672
637
|
else {
|
|
673
|
-
await this.
|
|
638
|
+
await this.backOfficeHeader.getByRole('tab', { name: sectionName }).click();
|
|
674
639
|
}
|
|
675
640
|
}
|
|
676
641
|
async goToSettingsTreeItem(settingsTreeItemName) {
|
|
677
642
|
await this.goToSection(ConstantHelper_1.ConstantHelper.sections.settings);
|
|
678
|
-
await
|
|
679
|
-
|
|
680
|
-
async isSectionWithNameVisible(sectionName, isVisible = true) {
|
|
681
|
-
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();
|
|
682
645
|
}
|
|
683
|
-
async
|
|
684
|
-
await this.page.
|
|
685
|
-
await this.isVisible(this.backOfficeMain, isVisible);
|
|
646
|
+
async clickDataElement(elementName, options = null) {
|
|
647
|
+
await this.page.click(`[data-element="${elementName}"]`, options);
|
|
686
648
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
const exactLinkWithNameLocator = this.page.getByRole('link', { name: name, exact: true });
|
|
690
|
-
await this.click(exactLinkWithNameLocator, { force: toForce });
|
|
649
|
+
async getDataElement(elementName) {
|
|
650
|
+
return this.page.locator(`[data-element="${elementName}"]`);
|
|
691
651
|
}
|
|
692
|
-
async
|
|
693
|
-
await
|
|
652
|
+
async isButtonWithNameVisible(name) {
|
|
653
|
+
await (0, test_1.expect)(this.page.getByRole('button', { name: name })).toBeVisible();
|
|
694
654
|
}
|
|
695
655
|
async clickLabelWithName(name, isExact = true, toForce = false) {
|
|
696
|
-
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 });
|
|
697
658
|
}
|
|
698
659
|
async clickButtonWithName(name, isExact = false) {
|
|
699
660
|
const exactButtonWithNameLocator = this.page.getByRole('button', { name: name, exact: isExact });
|
|
700
|
-
await
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
await this.click(this.page.getByText(name, { exact: true }));
|
|
704
|
-
}
|
|
705
|
-
async isButtonWithNameVisible(name) {
|
|
706
|
-
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 });
|
|
707
664
|
}
|
|
708
|
-
async
|
|
709
|
-
await
|
|
710
|
-
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 });
|
|
711
667
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
const removeButtonWithNameLocator = this.page.locator('[name="' + name + '"] [label="Remove"]');
|
|
715
|
-
await this.click(removeButtonWithNameLocator);
|
|
668
|
+
async doesSuccessNotificationsHaveCount(count) {
|
|
669
|
+
return await (0, test_1.expect)(this.successNotification).toHaveCount(count);
|
|
716
670
|
}
|
|
717
|
-
async
|
|
718
|
-
|
|
719
|
-
await this.click(trashIconButtonWithNameLocator);
|
|
671
|
+
async isErrorNotificationVisible(isVisible = true) {
|
|
672
|
+
return await (0, test_1.expect)(this.errorNotification.first()).toBeVisible({ visible: isVisible });
|
|
720
673
|
}
|
|
721
|
-
async
|
|
722
|
-
|
|
723
|
-
await this.click(removeLabelWithNameLocator);
|
|
674
|
+
async isTextWithMessageVisible(message, isVisible = true) {
|
|
675
|
+
return await (0, test_1.expect)(this.page.getByText(message)).toBeVisible({ visible: isVisible });
|
|
724
676
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
await this.
|
|
728
|
-
await this.click(this.aliasLockBtn, { force: true });
|
|
729
|
-
await this.enterText(this.aliasNameTxt, aliasName);
|
|
677
|
+
async clickCreateThreeDotsButton() {
|
|
678
|
+
await (0, test_1.expect)(this.createThreeDotsBtn).toBeVisible();
|
|
679
|
+
await this.createThreeDotsBtn.click();
|
|
730
680
|
}
|
|
731
|
-
async
|
|
732
|
-
await
|
|
733
|
-
await this.
|
|
734
|
-
await this.clickLabelWithName(iconName, true, true);
|
|
735
|
-
await this.clickSubmitButton();
|
|
681
|
+
async clickCreateButton() {
|
|
682
|
+
await (0, test_1.expect)(this.createBtn).toBeVisible();
|
|
683
|
+
await this.createBtn.click();
|
|
736
684
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
await this.click(
|
|
685
|
+
async clickAddButton() {
|
|
686
|
+
await (0, test_1.expect)(this.addBtn).toBeVisible();
|
|
687
|
+
await this.addBtn.click();
|
|
740
688
|
}
|
|
741
|
-
|
|
742
|
-
|
|
689
|
+
;
|
|
690
|
+
async clickNewFolderThreeDotsButton() {
|
|
691
|
+
await (0, test_1.expect)(this.newFolderThreeDotsBtn).toBeVisible();
|
|
692
|
+
await this.newFolderThreeDotsBtn.click();
|
|
743
693
|
}
|
|
744
694
|
async clickEditorSettingsButton(index = 0) {
|
|
745
|
-
await
|
|
746
|
-
|
|
747
|
-
async addPropertyEditor(propertyEditorName, index = 0) {
|
|
748
|
-
await this.click(this.addPropertyBtn.nth(index));
|
|
749
|
-
await this.enterAPropertyName(propertyEditorName);
|
|
750
|
-
await this.hasValue(this.propertyNameTxt, propertyEditorName);
|
|
751
|
-
await this.clickSelectPropertyEditorButton();
|
|
752
|
-
await this.searchForTypeToFilterValue(propertyEditorName);
|
|
753
|
-
await this.click(this.page.getByText(propertyEditorName, { exact: true }));
|
|
754
|
-
await this.clickSubmitButton();
|
|
755
|
-
}
|
|
756
|
-
async updatePropertyEditor(propertyEditorName) {
|
|
757
|
-
await this.clickEditorSettingsButton();
|
|
758
|
-
await this.clickChangeButton();
|
|
759
|
-
await this.searchForTypeToFilterValue(propertyEditorName);
|
|
760
|
-
await this.click(this.page.getByText(propertyEditorName, { exact: true }));
|
|
761
|
-
await this.enterAPropertyName(propertyEditorName);
|
|
762
|
-
await this.clickSubmitButton();
|
|
763
|
-
}
|
|
764
|
-
async deletePropertyEditor(propertyEditorName) {
|
|
765
|
-
await this.page.locator('uui-button').filter({ hasText: propertyEditorName }).getByLabel('Editor settings').hover();
|
|
766
|
-
await this.click(this.deleteBtn);
|
|
767
|
-
}
|
|
768
|
-
async deletePropertyEditorWithName(name) {
|
|
769
|
-
const propertyEditor = this.page.locator('umb-content-type-design-editor-property', { hasText: name });
|
|
770
|
-
await this.hoverAndClick(propertyEditor, propertyEditor.getByLabel('Delete'), { force: true });
|
|
771
|
-
await this.clickConfirmToDeleteButton();
|
|
695
|
+
await (0, test_1.expect)(this.editorSettingsBtn.nth(index)).toBeVisible();
|
|
696
|
+
return this.editorSettingsBtn.nth(index).click();
|
|
772
697
|
}
|
|
773
|
-
async
|
|
774
|
-
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);
|
|
775
702
|
}
|
|
776
|
-
async
|
|
777
|
-
|
|
778
|
-
await this.hasAttribute(propertyEditorUiLocator, 'readonly', '');
|
|
703
|
+
async doesDescriptionHaveValue(value, index = 0) {
|
|
704
|
+
return await (0, test_1.expect)(this.descriptionBtn.nth(index)).toHaveValue(value);
|
|
779
705
|
}
|
|
780
|
-
async
|
|
781
|
-
|
|
782
|
-
await
|
|
706
|
+
async clickStructureTab() {
|
|
707
|
+
await this.page.waitForTimeout(1000);
|
|
708
|
+
await (0, test_1.expect)(this.structureTabBtn).toBeVisible();
|
|
709
|
+
await this.structureTabBtn.click();
|
|
783
710
|
}
|
|
784
|
-
async
|
|
785
|
-
await
|
|
711
|
+
async clickAllowAtRootButton() {
|
|
712
|
+
await (0, test_1.expect)(this.allowAtRootBtn).toBeVisible();
|
|
713
|
+
await this.allowAtRootBtn.click();
|
|
786
714
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
await this.click(
|
|
715
|
+
async clickIAmDoneReorderingButton() {
|
|
716
|
+
await (0, test_1.expect)(this.iAmDoneReorderingBtn).toBeVisible();
|
|
717
|
+
await this.iAmDoneReorderingBtn.click();
|
|
790
718
|
}
|
|
791
|
-
async
|
|
792
|
-
|
|
793
|
-
await this.
|
|
719
|
+
async clickReorderButton() {
|
|
720
|
+
await (0, test_1.expect)(this.reorderBtn).toBeVisible();
|
|
721
|
+
await this.reorderBtn.click();
|
|
794
722
|
}
|
|
795
|
-
async
|
|
796
|
-
await
|
|
723
|
+
async clickLabelAboveButton() {
|
|
724
|
+
await (0, test_1.expect)(this.labelAboveBtn).toBeVisible();
|
|
725
|
+
await this.labelAboveBtn.click();
|
|
797
726
|
}
|
|
798
|
-
async
|
|
799
|
-
await
|
|
800
|
-
|
|
727
|
+
async clickMandatoryToggle() {
|
|
728
|
+
await (0, test_1.expect)(this.mandatoryToggle).toBeVisible();
|
|
729
|
+
await this.mandatoryToggle.click();
|
|
801
730
|
}
|
|
802
|
-
async
|
|
803
|
-
await this.
|
|
804
|
-
|
|
805
|
-
for (const group of await groups) {
|
|
806
|
-
if (await group.getByLabel('Group', { exact: true }).inputValue() === groupName) {
|
|
807
|
-
const headerActionsDeleteLocator = group.locator('[slot="header-actions"]').getByLabel('Delete');
|
|
808
|
-
await this.click(headerActionsDeleteLocator, { force: true });
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
731
|
+
async selectValidationOption(option) {
|
|
732
|
+
await (0, test_1.expect)(this.validation).toBeVisible();
|
|
733
|
+
await this.validation.selectOption(option);
|
|
812
734
|
}
|
|
813
|
-
async
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
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();
|
|
822
746
|
}
|
|
823
|
-
// Tab Methods
|
|
824
747
|
async clickAddTabButton() {
|
|
825
|
-
await
|
|
748
|
+
await (0, test_1.expect)(this.addTabBtn).toBeVisible();
|
|
749
|
+
await this.addTabBtn.click();
|
|
826
750
|
}
|
|
827
751
|
async enterTabName(tabName) {
|
|
828
|
-
await
|
|
829
|
-
await this.page.waitForTimeout(
|
|
830
|
-
await this.
|
|
831
|
-
await this.
|
|
832
|
-
|
|
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();
|
|
833
760
|
}
|
|
834
|
-
async
|
|
835
|
-
|
|
836
|
-
await this.
|
|
761
|
+
async searchForTypeToFilterValue(searchValue) {
|
|
762
|
+
await (0, test_1.expect)(this.typeToFilterSearchTxt).toBeVisible();
|
|
763
|
+
await this.typeToFilterSearchTxt.fill(searchValue);
|
|
837
764
|
}
|
|
838
|
-
async
|
|
839
|
-
await this.
|
|
840
|
-
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();
|
|
841
774
|
}
|
|
842
|
-
|
|
843
|
-
|
|
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();
|
|
844
782
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
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);
|
|
848
787
|
}
|
|
849
|
-
async
|
|
850
|
-
await
|
|
788
|
+
async clickAddGroupButton() {
|
|
789
|
+
await (0, test_1.expect)(this.addGroupBtn).toBeVisible();
|
|
790
|
+
await this.addGroupBtn.click();
|
|
851
791
|
}
|
|
852
|
-
async
|
|
853
|
-
await
|
|
792
|
+
async clickChooseModalButton() {
|
|
793
|
+
await (0, test_1.expect)(this.chooseModalBtn).toBeVisible();
|
|
794
|
+
await this.chooseModalBtn.click();
|
|
854
795
|
}
|
|
855
|
-
async
|
|
856
|
-
|
|
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);
|
|
857
801
|
}
|
|
858
|
-
async
|
|
859
|
-
await
|
|
802
|
+
async isGroupVisible(groupName, isVisible = true) {
|
|
803
|
+
await (0, test_1.expect)(this.groupLabel.filter({ hasText: groupName })).toBeVisible({ visible: isVisible });
|
|
860
804
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
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);
|
|
864
808
|
}
|
|
865
|
-
async
|
|
866
|
-
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);
|
|
867
817
|
}
|
|
868
|
-
async
|
|
869
|
-
await
|
|
818
|
+
async isSuccessButtonWithTextVisible(text) {
|
|
819
|
+
return await (0, test_1.expect)(this.successState.filter({ hasText: text })).toBeVisible();
|
|
870
820
|
}
|
|
871
|
-
async
|
|
872
|
-
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();
|
|
873
835
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
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 });
|
|
877
839
|
}
|
|
878
|
-
async
|
|
879
|
-
await
|
|
840
|
+
async clickCreateLink() {
|
|
841
|
+
await (0, test_1.expect)(this.createLink).toBeVisible();
|
|
842
|
+
await this.createLink.click();
|
|
880
843
|
}
|
|
881
|
-
async
|
|
882
|
-
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();
|
|
883
857
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
await
|
|
887
|
-
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();
|
|
888
865
|
}
|
|
889
|
-
async
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
await
|
|
893
|
-
await
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
}
|
|
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();
|
|
897
875
|
}
|
|
898
|
-
async
|
|
899
|
-
await
|
|
900
|
-
await this.click(
|
|
901
|
-
await this.waitAndSelectQueryBuilderDropDownList(propertyAlias);
|
|
902
|
-
await this.click(this.whereOperatorBtn);
|
|
903
|
-
await this.waitAndSelectQueryBuilderDropDownList(operator);
|
|
904
|
-
await this.enterText(this.whereConstrainValueTxt, constrainValue);
|
|
905
|
-
await this.pressKey(this.whereConstrainValueTxt, 'Enter');
|
|
876
|
+
async clickRenameButton() {
|
|
877
|
+
await (0, test_1.expect)(this.renameBtn).toBeVisible();
|
|
878
|
+
await this.renameBtn.click();
|
|
906
879
|
}
|
|
907
|
-
async
|
|
908
|
-
|
|
909
|
-
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);
|
|
910
892
|
}
|
|
911
893
|
async chooseRootContentInQueryBuilder(contentName) {
|
|
912
|
-
await
|
|
894
|
+
await (0, test_1.expect)(this.chooseRootContentBtn).toBeVisible();
|
|
895
|
+
await this.chooseRootContentBtn.click();
|
|
913
896
|
await this.clickModalMenuItemWithName(contentName);
|
|
914
897
|
await this.clickChooseButton();
|
|
915
898
|
}
|
|
916
|
-
async
|
|
917
|
-
|
|
918
|
-
|
|
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();
|
|
919
916
|
}
|
|
920
917
|
async doesReturnedItemsHaveCount(itemCount) {
|
|
921
|
-
await
|
|
918
|
+
await (0, test_1.expect)(this.returnedItemsCount).toContainText(itemCount.toString() + ' published items returned');
|
|
922
919
|
}
|
|
923
920
|
async doesQueryResultHaveContentName(contentName) {
|
|
924
|
-
await
|
|
921
|
+
await (0, test_1.expect)(this.queryResults).toContainText(contentName);
|
|
925
922
|
}
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
await
|
|
930
|
-
|
|
931
|
-
|
|
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
|
+
}
|
|
932
935
|
}
|
|
933
|
-
async
|
|
934
|
-
await this.
|
|
935
|
-
await this.
|
|
936
|
-
|
|
937
|
-
await
|
|
938
|
-
await
|
|
939
|
-
await this.click(this.page.getByText(fieldValue));
|
|
940
|
-
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();
|
|
941
942
|
}
|
|
942
|
-
async
|
|
943
|
-
await this.
|
|
944
|
-
await this.click(
|
|
945
|
-
await this.click(this.page.getByLabel(partialViewName));
|
|
946
|
-
await this.clickChooseButton();
|
|
943
|
+
async clickLeftArrowButton() {
|
|
944
|
+
await (0, test_1.expect)(this.leftArrowBtn).toBeVisible();
|
|
945
|
+
await this.leftArrowBtn.click();
|
|
947
946
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
await this.
|
|
951
|
-
await this.click(this.newNameTxt);
|
|
952
|
-
await this.enterText(this.newNameTxt, newName);
|
|
953
|
-
await this.click(this.renameModalBtn);
|
|
954
|
-
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();
|
|
955
950
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
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);
|
|
959
957
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
await this.enterText(this.enterDescriptionTxt, description);
|
|
958
|
+
getTabLocatorWithName(name) {
|
|
959
|
+
return this.page.getByRole('tab', { name: name });
|
|
963
960
|
}
|
|
964
|
-
|
|
965
|
-
return
|
|
961
|
+
getTextLocatorWithName(name) {
|
|
962
|
+
return this.page.getByText(name, { exact: true });
|
|
966
963
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
await this.waitForVisible(dragFromSelector);
|
|
970
|
-
await this.waitForVisible(dragToSelector);
|
|
971
|
-
const targetLocation = await dragToSelector.boundingBox();
|
|
972
|
-
const elementCenterX = targetLocation.x + targetLocation.width / 2;
|
|
973
|
-
const elementCenterY = targetLocation.y + targetLocation.height / 2;
|
|
974
|
-
await this.hover(dragFromSelector);
|
|
975
|
-
await this.page.mouse.move(10, 10);
|
|
976
|
-
await this.hover(dragFromSelector);
|
|
977
|
-
await this.page.mouse.down();
|
|
978
|
-
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
979
|
-
await this.page.mouse.move(elementCenterX + horizontalOffset, elementCenterY + verticalOffset, { steps: steps });
|
|
980
|
-
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
981
|
-
await this.page.mouse.up();
|
|
964
|
+
getLocatorWithDataMark(dataMark) {
|
|
965
|
+
return this.page.getByTestId(dataMark);
|
|
982
966
|
}
|
|
983
|
-
|
|
984
|
-
async
|
|
985
|
-
await
|
|
967
|
+
;
|
|
968
|
+
async isFailedStateButtonVisible() {
|
|
969
|
+
await (0, test_1.expect)(this.failedStateButton).toBeVisible();
|
|
986
970
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
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);
|
|
990
980
|
}
|
|
991
981
|
async reloadRecycleBin(containsItems = true) {
|
|
992
|
-
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
|
|
993
984
|
if (!containsItems) {
|
|
994
985
|
await this.clickReloadChildrenActionMenuOption();
|
|
995
|
-
await
|
|
986
|
+
await (0, test_1.expect)(this.recycleBinMenuItemCaretBtn).not.toBeVisible();
|
|
996
987
|
return;
|
|
997
988
|
}
|
|
998
989
|
await this.clickActionsMenuForName('Recycle Bin');
|
|
999
990
|
await this.clickReloadChildrenActionMenuOption();
|
|
1000
991
|
await this.openCaretButtonForName('Recycle Bin');
|
|
1001
992
|
}
|
|
993
|
+
async clickRecycleBinButton() {
|
|
994
|
+
await (0, test_1.expect)(this.recycleBinBtn).toBeVisible();
|
|
995
|
+
await this.recycleBinBtn.click();
|
|
996
|
+
}
|
|
1002
997
|
async isItemVisibleInRecycleBin(item, isVisible = true, isReload = true) {
|
|
1003
998
|
if (isReload) {
|
|
1004
999
|
await this.reloadRecycleBin(isVisible);
|
|
1005
1000
|
}
|
|
1006
|
-
return await
|
|
1001
|
+
return await (0, test_1.expect)(this.page.locator('[label="Recycle Bin"] [label="' + item + '"]')).toBeVisible({ visible: isVisible });
|
|
1007
1002
|
}
|
|
1008
|
-
// View Methods
|
|
1009
1003
|
async changeToGridView() {
|
|
1010
|
-
await
|
|
1011
|
-
await this.click(
|
|
1004
|
+
await (0, test_1.expect)(this.viewBundleBtn).toBeVisible();
|
|
1005
|
+
await this.viewBundleBtn.click();
|
|
1006
|
+
await this.gridBtn.click();
|
|
1012
1007
|
}
|
|
1013
1008
|
async changeToListView() {
|
|
1014
|
-
await
|
|
1015
|
-
await this.click(
|
|
1009
|
+
await (0, test_1.expect)(this.viewBundleBtn).toBeVisible();
|
|
1010
|
+
await this.viewBundleBtn.click();
|
|
1011
|
+
await this.listBtn.click();
|
|
1016
1012
|
}
|
|
1017
1013
|
async isViewBundleButtonVisible(isVisible = true) {
|
|
1018
|
-
return
|
|
1014
|
+
return (0, test_1.expect)(this.viewBundleBtn).toBeVisible({ visible: isVisible });
|
|
1019
1015
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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;
|
|
1023
1025
|
}
|
|
1024
|
-
async
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
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;
|
|
1029
1032
|
}
|
|
1030
|
-
async
|
|
1031
|
-
|
|
1032
|
-
await this.waitForVisible(locator);
|
|
1033
|
-
// Using direct click with position option (not supported by BasePage.click)
|
|
1034
|
-
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 });
|
|
1035
1035
|
}
|
|
1036
|
-
async
|
|
1037
|
-
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();
|
|
1038
1039
|
}
|
|
1039
|
-
async
|
|
1040
|
-
await
|
|
1040
|
+
async clickChooseContentStartNodeButton() {
|
|
1041
|
+
await (0, test_1.expect)(this.chooseDocumentInputBtn).toBeVisible();
|
|
1042
|
+
await this.chooseDocumentInputBtn.click();
|
|
1041
1043
|
}
|
|
1042
1044
|
async clickChooseMediaStartNodeButton() {
|
|
1043
|
-
await
|
|
1045
|
+
await (0, test_1.expect)(this.chooseMediaInputBtn).toBeVisible();
|
|
1046
|
+
await this.chooseMediaInputBtn.click();
|
|
1044
1047
|
}
|
|
1045
|
-
async
|
|
1046
|
-
await
|
|
1048
|
+
async clickActionButton() {
|
|
1049
|
+
await (0, test_1.expect)(this.actionBtn).toBeVisible();
|
|
1050
|
+
await this.actionBtn.click();
|
|
1047
1051
|
}
|
|
1048
|
-
async
|
|
1049
|
-
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();
|
|
1050
1055
|
}
|
|
1051
|
-
async
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
const regexImageSrc = new RegExp(`^${thumbnailImage}.*`);
|
|
1055
|
-
await this.hasAttribute(mediaThumbnailLocator.locator('umb-imaging-thumbnail img'), 'src', regexImageSrc.toString());
|
|
1056
|
-
}
|
|
1057
|
-
else {
|
|
1058
|
-
await this.hasAttribute(mediaThumbnailLocator.locator('umb-imaging-thumbnail umb-icon'), 'name', thumbnailIconName);
|
|
1059
|
-
}
|
|
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();
|
|
1060
1059
|
}
|
|
1061
|
-
async
|
|
1062
|
-
await
|
|
1060
|
+
async clickMediaPickerModalSubmitButton() {
|
|
1061
|
+
await (0, test_1.expect)(this.mediaPickerModalSubmitBtn).toBeVisible();
|
|
1062
|
+
await this.mediaPickerModalSubmitBtn.click();
|
|
1063
1063
|
}
|
|
1064
|
-
async
|
|
1065
|
-
|
|
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');
|
|
1066
1069
|
}
|
|
1067
|
-
async
|
|
1068
|
-
|
|
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 } });
|
|
1069
1074
|
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
await this.click(
|
|
1075
|
+
async clickCreateModalButton() {
|
|
1076
|
+
await (0, test_1.expect)(this.createModalBtn).toBeVisible();
|
|
1077
|
+
await this.createModalBtn.click();
|
|
1073
1078
|
}
|
|
1074
|
-
async
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
await this.clickToUploadButton(),
|
|
1078
|
-
]);
|
|
1079
|
-
await fileChooser.setFiles(filePath);
|
|
1079
|
+
async clickMediaCaptionAltTextModalSubmitButton() {
|
|
1080
|
+
await (0, test_1.expect)(this.mediaCaptionAltTextModalSubmitBtn).toBeVisible();
|
|
1081
|
+
await this.mediaCaptionAltTextModalSubmitBtn.click();
|
|
1080
1082
|
}
|
|
1081
|
-
//
|
|
1083
|
+
// Embed Modal
|
|
1082
1084
|
async enterEmbeddedURL(value) {
|
|
1083
|
-
await
|
|
1085
|
+
await (0, test_1.expect)(this.embeddedURLTxt).toBeVisible();
|
|
1086
|
+
await this.embeddedURLTxt.clear();
|
|
1087
|
+
await this.embeddedURLTxt.fill(value);
|
|
1084
1088
|
}
|
|
1085
1089
|
async clickEmbeddedRetrieveButton() {
|
|
1086
|
-
await
|
|
1090
|
+
await (0, test_1.expect)(this.embeddedRetrieveBtn).toBeVisible();
|
|
1091
|
+
await this.embeddedRetrieveBtn.click();
|
|
1087
1092
|
}
|
|
1088
1093
|
async clickEmbeddedMediaModalConfirmButton() {
|
|
1089
|
-
await
|
|
1094
|
+
await (0, test_1.expect)(this.embeddedMediaModalConfirmBtn).toBeVisible();
|
|
1095
|
+
await this.embeddedMediaModalConfirmBtn.click();
|
|
1090
1096
|
}
|
|
1091
1097
|
async waitForEmbeddedPreviewVisible() {
|
|
1092
|
-
await
|
|
1098
|
+
await (0, test_1.expect)(this.embeddedPreview).toBeVisible();
|
|
1093
1099
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
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
|
+
}
|
|
1097
1113
|
}
|
|
1098
|
-
// User Methods
|
|
1099
1114
|
async clickCurrentUserAvatarButton() {
|
|
1100
|
-
await
|
|
1115
|
+
await (0, test_1.expect)(this.currentUserAvatarBtn).toBeVisible();
|
|
1116
|
+
await this.currentUserAvatarBtn.click({ force: true });
|
|
1101
1117
|
}
|
|
1102
|
-
// Collection Methods
|
|
1103
1118
|
async clickCreateActionButton() {
|
|
1104
|
-
await
|
|
1119
|
+
await (0, test_1.expect)(this.createActionBtn).toBeVisible();
|
|
1120
|
+
await this.createActionBtn.click();
|
|
1105
1121
|
}
|
|
1106
1122
|
async clickCreateActionWithOptionName(optionName) {
|
|
1107
1123
|
await this.clickCreateActionButton();
|
|
1108
1124
|
const createOptionLocator = this.createActionButtonCollection.locator('[label="' + optionName + '"]');
|
|
1109
|
-
await
|
|
1125
|
+
await (0, test_1.expect)(createOptionLocator).toBeVisible();
|
|
1126
|
+
await createOptionLocator.click();
|
|
1110
1127
|
}
|
|
1111
1128
|
async doesCollectionTreeItemTableRowHaveName(name) {
|
|
1112
|
-
await
|
|
1113
|
-
await
|
|
1129
|
+
await (0, test_1.expect)(this.collectionTreeItemTableRow.first()).toBeVisible();
|
|
1130
|
+
await (0, test_1.expect)(this.collectionTreeItemTableRow.locator('[label="' + name + '"]')).toBeVisible();
|
|
1114
1131
|
}
|
|
1115
1132
|
async doesCollectionTreeItemTableRowHaveIcon(name, icon) {
|
|
1116
|
-
await
|
|
1117
|
-
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();
|
|
1118
1135
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
await this.click(
|
|
1136
|
+
async clickFolderButton() {
|
|
1137
|
+
await (0, test_1.expect)(this.folderBtn).toBeVisible();
|
|
1138
|
+
await this.folderBtn.click();
|
|
1122
1139
|
}
|
|
1123
1140
|
async doesReferenceHeadlineHaveText(text) {
|
|
1124
|
-
await
|
|
1141
|
+
await (0, test_1.expect)(this.referenceHeadline).toContainText(text);
|
|
1125
1142
|
}
|
|
1126
1143
|
async isReferenceHeadlineVisible(isVisible) {
|
|
1127
|
-
await
|
|
1144
|
+
await (0, test_1.expect)(this.referenceHeadline).toBeVisible({ visible: isVisible });
|
|
1128
1145
|
}
|
|
1129
1146
|
async doesReferenceItemsHaveCount(count) {
|
|
1130
|
-
await
|
|
1147
|
+
await (0, test_1.expect)(this.entityItemRef).toHaveCount(count);
|
|
1131
1148
|
}
|
|
1132
1149
|
async isReferenceItemNameVisible(itemName) {
|
|
1133
|
-
await
|
|
1150
|
+
await (0, test_1.expect)(this.entityItemRef.locator('uui-ref-node[name="' + itemName + '"]')).toBeVisible();
|
|
1134
1151
|
}
|
|
1135
1152
|
async doesReferencesContainText(text) {
|
|
1136
|
-
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');
|
|
1137
1164
|
}
|
|
1138
|
-
|
|
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
|
|
1139
1170
|
async clickEntityActionWithName(name) {
|
|
1140
1171
|
const regex = new RegExp(`^entity-action:.*${name}$`);
|
|
1141
|
-
await this.
|
|
1172
|
+
await this.openEntityAction.getByTestId(regex).filter({ has: this.page.locator(':visible') }).click();
|
|
1142
1173
|
}
|
|
1143
1174
|
async clickCreateActionMenuOption() {
|
|
1144
1175
|
await this.clickEntityActionWithName('Create');
|
|
@@ -1200,63 +1231,69 @@ class UiBaseLocators extends BasePage_1.BasePage {
|
|
|
1200
1231
|
async clickUpdateActionMenuOption() {
|
|
1201
1232
|
await this.clickEntityActionWithName('Update');
|
|
1202
1233
|
}
|
|
1203
|
-
async
|
|
1204
|
-
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 });
|
|
1205
1246
|
}
|
|
1206
|
-
// Entity Item Methods
|
|
1207
1247
|
async clickEntityItemByName(itemName) {
|
|
1208
|
-
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 });
|
|
1209
1256
|
}
|
|
1210
|
-
// Workspace Action Methods
|
|
1211
1257
|
async clickWorkspaceActionMenuButton() {
|
|
1212
|
-
await
|
|
1258
|
+
await (0, test_1.expect)(this.workspaceActionMenuBtn).toBeVisible();
|
|
1259
|
+
await this.workspaceActionMenuBtn.click();
|
|
1213
1260
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
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 });
|
|
1217
1266
|
}
|
|
1218
|
-
// Editor Methods
|
|
1219
1267
|
async enterMonacoEditorValue(value) {
|
|
1220
|
-
await
|
|
1221
|
-
await this.
|
|
1222
|
-
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');
|
|
1223
1272
|
await this.page.keyboard.insertText(value);
|
|
1224
1273
|
}
|
|
1225
|
-
// Loader Methods
|
|
1226
1274
|
async waitUntilUiLoaderIsNoLongerVisible() {
|
|
1227
|
-
await
|
|
1228
|
-
}
|
|
1229
|
-
// Dashboard Methods
|
|
1230
|
-
async isDashboardTabWithNameVisible(name, isVisible = true) {
|
|
1231
|
-
await this.isVisible(this.page.locator('uui-tab[label="' + name + '"]'), isVisible);
|
|
1275
|
+
await (0, test_1.expect)(this.uiLoader).toBeVisible({ visible: false, timeout: 10000 });
|
|
1232
1276
|
}
|
|
1233
1277
|
async isWorkspaceViewTabWithAliasVisible(alias, isVisible = true) {
|
|
1234
|
-
await
|
|
1235
|
-
}
|
|
1236
|
-
// Submit Button Methods
|
|
1237
|
-
async isSubmitButtonDisabled() {
|
|
1238
|
-
await this.isVisible(this.submitBtn);
|
|
1239
|
-
await this.isDisabled(this.submitBtn);
|
|
1240
|
-
}
|
|
1241
|
-
// Data Element Methods
|
|
1242
|
-
async clickDataElement(elementName, options = null) {
|
|
1243
|
-
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 });
|
|
1244
1279
|
}
|
|
1245
|
-
async
|
|
1246
|
-
|
|
1280
|
+
async clickRestoreButton() {
|
|
1281
|
+
await (0, test_1.expect)(this.restoreBtn).toBeVisible();
|
|
1282
|
+
await this.restoreBtn.click();
|
|
1247
1283
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1284
|
+
async isInputDropzoneVisible(isVisible = true) {
|
|
1285
|
+
await (0, test_1.expect)(this.inputDropzone).toBeVisible({ visible: isVisible });
|
|
1250
1286
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
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 });
|
|
1254
1289
|
}
|
|
1255
|
-
async
|
|
1256
|
-
|
|
1290
|
+
async isInputUploadFieldVisible(isVisible = true) {
|
|
1291
|
+
await (0, test_1.expect)(this.inputUploadField).toBeVisible({ visible: isVisible });
|
|
1257
1292
|
}
|
|
1258
|
-
|
|
1259
|
-
|
|
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 });
|
|
1260
1297
|
}
|
|
1261
1298
|
async doesPropertyWithNameContainValidationMessage(propertyName, validationMessage, isContained = true) {
|
|
1262
1299
|
const validationMessageLocator = this.page.locator('umb-property-layout[label="' + propertyName + '"]').locator(this.validationMessage);
|