@umbraco/playwright-testhelpers 16.0.16 → 16.0.18
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/ConsoleErrorHelper.d.ts +9 -0
- package/dist/lib/helpers/ConsoleErrorHelper.js +39 -0
- package/dist/lib/helpers/ConsoleErrorHelper.js.map +1 -0
- package/dist/lib/helpers/ConstantHelper.d.ts +2 -0
- package/dist/lib/helpers/ConstantHelper.js +16 -14
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentRenderUiHelper.js +1 -1
- package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +5 -5
- package/dist/lib/helpers/ContentUiHelper.js +29 -28
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.d.ts +3 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +66 -54
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +3 -3
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +2 -2
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.d.ts +3 -0
- package/dist/lib/helpers/LanguageUiHelper.js +9 -2
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +3 -3
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.d.ts +2 -0
- package/dist/lib/helpers/MemberUiHelper.js +6 -0
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/NotificationConstantHelper.d.ts +1 -0
- package/dist/lib/helpers/NotificationConstantHelper.js +2 -1
- package/dist/lib/helpers/NotificationConstantHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +2 -2
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +2 -2
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +3 -3
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +27 -3
- package/dist/lib/helpers/UiBaseLocators.js +111 -32
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserGroupApiHelper.d.ts +4 -2
- package/dist/lib/helpers/UserGroupApiHelper.js +52 -24
- package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.d.ts +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +3 -3
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/testExtension.js +14 -2
- package/dist/lib/helpers/testExtension.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ class CurrentUserProfileUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
7
7
|
changePasswordBtn;
|
|
8
8
|
constructor(page) {
|
|
9
9
|
super(page);
|
|
10
|
-
this.changePasswordBtn = page.getByLabel('Change password');
|
|
10
|
+
this.changePasswordBtn = page.getByLabel('Change your password');
|
|
11
11
|
}
|
|
12
12
|
async clickChangePasswordButton() {
|
|
13
13
|
await (0, test_1.expect)(this.changePasswordBtn).toBeVisible();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrentUserProfileUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/CurrentUserProfileUiHelper.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,qDAAgD;AAEhD,MAAa,0BAA2B,SAAQ,+BAAc;IAC3C,iBAAiB,CAAU;IAE5C,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"CurrentUserProfileUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/CurrentUserProfileUiHelper.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,qDAAgD;AAEhD,MAAa,0BAA2B,SAAQ,+BAAc;IAC3C,iBAAiB,CAAU;IAE5C,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,yBAAyB;QAC7B,MAAM,IAAA,aAAM,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,eAAuB,EAAE,WAAmB;QAC/D,MAAM,IAAA,aAAM,EAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE,CAAC;QACpD,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QACtC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAClC,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QACtC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAClC,CAAC;CACF;AAvBD,gEAuBC","sourcesContent":["import {expect, Locator, Page} from \"@playwright/test\"\nimport {UiBaseLocators} from \"./UiBaseLocators\";\n\nexport class CurrentUserProfileUiHelper extends UiBaseLocators {\n private readonly changePasswordBtn: Locator;\n\n constructor(page: Page) {\n super(page);\n this.changePasswordBtn = page.getByLabel('Change your password');\n }\n\n async clickChangePasswordButton() {\n await expect(this.changePasswordBtn).toBeVisible();\n await this.changePasswordBtn.click();\n }\n\n async changePassword(currentPassword: string, newPassword: string) {\n await expect(this.currentPasswordTxt).toBeVisible();\n await this.currentPasswordTxt.clear();\n await this.currentPasswordTxt.fill(currentPassword);\n await this.newPasswordTxt.clear();\n await this.newPasswordTxt.fill(newPassword);\n await this.confirmPasswordTxt.clear();\n await this.confirmPasswordTxt.fill(newPassword);\n await this.clickConfirmButton();\n }\n}"]}
|
|
@@ -133,6 +133,7 @@ export declare class DataTypeUiHelper extends UiBaseLocators {
|
|
|
133
133
|
private readonly propertyEditorConfig;
|
|
134
134
|
private readonly propertyEditorConfigItems;
|
|
135
135
|
private readonly tiptapStatusbarConfiguration;
|
|
136
|
+
private readonly blockThumbnailImage;
|
|
136
137
|
constructor(page: Page);
|
|
137
138
|
clickActionsMenuForDataType(name: string): Promise<void>;
|
|
138
139
|
clickActionsMenuAtRoot(): Promise<void>;
|
|
@@ -252,7 +253,7 @@ export declare class DataTypeUiHelper extends UiBaseLocators {
|
|
|
252
253
|
clickRemoveCustomStylesheetWithName(name: string): Promise<void>;
|
|
253
254
|
clickBlockGridHideContentEditorButton(): Promise<void>;
|
|
254
255
|
chooseBlockCustomStylesheetWithName(name: string): Promise<void>;
|
|
255
|
-
chooseBlockThumbnailWithPath(
|
|
256
|
+
chooseBlockThumbnailWithPath(mediaPath: string): Promise<void>;
|
|
256
257
|
clickBlockListHideContentEditorButton(): Promise<void>;
|
|
257
258
|
enterEditorWidth(value: string): Promise<void>;
|
|
258
259
|
enterCreateButtonLabel(value: string): Promise<void>;
|
|
@@ -292,4 +293,5 @@ export declare class DataTypeUiHelper extends UiBaseLocators {
|
|
|
292
293
|
clickStatusbarItemInToolboxWithName(name: string): Promise<void>;
|
|
293
294
|
clickStatusbarItemWithName(name: string): Promise<void>;
|
|
294
295
|
isExtensionItemChecked(itemName: string, isChecked?: boolean): Promise<void>;
|
|
296
|
+
doesBlockHaveThumbnailImage(thumbnailImageUrl: string): Promise<void>;
|
|
295
297
|
}
|
|
@@ -136,6 +136,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
136
136
|
propertyEditorConfig;
|
|
137
137
|
propertyEditorConfigItems;
|
|
138
138
|
tiptapStatusbarConfiguration;
|
|
139
|
+
blockThumbnailImage;
|
|
139
140
|
constructor(page) {
|
|
140
141
|
super(page);
|
|
141
142
|
this.moveToBtn = this.actionsMenuContainer.getByLabel('Move to');
|
|
@@ -145,7 +146,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
145
146
|
this.createDataTypeFolderBtn = page.getByLabel('Create folder');
|
|
146
147
|
this.newFolderBtn = page.locator('[name="Folder"]');
|
|
147
148
|
this.updateDataTypeFolderBtn = page.getByLabel('Update folder');
|
|
148
|
-
this.ignoreUserStartNodesToggle = page.
|
|
149
|
+
this.ignoreUserStartNodesToggle = page.getByTestId('property:ignoreUserStartNodes').locator('#toggle');
|
|
149
150
|
this.duplicateBtn = this.sidebarModal.getByLabel('Duplicate', { exact: true });
|
|
150
151
|
this.selectAPropertyEditorBtn = page.getByLabel('Select a property editor');
|
|
151
152
|
this.typeToFilterTxt = page.locator('#filter #input');
|
|
@@ -155,19 +156,19 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
155
156
|
this.colorValueTxt = page.getByPlaceholder('Value').getByRole('textbox');
|
|
156
157
|
// Date Picker
|
|
157
158
|
this.offsetTimeToggle = page.locator('umb-property[label="Offset time"] #toggle');
|
|
158
|
-
this.dateFormatTxt = page.
|
|
159
|
+
this.dateFormatTxt = page.getByTestId('property:format').locator('#input');
|
|
159
160
|
// List View
|
|
160
|
-
this.pageSizeTxt = page.
|
|
161
|
+
this.pageSizeTxt = page.getByTestId('property:pageSize').locator('#input');
|
|
161
162
|
this.ascendingRadioBtn = page.locator('uui-radio[label="Ascending [a-z]"] #button');
|
|
162
163
|
this.descendingRadioBtn = page.locator('uui-radio[label="Descending [z-a]"] #button');
|
|
163
|
-
this.chooseColumnsDisplayedBtn = page.
|
|
164
|
-
this.columnsDisplayedItems = page.
|
|
165
|
-
this.workspaceViewName = page.
|
|
166
|
-
this.showWorkspaceViewFirstToggle = page.
|
|
164
|
+
this.chooseColumnsDisplayedBtn = page.getByTestId('property:includeProperties').getByLabel('Choose');
|
|
165
|
+
this.columnsDisplayedItems = page.getByTestId('property:includeProperties').locator('.layout-item');
|
|
166
|
+
this.workspaceViewName = page.getByTestId('property:tabName').locator('#input');
|
|
167
|
+
this.showWorkspaceViewFirstToggle = page.getByTestId('property:showContentFirst').locator('#toggle');
|
|
167
168
|
this.editInInfiniteEditorToggle = page.locator('umb-property[label="Edit in Infinite Editor"] #toggle');
|
|
168
|
-
this.orderByDropDownBox = page.
|
|
169
|
-
this.chooseLayoutsBtn = page.
|
|
170
|
-
this.layoutsItems = page.
|
|
169
|
+
this.orderByDropDownBox = page.getByTestId('property:orderBy').locator('select');
|
|
170
|
+
this.chooseLayoutsBtn = page.getByTestId('property:layouts').getByLabel('Choose');
|
|
171
|
+
this.layoutsItems = page.getByTestId('property:layouts').locator('.layout-item');
|
|
171
172
|
// Image Cropper
|
|
172
173
|
this.labelTxt = page.getByLabel('Label', { exact: true });
|
|
173
174
|
this.aliasTxt = page.getByLabel('Alias', { exact: true });
|
|
@@ -176,56 +177,56 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
176
177
|
this.addCropBtn = page.getByLabel('Add', { exact: true });
|
|
177
178
|
this.saveCropBtn = page.locator('[alias="crops"]').getByLabel('Save');
|
|
178
179
|
// Numeric
|
|
179
|
-
this.minimumTxt = page.
|
|
180
|
-
this.maximumTxt = page.
|
|
181
|
-
this.stepSizeTxt = page.
|
|
180
|
+
this.minimumTxt = page.getByTestId('property:min').locator('#input');
|
|
181
|
+
this.maximumTxt = page.getByTestId('property:max').locator('#input');
|
|
182
|
+
this.stepSizeTxt = page.getByTestId('property:step').locator('#input');
|
|
182
183
|
this.allowDecimalsToggle = page.locator('umb-property[label="Allow decimals"] #toggle');
|
|
183
184
|
// Radiobox
|
|
184
|
-
this.optionTxt = page.
|
|
185
|
-
this.addOptionBtn = page.
|
|
185
|
+
this.optionTxt = page.getByTestId('property:items').locator('#input');
|
|
186
|
+
this.addOptionBtn = page.getByTestId('property:items').getByLabel('Add', { exact: true });
|
|
186
187
|
// Textarea - Textstring
|
|
187
|
-
this.maximumAllowedCharsTxt = page.
|
|
188
|
-
this.numberOfRowsTxt = page.
|
|
189
|
-
this.minHeightTxt = page.
|
|
190
|
-
this.maxHeightTxt = page.
|
|
188
|
+
this.maximumAllowedCharsTxt = page.getByTestId('property:maxChars').locator('#input');
|
|
189
|
+
this.numberOfRowsTxt = page.getByTestId('property:rows').locator('#input');
|
|
190
|
+
this.minHeightTxt = page.getByTestId('property:minHeight').locator('#input');
|
|
191
|
+
this.maxHeightTxt = page.getByTestId('property:maxHeight').locator('#input');
|
|
191
192
|
// Upload
|
|
192
|
-
this.acceptedFileExtensionsTxt = page.
|
|
193
|
-
this.addAcceptedFileExtensionsBtn = page.
|
|
193
|
+
this.acceptedFileExtensionsTxt = page.getByTestId('property:fileExtensions').locator('#input');
|
|
194
|
+
this.addAcceptedFileExtensionsBtn = page.getByTestId('property:fileExtensions').getByLabel('Add', { exact: true });
|
|
194
195
|
// Multi URL Picker
|
|
195
|
-
this.minimumNumberOfItemsTxt = page.
|
|
196
|
-
this.maximumNumberOfItemsTxt = page.
|
|
197
|
-
this.overlaySizeDropDownBox = page.
|
|
198
|
-
this.hideAnchorQueryStringInputToggle = page.
|
|
196
|
+
this.minimumNumberOfItemsTxt = page.getByTestId('property:minNumber').locator('#input');
|
|
197
|
+
this.maximumNumberOfItemsTxt = page.getByTestId('property:maxNumber').locator('#input');
|
|
198
|
+
this.overlaySizeDropDownBox = page.getByTestId('property:overlaySize').locator('select');
|
|
199
|
+
this.hideAnchorQueryStringInputToggle = page.getByTestId('property:hideAnchor').locator('#toggle');
|
|
199
200
|
// Media Picker
|
|
200
|
-
this.pickMultipleItemsToggle = page.
|
|
201
|
-
this.enableFocalPointToggle = page.
|
|
202
|
-
this.amountLowValueTxt = page.
|
|
203
|
-
this.amountHighValueTxt = page.
|
|
204
|
-
this.chooseAcceptedTypesBtn = page.
|
|
201
|
+
this.pickMultipleItemsToggle = page.getByTestId('property:multiple').locator('#toggle');
|
|
202
|
+
this.enableFocalPointToggle = page.getByTestId('property:enableLocalFocalPoint').locator('#toggle');
|
|
203
|
+
this.amountLowValueTxt = page.getByTestId('property:validationLimit').getByLabel('Low value');
|
|
204
|
+
this.amountHighValueTxt = page.getByTestId('property:validationLimit').getByLabel('High value');
|
|
205
|
+
this.chooseAcceptedTypesBtn = page.getByTestId('property:filter').getByLabel('Choose');
|
|
205
206
|
this.chooseWithPlusBtn = page.locator('#btn-add').filter({ hasText: 'Choose' });
|
|
206
|
-
this.chooseStartNodeBtn = page.
|
|
207
|
+
this.chooseStartNodeBtn = page.getByTestId('property:startNodeId').locator('#btn-add');
|
|
207
208
|
// Rich Editor
|
|
208
|
-
this.toolbarCheckboxes = page.
|
|
209
|
-
this.addStylesheetBtn = page.
|
|
210
|
-
this.dimensionsWidthTxt = page.
|
|
211
|
-
this.dimensionsHeightTxt = page.
|
|
212
|
-
this.maxImageSizeTxt = page.
|
|
213
|
-
this.hideLabelToggle = page.
|
|
214
|
-
this.inlineRadioBtn = page.
|
|
215
|
-
this.addWithPlusBtn = page.
|
|
209
|
+
this.toolbarCheckboxes = page.getByTestId('property:toolbar').locator('uui-checkbox');
|
|
210
|
+
this.addStylesheetBtn = page.getByTestId('property:stylesheets').getByLabel('Add stylesheet');
|
|
211
|
+
this.dimensionsWidthTxt = page.getByTestId('property:dimensions').getByLabel('Width');
|
|
212
|
+
this.dimensionsHeightTxt = page.getByTestId('property:dimensions').getByLabel('Height');
|
|
213
|
+
this.maxImageSizeTxt = page.getByTestId('property:maxImageSize').locator('#input');
|
|
214
|
+
this.hideLabelToggle = page.getByTestId('property:hideLabel').locator('#toggle');
|
|
215
|
+
this.inlineRadioBtn = page.getByTestId('property:mode').locator('uui-radio[value="Inline"]');
|
|
216
|
+
this.addWithPlusBtn = page.getByTestId('property:blocks').locator('#add-button');
|
|
216
217
|
// Tags
|
|
217
|
-
this.defineTagGroupTxt = page.
|
|
218
|
+
this.defineTagGroupTxt = page.getByTestId('property:group').locator('#input');
|
|
218
219
|
this.storageTypeDropDownBox = page.locator('#native');
|
|
219
220
|
// Content Picker
|
|
220
|
-
this.showOpenButtonToggle = page.
|
|
221
|
+
this.showOpenButtonToggle = page.getByTestId('property:showOpenButton').locator('#toggle');
|
|
221
222
|
// Dropdown
|
|
222
|
-
this.enableMultipleChoiceToggle = page.
|
|
223
|
-
this.addOptionsBtn = page.
|
|
223
|
+
this.enableMultipleChoiceToggle = page.getByTestId('property:multiple').locator('#toggle');
|
|
224
|
+
this.addOptionsBtn = page.getByTestId('property:items').getByLabel('Add', { exact: true });
|
|
224
225
|
// True/false
|
|
225
|
-
this.presetValueToggle = page.
|
|
226
|
-
this.showToggleLabelsToggle = page.
|
|
227
|
-
this.labelOnTxt = page.
|
|
228
|
-
this.labelOffTxt = page.
|
|
226
|
+
this.presetValueToggle = page.getByTestId('property:default').locator('#toggle');
|
|
227
|
+
this.showToggleLabelsToggle = page.getByTestId('property:showLabels').locator('#toggle');
|
|
228
|
+
this.labelOnTxt = page.getByTestId('property:labelOn').locator('#input');
|
|
229
|
+
this.labelOffTxt = page.getByTestId('property:labelOff').locator('#input');
|
|
229
230
|
// Block List Editor and Block Grid Editor
|
|
230
231
|
this.addBlockBtn = page.locator('umb-input-block-type #blocks').getByLabel('open');
|
|
231
232
|
this.minAmountTxt = page.getByLabel('Low value');
|
|
@@ -288,9 +289,10 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
288
289
|
// Settings
|
|
289
290
|
this.propertyEditorConfig = page.locator('umb-property-editor-config');
|
|
290
291
|
this.propertyEditorConfigItems = this.propertyEditorConfig.locator('umb-property');
|
|
292
|
+
this.blockThumbnailImage = page.locator('uui-card-block-type').locator('img');
|
|
291
293
|
}
|
|
292
294
|
async clickActionsMenuForDataType(name) {
|
|
293
|
-
await this.
|
|
295
|
+
await this.clickActionsMenuForName(name);
|
|
294
296
|
}
|
|
295
297
|
async clickActionsMenuAtRoot() {
|
|
296
298
|
await this.clickActionsMenuForDataType('Data Types');
|
|
@@ -299,7 +301,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
299
301
|
await this.clickCaretButtonForName('Data Types');
|
|
300
302
|
}
|
|
301
303
|
async createDataTypeFolder(folderName) {
|
|
302
|
-
await this.
|
|
304
|
+
await this.clickCreateActionMenuOption();
|
|
303
305
|
await this.clickFolderButton();
|
|
304
306
|
await this.enterFolderName(folderName);
|
|
305
307
|
await this.clickConfirmCreateFolderButton();
|
|
@@ -343,12 +345,12 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
343
345
|
await this.deleteFolder();
|
|
344
346
|
}
|
|
345
347
|
async moveDataTypeToFolder(folderName) {
|
|
346
|
-
await this.
|
|
348
|
+
await this.clickMoveToActionMenuOption();
|
|
347
349
|
await this.sidebarModal.getByText(folderName, { exact: true }).click();
|
|
348
350
|
await this.chooseModalBtn.click();
|
|
349
351
|
}
|
|
350
352
|
async duplicateDataTypeToFolder(folderName) {
|
|
351
|
-
await this.
|
|
353
|
+
await this.clickDuplicateToActionMenuOption();
|
|
352
354
|
await this.sidebarModal.getByText(folderName, { exact: true }).click();
|
|
353
355
|
await this.duplicateBtn.click();
|
|
354
356
|
}
|
|
@@ -827,13 +829,20 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
827
829
|
await this.clickLabelWithName(name, true);
|
|
828
830
|
await this.clickChooseModalButton();
|
|
829
831
|
}
|
|
830
|
-
async chooseBlockThumbnailWithPath(
|
|
832
|
+
async chooseBlockThumbnailWithPath(mediaPath) {
|
|
833
|
+
const mediaItems = mediaPath.split('/media/')[1].split('/');
|
|
831
834
|
await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
|
|
832
835
|
await this.chooseThumbnailAlias.click();
|
|
833
836
|
await this.clickCaretButtonForName('wwwroot');
|
|
834
837
|
await this.clickExpandChildItemsForMediaButton();
|
|
835
|
-
|
|
836
|
-
|
|
838
|
+
for (let i = 0; i < mediaItems.length; i++) {
|
|
839
|
+
if (i === mediaItems.length - 1) {
|
|
840
|
+
await this.clickLabelWithName(mediaItems[i], true);
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
await this.page.locator('uui-menu-item[label="' + mediaItems[i] + '"] #caret-button').click();
|
|
844
|
+
}
|
|
845
|
+
}
|
|
837
846
|
await this.clickChooseModalButton();
|
|
838
847
|
}
|
|
839
848
|
async clickBlockListHideContentEditorButton() {
|
|
@@ -1039,6 +1048,9 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1039
1048
|
async isExtensionItemChecked(itemName, isChecked = true) {
|
|
1040
1049
|
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + itemName + '"] input')).toBeChecked({ checked: isChecked });
|
|
1041
1050
|
}
|
|
1051
|
+
async doesBlockHaveThumbnailImage(thumbnailImageUrl) {
|
|
1052
|
+
await (0, test_1.expect)(this.blockThumbnailImage).toHaveAttribute('src', thumbnailImageUrl);
|
|
1053
|
+
}
|
|
1042
1054
|
}
|
|
1043
1055
|
exports.DataTypeUiHelper = DataTypeUiHelper;
|
|
1044
1056
|
//# sourceMappingURL=DataTypeUiHelper.js.map
|